Add no_log=True to consul modules' API tokens

API tokens should be considered sensitive and not logged.
pull/18777/head
Joel Thompson 9 years ago committed by Matt Clay
parent 165e025a6d
commit 3796e26a9d

@ -523,7 +523,7 @@ def main():
http=dict(required=False, type='str'), http=dict(required=False, type='str'),
timeout=dict(required=False, type='str'), timeout=dict(required=False, type='str'),
tags=dict(required=False, type='list'), tags=dict(required=False, type='list'),
token=dict(required=False) token=dict(required=False, no_log=True)
), ),
supports_check_mode=False, supports_check_mode=False,
) )

@ -313,13 +313,13 @@ def test_dependencies(module):
def main(): def main():
argument_spec = dict( argument_spec = dict(
mgmt_token=dict(required=True), mgmt_token=dict(required=True, no_log=True),
host=dict(default='localhost'), host=dict(default='localhost'),
name=dict(required=False), name=dict(required=False),
port=dict(default=8500, type='int'), port=dict(default=8500, type='int'),
rules=dict(default=None, required=False, type='list'), rules=dict(default=None, required=False, type='list'),
state=dict(default='present', choices=['present', 'absent']), state=dict(default='present', choices=['present', 'absent']),
token=dict(required=False), token=dict(required=False, no_log=True),
token_type=dict( token_type=dict(
required=False, choices=['client', 'management'], default='client') required=False, choices=['client', 'management'], default='client')
) )

@ -241,7 +241,7 @@ def main():
recurse=dict(required=False, type='bool'), recurse=dict(required=False, type='bool'),
retrieve=dict(required=False, default=True), retrieve=dict(required=False, default=True),
state=dict(default='present', choices=['present', 'absent']), state=dict(default='present', choices=['present', 'absent']),
token=dict(required=False, default='anonymous'), token=dict(required=False, default='anonymous', no_log=True),
value=dict(required=False) value=dict(required=False)
) )

Loading…
Cancel
Save