Skip to content

feat: limit auth deps to bearer token and ip allowlist - #139

Open
Prajna1999 wants to merge 13 commits into
mainfrom
feat/auth-authz-with-backend
Open

feat: limit auth deps to bearer token and ip allowlist#139
Prajna1999 wants to merge 13 commits into
mainfrom
feat/auth-authz-with-backend

Conversation

@Prajna1999

@Prajna1999 Prajna1999 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.
  • If you've fixed a bug or added code that is tested and has test cases.

Notes

Please add here if any other information is required for the reviewer.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: d6675af8-7a50-4d67-9af1-e8c7a5b9d87a

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/auth-authz-with-backend

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Prajna1999
Prajna1999 marked this pull request as ready for review August 17, 2026 03:45
@Prajna1999

Copy link
Copy Markdown
Contributor Author

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

@Prajna1999

Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant