Add 'env_var_' prefix option for handling secrets - #775
Conversation
|
Sync'd fork with release 0.8.0. |
skaszlik
left a comment
There was a problem hiding this comment.
With this new method of handling the passwords, please investigate how we can merge the prep_005_resolve_env_vars plugin with existing get_credentials.py to simplify the code. It looks like the prep_005 can completely replace the get_credentials.py
|
Changed implementation so that resolved environment variables are not shown in the rendered files. Summary: prep_005_resolve_env_vars.py
build_resource_data.py
Please note env_var_ secrets are still visible in Ansible logs. For switch credentials (get_credentials.py) using the dcnm_inventory module, the module's argument spec marks password and user_name with no_log: True. Ansible automatically redacts any parameter marked this way in task output → VALUE_SPECIFIED_IN_NO_LOG_PARAMETER. However for secrets using env_var_ and the dcnm_fabric module, the module accepts a generic config dict. Individual keys like protocol authentication keys are not marked no_log in the argument spec. |
|
ccoueffe
left a comment
There was a problem hiding this comment.
LGTM but we need to document in netascode because It doesn't work during validate and we need a force_run_all in that case.
|
Related Issue(s)
Fixes #720
Related Collection Role
Related Data Model Element
Proposed Changes
Add plugin to lookup up secrets starting with the 'env_var_' prefix. Same functionality as already supported for switch credentials. Examples:
Test Notes
Cisco Nexus Dashboard Version
3.2.2
4.2.1
Checklist