fix: middleware for multi-tenant#1719
Conversation
- add `x-p-tenant` header only for multi-tenant deployment - extract tenant id from `x-p-tenant` (if api key user sends) or `intra-cluster-tenant` (prism forwards to queriers) - tenant id to default for single tenant deployment
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughTenant identification in AuthMiddleware now also falls back to the intra-cluster-tenant header (excluding DEFAULT_TENANT). Reinsertion of the TENANT_ID header after API-key session creation is now conditional on multi-tenant mode. In find_api_key_user, single-tenant lookups always use DEFAULT_TENANT rather than an optional tenant_id hint. ChangesTenant Header Resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
x-p-tenantheader only for multi-tenant deploymentx-p-tenant(if api key user sends) orintra-cluster-tenant(prism forwards to queriers)Summary by CodeRabbit