Merge "Revert "security: hide sensitive auth_password in kolla_container module logs""

This commit is contained in:
Zuul
2025-08-13 21:54:12 +00:00
committed by Gerrit Code Review
3 changed files with 2 additions and 17 deletions

View File

@@ -268,8 +268,7 @@ def generate_module():
# NOTE(r-krcek): arguments_spec should also be reflected in the list of # NOTE(r-krcek): arguments_spec should also be reflected in the list of
# arguments in service-check-containers role # arguments in service-check-containers role
argument_spec = dict( argument_spec = dict(
common_options=dict(required=False, type='dict', common_options=dict(required=False, type='dict', default=dict()),
default=dict(), no_log=True),
action=dict(required=True, type='str', action=dict(required=True, type='str',
choices=['compare_container', choices=['compare_container',
'compare_image', 'compare_image',

View File

@@ -1,13 +0,0 @@
---
security:
- |
Added no_log=True to the ``common_options`` argument in generate_module()
to prevent the auth_password and other sensitive data from being printed
in Ansible logs during container operations when
``docker_registry_password`` was set. This improves security by hiding
credentials from logs.
This change addresses the issue where auth_password was visible in log
despite already having no_log=True on the auth_password parameter itself,
because it was nested inside common_options dict without no_log protection.
`LP#2120302 <https://launchpad.net/bugs/2120302>`__

View File

@@ -36,8 +36,7 @@ class ModuleArgsTest(base.BaseTestCase):
def test_module_args(self): def test_module_args(self):
argument_spec = dict( argument_spec = dict(
common_options=dict(required=False, type='dict', default=dict(), common_options=dict(required=False, type='dict', default=dict()),
no_log=True),
action=dict( action=dict(
required=True, type='str', required=True, type='str',
choices=['compare_container', choices=['compare_container',