Back to all scenarios
Scenario #206
Security
K8s v1.23, Azure AKS
Sensitive Data in Logs Due to Improper Log Sanitization
Sensitive data, such as API keys and passwords, was logged due to improper sanitization in application logs.
Find this helpful?
What Happened
A vulnerability in the application caused API keys and secrets to be included in logs, which were not sanitized before being stored in the central logging system.
Diagnosis Steps
- 1Examined the application logs using kubectl logs and found that sensitive data was included in plain text.
- 2Inspected the logging configuration and found that there were no filters in place to scrub sensitive data.
Root Cause
Lack of proper sanitization in the logging process allowed sensitive data to be exposed.
Fix/Workaround
• Updated the application to sanitize sensitive data before it was logged.
• Configured the logging system to filter out sensitive information from logs.
Lessons Learned
Sensitive data should never be included in logs in an unencrypted or unsanitized format.
How to Avoid
- 1Implement log sanitization techniques to ensure that sensitive information is never exposed in logs.
- 2Regularly audit logging configurations to ensure that they are secure.