Credentials appear in debug logs #2258
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
lifecycle/rotten
Denotes an issue or PR that has aged beyond stale and will be auto-closed.
priority/awaiting-more-evidence
Lowest priority. Possibly useful, but not yet enough support to actually get it done.
What happened (please include outputs or screenshots):
Kubernetes-client creates debug log lines for all REST API call response bodies. When using kubernetes-client to create kubernetes Secret objects, this presents an issue as the raw contents of the secret are logged.
The issue can be worked around by forcing kubernetes-client to never generate debug logs via log configuration (e.g. logging.dictConfig).
What you expected to happen:
Calling
client.CoreV1Api().create_namespaced_secret()
must never log the raw secret.How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
This appears to be the offending line:
python/kubernetes/client/rest.py
Lines 234 to 235 in 7a278c7
Environment:
kubectl version
): v1.30.0python --version
): Python 3.11.3pip list | grep kubernetes
): 29.0.0The text was updated successfully, but these errors were encountered: