feat: limit auth deps to bearer token and ip allowlist - #139
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…h-backend' into feat/auth-authz-with-backend
|
directly — correct for today's direct-connection deployment, and the doc explicitly flags this breaks the moment a load balancer/reverse proxy sits in front (every request would then appear to come from the LB's IP, silently defeating the allowlist rather than failing loudly). [follow-up] Worth a monitoring/alert plan for "is this still a direct connection" before any infra change, since the failure mode . Note for self @Prajna1999 |
|
For CI failure https://github.com/guardrails-ai/guardrails/blob/main/HUB_UPDATE.md and tl;dr: Guardrails validators are moving to standard PyPI packages you install directly with pip, and Guardrails is discontinuing its hosted remote inferencing. See How to Migrate for what to do. Hard cutoff: August 25, 2026. Hence the CI failure unable to pull guardrails validators from hub.guardrails.ai |
Summary
Target issue is #140
This replaces two inconsistent auth mechanisms (a query/body-supplied tenant + shared bearer token, and a per-request callback to kaapi-backend's /apikeys/verify) with a single model: trust one caller (kaapi-backend) via IP allowlist + static bearer token, and take the tenant from X-ORGANIZATION-ID/X-PROJECT-ID headers instead of letting the caller pick it via query/body.
Checklist
Before submitting a pull request, please ensure that you mark these task.
fastapi run --reload app/main.pyordocker compose upin the repository root and test.Notes
Please add here if any other information is required for the reviewer.