Removing token obfuscation
This commit is contained in:
parent
fa20898c2d
commit
e861e587d7
1 changed files with 2 additions and 5 deletions
|
@ -174,7 +174,7 @@ def update_acl(module):
|
||||||
module.fail_json(msg="Could not create/update acl %s" % e)
|
module.fail_json(msg="Could not create/update acl %s" % e)
|
||||||
|
|
||||||
module.exit_json(changed=changed,
|
module.exit_json(changed=changed,
|
||||||
token=obfuscate_token(token),
|
token=token,
|
||||||
rules=rules,
|
rules=rules,
|
||||||
name=name,
|
name=name,
|
||||||
type=token_type)
|
type=token_type)
|
||||||
|
@ -190,10 +190,7 @@ def remove_acl(module):
|
||||||
if changed:
|
if changed:
|
||||||
token = consul.acl.destroy(token)
|
token = consul.acl.destroy(token)
|
||||||
|
|
||||||
module.exit_json(changed=changed, token=obfuscate_token(token))
|
module.exit_json(changed=changed, token=token)
|
||||||
|
|
||||||
def obfuscate_token(token):
|
|
||||||
return token[:4] + "*" * (len(token) - 5)
|
|
||||||
|
|
||||||
def load_rules_for_token(module, consul_api, token):
|
def load_rules_for_token(module, consul_api, token):
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue