Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[TT-14494] improve error logging for JWKS URL handling #7593
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
Uh oh!
There was an error while loading. Please reload this page.
[TT-14494] improve error logging for JWKS URL handling #7593
Changes from all commits
beb79d21bc3e1fc7ad650a0368fdd53f426bc0c3df47199e2fb611d32aaad3eca684ca4246b5bFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Check warning on line 116 in gateway/log_helpers.go
security Issue
Raw output
Sanitize the URL before logging it. Parse the URL and log only the scheme, host, and path, omitting the query string. Alternatively, implement a filtering mechanism to remove known sensitive query parameters. Example: ```go parsedURL, parseErr := url.Parse(jwkURL) sanitizedURL := jwkURL if parseErr == nil { parsedURL.RawQuery = "" parsedURL.Fragment = "" sanitizedURL = parsedURL.String() } logger.WithError(err).Errorf("JWKS endpoint resolution failed: invalid or unreachable host %s", sanitizedURL) ```Check failure on line 220 in gateway/mw_external_oauth.go
security Issue
Raw output
Avoid logging the raw `JWTSource`. Instead, log a generic error message or a sanitized version of the source (e.g., its type or length). ```go k.Logger().WithError(err).Error("JWKS source decode failed: input is not a valid base64 string") ```Check failure on line 245 in gateway/mw_jwt.go
security Issue
Raw output
Avoid logging the raw `JWTSource`. Instead, log a generic error message or a sanitized version of the source (e.g., its type or length). ```go k.Logger().WithError(err).Error("JWKS source decode failed: input is not a valid base64 string") ```Check warning on line 273 in gateway/mw_jwt.go
architecture Issue
Raw output
Check failure on line 344 in gateway/mw_jwt.go
security Issue
Raw output
Avoid logging the raw `JWTSource`. Instead, log a generic error message or a sanitized version of the source (e.g., its type or length). ```go k.Logger().WithError(err).Error("JWKS source decode failed: input is not a valid base64 string") ```Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.