feat: new authentication scheme and upstream server whitlisting - #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: Advanced 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 |
|
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. Fixed in stacked PR #152 to fix CI. |
|
|
||
| 3. In `backend/app/schemas/guardrail_config.py`, add the newly created config class to `ValidatorConfigItem`. | ||
|
|
||
| # test |
| #2. A JSON-encoded array string like '["1.2.3.4","5.6.7.8"]' | ||
| # (some env/deploy tooling JSON-encodes list-valued env vars) → parses it with json.loads. | ||
|
|
||
| def parse_ip_list(v: Any) -> list[str] | str: |
There was a problem hiding this comment.
can we fail at bootup if IP list is invalid instead of returning error
There was a problem hiding this comment.
if ENV=production and ALLOWED_IPS="", guardrails will fail at boot up.
8d697aa to
27306d4
Compare
Summary
Target issue is #140
Each request should include a bearer token plus X-ORGANIZATION-ID/X-PROJECT-ID headers (set upstream).
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