[TT-431] Authorization token should not be recorded in detailed logs#8500
[TT-431] Authorization token should not be recorded in detailed logs#8500MaciekMis wants to merge 4 commits into
Conversation
…n recording raw request.
|
This pull request enhances security by default by preventing sensitive authorization tokens from being recorded in detailed request logs. A new configuration flag, The core change involves refactoring the request logging logic into a new Files Changed Analysis
Architecture & Impact Assessment
Request Logging FlowsequenceDiagram
participant Client
participant Gateway as Tyk Gateway
participant Handler as Success/Error Handler
participant AnalyticsHelper as analytics_helper.go
participant AnalyticsDB as Analytics DB
Client->>Gateway: Request with Auth Header
Gateway->>Handler: Process Request
alt Detailed Recording Enabled
Handler->>AnalyticsHelper: getRawRequest(r, spec)
Note right of AnalyticsHelper: If allow_unsafe_detailed_logs is false
AnalyticsHelper->>AnalyticsHelper: obfuscateAuthorizationHeaders(r, spec)
AnalyticsHelper-->>Handler: Sanitized Raw Request
Handler->>AnalyticsDB: Store Sanitized Log
end
Handler-->>Gateway: Response
Gateway-->>Client: Response
Scope Discovery & Context ExpansionThis change is primarily contained within the gateway's analytics recording subsystem. The main impact is on the data persisted in the analytics database and any external systems that ingest these logs. Users relying on detailed logs for debugging authentication issues will now see However, the current implementation has a potential scope limitation:
Further investigation could involve a broader audit of the codebase for any other instances of request logging that might not use this new centralized and sanitized function. Metadata
Powered by Visor from Probelabs Last updated: 2026-07-21T12:07:24.179Z | Triggered by: pr_updated | Commit: 6c83b34 💡 TIP: You can chat with Visor using |
✅ Architecture Check PassedNo architecture issues found – changes LGTM. Performance Issues (1)
✅ Architecture Check PassedNo architecture issues found – changes LGTM. \n\nPerformance Issues (1)
No quality issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2026-07-21T12:07:20.467Z | Triggered by: pr_updated | Commit: 6c83b34 💡 TIP: You can chat with Visor using |
… Included new config var in schema
…ecorded-in-detailed-logs
…ecorded-in-detailed-logs
|
SentinelOne CNS Hardcoded Secret Detector SentinelOne CNS is a cloud-agnostic, agentless CSPM & CWPP solution that continuously detects and prevents vulnerabilities that have the highest probability of being exploited in Azure, AWS, Google Cloud, and Kubernetes. |
|


…n recording raw request.
Description
Related Issue
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
Ticket Details
TT-431
Generated at: 2026-07-21 12:06:21