Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubeconfig appears in ansible log module invocations, even when in dictionary form #782

Open
jnm27 opened this issue Oct 8, 2024 · 0 comments

Comments

@jnm27
Copy link

jnm27 commented Oct 8, 2024

SUMMARY

When passing the kubeconfig to various kubernetes.core modules as a dictionary instead of a path, it contains sensitive data and should not be logged.
I've patched this in our environment in the meantime to simply always no_log the kubeconfig argument in args_common.py.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

kubernetes/core/plugins/module_utils/args_common.py

ANSIBLE VERSION
ansible [core 2.15.0]
  python version = 3.11.2 (main, Feb 17 2023, 09:28:16) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18)] (/usr/bin/python3.11)
  jinja version = 3.1.2
COLLECTION VERSION
kubernetes.core          4.0.0
CONFIGURATION
not relevant
OS / ENVIRONMENT

RHEL8.6 ansible engine, Openshift 4.16 target.

STEPS TO REPRODUCE

Pass kubeconfig as a dictionary to any kubernetes.core module that uses args_common.py.

kubernetes.core.helm, community.okd.k8s
EXPECTED RESULTS

Sensitive kubeconfig dictionary is omitted from logs.

ACTUAL RESULTS

Kubeconfig dictionary is in plaintext in logs.

N/A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant