-
Notifications
You must be signed in to change notification settings - Fork 71
Jle platsec 3706 redact token log #265
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
Jle platsec 3706 redact token log #265
Conversation
…horization codes in application and access logs
…ted Gunicorn logger
|
Very nice! Change this PR out of draft when you're ready and I can take a final review |
Will update the mypy stuff and then go out of draft. Need a bit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces log redaction improvements to mask sensitive token and authorization code information in application and access logs.
- Adds a TokenSanitizingFilter to sanitize token data in application logs.
- Implements a RedactingGunicornLogger to strip query strings from access logs for the /oidc/authorize endpoint.
- Updates app initialization to apply the new log filters to various loggers.
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| api/log_filters.py | Adds token redaction filtering logic and a custom Gunicorn logger for access logs. |
| api/app.py | Updates application logging configuration to include the new token sanitizing filter. |
Files not reviewed (1)
- Dockerfile: Language not supported
|
@somethingnew2-0 fixed the mypy errors. Tested on my local and the logging redactions of the tokens are taking place. |
Propose log redactions for tokens/strings we'd be more comfortable if they were redacted.