-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[TT-15354]: Improve logging in JWT Middleware #7528
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
Conversation
🎯 Recommended Merge TargetsBased on JIRA ticket TT-15354: Gateway fails to fetch keys from local Redis for JWT API Fix Version: Tyk 5.11.0
Required:
Fix Version: Tyk 5.8.9Required:
📋 Workflow
|
edd1e48 to
25331a8
Compare
🔍 Code Analysis ResultsThis PR improves the logging in the JWT Middleware to make it clearer that an option exists to disable IDP client ID mapping for external IDPs, which can improve performance. When the gateway fails to retrieve an OAuth client, it now logs a more informative warning message suggesting this configuration change. Files Changed Analysis
Architecture & Impact AssessmentWhat this PR accomplishesThis PR enhances the observability of the JWT middleware. It makes a potentially obscure performance-tuning option ( Key technical changes introduced
Affected system componentsThe only component affected is the JWT Middleware within the Tyk Gateway. The change has no impact on the middleware's runtime behavior; it solely modifies the log output to provide better operational guidance. The logical flow where the logging is improved can be visualized as follows: graph TD
A[Start processCentralisedJWT] --> B{IDPClientIDMappingDisabled == true?};
B -- Yes --> C[Skip OAuth Client ID retrieval];
B -- No --> D[Log "IDP client ID mapping enabled..." (New Debug Log)];
D --> E[Attempt to get OAuth Client ID from claims];
E --> F{OAuth client retrieved successfully?};
F -- Yes --> G[Proceed with session object];
F -- No --> H[Log Warn: "Failed to retrieve OAuth client... consider disabling IDP client ID mapping..." (Improved Warn Log)];
C --> I[Continue processing];
H --> I;
G --> I;
Scope Discovery & Context ExpansionThe change is confined to the The configuration flag at the heart of this change, Metadata
Powered by Visor from Probelabs Last updated: 2025-11-12T12:36:26.188Z | Triggered by: synchronize | Commit: 36b0e5b 💡 TIP: You can chat with Visor using |
7663215 to
ef206e3
Compare
ef206e3 to
390ada8
Compare
🔍 Code Analysis ResultsSecurity Issues (1)
✅ Architecture Check PassedNo architecture issues found – changes LGTM. ✅ Performance Check PassedNo performance issues found – changes LGTM. ✅ Quality Check PassedNo quality issues found – changes LGTM. ✅ Dependency Check PassedNo dependency issues found – changes LGTM. Connectivity Issues (1)
Powered by Visor from Probelabs Last updated: 2025-11-12T12:36:27.404Z | Triggered by: synchronize | Commit: 36b0e5b 💡 TIP: You can chat with Visor using |
|
API Changes no api changes detected |
|
|
/release to release-5.8.9 |
Improves the logging in the JWT Middleware, to make it clearer that the option to disable IDP client id mapping exists for external IDPs. (cherry picked from commit 71eec19)
|
✅ Cherry-pick successful. A PR was created: #7612 |
|
/release to release-5.8 |
Improves the logging in the JWT Middleware, to make it clearer that the option to disable IDP client id mapping exists for external IDPs. (cherry picked from commit 71eec19)
|
✅ Cherry-pick successful. A PR was created: #7613 |



Description
This change improves the logging in the JWT Middleware, to make it clearer that the option to disable IDP client id mapping exists for external IDPs to improve performance.
Related Issue
TT-15354
Motivation and Context
This ticket described a bug that was fixed a few years ago: https://tyktech.atlassian.net/browse/TT-10566
For more information see this comment: https://tyktech.atlassian.net/browse/TT-15354?focusedCommentId=111729
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
Ticket Details
TT-15354
Generated at: 2025-11-12 12:32:46