feat: add username to possible auth header#54
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAuthorizationResponse adds a Username field. EnvSubst gains an overrides map parameter and now prefers overrides over environment variables, leaving unknown placeholders intact. main.go updates EnvSubst calls: passthrough/basic paths pass nil; non-passthrough passes overrides with REQUEST_USERNAME set from AuthorizationResponse.Username and logs backend headers after substitution. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant P as Filter Proxy
participant A as Auth Service
participant B as Backend
C->>P: Incoming request
P->>A: Authorize(request)
A-->>P: AuthorizationResponse { Username }
note over P: Build backend headers\nFor each value: EnvSubst(value, overrides)\n- passthrough/basic: overrides = nil\n- non-passthrough: overrides = { REQUEST_USERNAME: Username }
P-->>B: Forward request with substituted headers
B-->>P: Backend response
P-->>C: Return response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (2)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
50b8ca4 to
ef51441
Compare
This change allows system administrators to pass an additional header to the backend containing the username of the requester.
Summary by CodeRabbit