Skip to content

Commit

Permalink
Set no_log to True for api_key, api_secret, enrollment_secret, hsm.la…
Browse files Browse the repository at this point in the history
…bel, hsm.pin (#270)

* Set no_log to True for api_key and api_secret (contributes to #268)

Signed-off-by: Simon Stone <[email protected]>

* Set no_log to True for enrollment_secret (contributes to #268)

Signed-off-by: Simon Stone <[email protected]>

* Set no_log to True for hsm.label and hsm.pin (contributes to #268)

Signed-off-by: Simon Stone <[email protected]>
  • Loading branch information
Simon Stone authored Jun 3, 2020
1 parent acefa96 commit 3a06596
Show file tree
Hide file tree
Showing 21 changed files with 53 additions and 53 deletions.
10 changes: 5 additions & 5 deletions plugins/modules/certificate_authority.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str', required=True),
Expand All @@ -253,8 +253,8 @@ def main():
)),
hsm=dict(type='dict', options=dict(
pkcs11endpoint=dict(type='str', required=True),
label=dict(type='str', required=True),
pin=dict(type='str', required=True)
label=dict(type='str', required=True, no_log=True),
pin=dict(type='str', required=True, no_log=True)
)),
zone=dict(type='str'),
wait_timeout=dict(type='int', default=60)
Expand Down Expand Up @@ -312,7 +312,7 @@ def main():
ca = config_override['ca']
tlsca = config_override['tlsca']
if ca is not None and tlsca is None:
config_override['tlsca'] = ca
tlsca = config_override['tlsca'] = ca

# Extract the expected certificate authority configuration.
expected_certificate_authority = dict(
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/certificate_authority_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ def main():
argument_spec = dict(
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str', required=True),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/channel_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def main():
argument_spec = dict(
api_endpoint=dict(type='str'),
api_authtype=dict(type='str', choices=['ibmcloud', 'basic']),
api_key=dict(type='str'),
api_secret=dict(type='str'),
api_key=dict(type='str', no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
operation=dict(type='str', required=True, choices=['create', 'fetch', 'compute_update', 'sign_update', 'apply_update']),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/channel_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,8 @@ def main():
argument_spec = dict(
api_endpoint=dict(type='str'),
api_authtype=dict(type='str', choices=['ibmcloud', 'basic']),
api_key=dict(type='str'),
api_secret=dict(type='str'),
api_key=dict(type='str', no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
operation=dict(type='str', required=True, choices=['create', 'fetch', 'compute_update', 'sign_update', 'apply_update']),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/channel_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str'),
api_authtype=dict(type='str', choices=['ibmcloud', 'basic']),
api_key=dict(type='str'),
api_secret=dict(type='str'),
api_key=dict(type='str', no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
path=dict(type='str', required=True),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/connection_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str'),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/consortium_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str'),
api_authtype=dict(type='str', choices=['ibmcloud', 'basic']),
api_key=dict(type='str'),
api_secret=dict(type='str'),
api_key=dict(type='str', no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
path=dict(type='str', required=True),
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/enrolled_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
certificate_authority=dict(type='raw'),
name=dict(type='str'),
enrollment_id=dict(type='str'),
enrollment_secret=dict(type='str'),
enrollment_secret=dict(type='str', no_log=True),
path=dict(type='str', required=True)
)
required_if = [
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/external_ordering_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str'),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/external_organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str'),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/installed_chaincode.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
peer=dict(type='raw', required=True),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/instantiated_chaincode.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
peer=dict(type='raw', required=True),
Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/ordering_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str', required=True),
Expand All @@ -397,7 +397,7 @@ def main():
system_channel_id=dict(type='str', default='testchainid'),
certificate_authority=dict(type='raw'),
enrollment_id=dict(type='str'),
enrollment_secret=dict(type='str'),
enrollment_secret=dict(type='str', no_log=True),
admins=dict(type='list', elements='str', aliases=['admin_certificates']),
nodes=dict(type='int'),
config=dict(type='list', elements='dict'),
Expand All @@ -424,8 +424,8 @@ def main():
)),
hsm=dict(type='dict', options=dict(
pkcs11endpoint=dict(type='str', required=True),
label=dict(type='str', required=True),
pin=dict(type='str', required=True)
label=dict(type='str', required=True, no_log=True),
pin=dict(type='str', required=True, no_log=True)
)),
zone=dict(type='list', elements='str'),
wait_timeout=dict(type='int', default=60)
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/ordering_service_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str'),
api_authtype=dict(type='str', choices=['ibmcloud', 'basic']),
api_key=dict(type='str'),
api_secret=dict(type='str'),
api_key=dict(type='str', no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
path=dict(type='str', required=True),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/ordering_service_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ def main():
argument_spec = dict(
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str', required=True),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str', required=True),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/organization_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ def main():
argument_spec = dict(
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str', required=True),
Expand Down
10 changes: 5 additions & 5 deletions plugins/modules/peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,16 +396,16 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str', required=True),
msp_id=dict(type='str'),
state_db=dict(type='str', default='couchdb', choices=['couchdb', 'leveldb']),
certificate_authority=dict(type='raw'),
enrollment_id=dict(type='str'),
enrollment_secret=dict(type='str'),
enrollment_secret=dict(type='str', no_log=True),
admins=dict(type='list', elements='str', aliases=['admin_certificates']),
config=dict(type='dict'),
config_override=dict(type='dict', default=dict()),
Expand Down Expand Up @@ -447,8 +447,8 @@ def main():
)),
hsm=dict(type='dict', options=dict(
pkcs11endpoint=dict(type='str', required=True),
label=dict(type='str', required=True),
pin=dict(type='str', required=True)
label=dict(type='str', required=True, no_log=True),
pin=dict(type='str', required=True, no_log=True)
)),
zone=dict(type='str'),
wait_timeout=dict(type='int', default=60)
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/peer_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def main():
argument_spec = dict(
api_endpoint=dict(type='str'),
api_authtype=dict(type='str', choices=['ibmcloud', 'basic']),
api_key=dict(type='str'),
api_secret=dict(type='str'),
api_key=dict(type='str', no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
operation=dict(type='str', required=True, choices=['join']),
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/peer_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def main():
argument_spec = dict(
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
name=dict(type='str', required=True),
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/registered_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ def main():
state=dict(type='str', default='present', choices=['present', 'absent']),
api_endpoint=dict(type='str', required=True),
api_authtype=dict(type='str', required=True, choices=['ibmcloud', 'basic']),
api_key=dict(type='str', required=True),
api_secret=dict(type='str'),
api_key=dict(type='str', required=True, no_log=True),
api_secret=dict(type='str', no_log=True),
api_timeout=dict(type='int', default=60),
api_token_endpoint=dict(type='str', default='https://iam.cloud.ibm.com/identity/token'),
certificate_authority=dict(type='raw', required=True),
registrar=dict(type='raw', required=True),
enrollment_id=dict(type='str', required=True),
enrollment_secret=dict(type='str'),
enrollment_secret=dict(type='str', no_log=True),
max_enrollments=dict(type='int', default=-1),
type=dict(type='str', default='client', choices=['admin', 'client', 'peer', 'orderer']),
affiliation=dict(type='str', default=''),
Expand Down

0 comments on commit 3a06596

Please sign in to comment.