docs(rfc): rfc 0026 authn/tenant binding + rfc 0027 mcp query surface - #374
Conversation
Two drafted designs for the exposure workstream: 0026 closes the RFC 0003 §9 open question (bearer tokens on both listeners; identity constrains — never replaces — attribute-derived tenancy; rejection before the WAL ack) and 0027 layers an agent-facing MCP read surface on the querier, gated on 0026. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds two new RFC documents: RFC 0026 defining bearer-token authentication and tenant binding for ingest and query, and RFC 0027 defining an MCP read-only query surface gated by RFC 0026 auth. The docs SUMMARY.md index is updated to link both. ChangesRFC documentation additions
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Pull request overview
Adds two new drafted RFC design documents for the “exposure” workstream: (1) introducing bearer-token authentication with tenant binding for ingest + query, and (2) defining an MCP (Model Context Protocol) read-only query surface layered on the existing querier API and explicitly gated on the authn work.
Changes:
- Add RFC 0026 detailing static bearer-token authn plus token-to-tenant allow-list enforcement for both ingest and query.
- Add RFC 0027 specifying an MCP server endpoint (
/mcp) exposing typed, agent-facing read tools over the querier, gated on RFC 0026. - Update the docs book summary to include RFC 0026 and RFC 0027.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/SUMMARY.md | Adds RFC 0026 and RFC 0027 to the documentation index. |
| docs/rfcs/0026-authentication-tenant-binding.md | Drafted RFC describing authn and tenant-binding enforcement design for ingest + query. |
| docs/rfcs/0027-mcp-query-surface.md | Drafted RFC describing an MCP query surface hosted on the querier listener, gated on RFC 0026. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/rfcs/0026-authentication-tenant-binding.md`:
- Around line 108-111: Clarify the query-path status code contract in the RFC so
it matches the behavior in querier logic: missing or empty x-ourios-tenant
should be documented as a 400, while only a provided tenant that is not in the
token’s allowed set should be a 403. Update the wording around the HTTP query
API rule to separate these cases clearly, and align the description with the
behavior implemented in querier.rs and the relevant tenant-binding checks.
In `@docs/rfcs/0027-mcp-query-surface.md`:
- Around line 71-73: Clarify the interval semantics for template_drift by
stating whether the from/to bounds are inclusive or half-open in the RFC entry
for that query surface. Update the description near template_drift to make the
boundary rule explicit using the existing query name and argument names (tenant,
from, to), so implementers know exactly how to interpret the range.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b073f810-1148-4b6b-ae9f-bcb993f0a3e4
📒 Files selected for processing (3)
docs/SUMMARY.mddocs/rfcs/0026-authentication-tenant-binding.mddocs/rfcs/0027-mcp-query-surface.md
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two
drafteddesigns (§§1–4 + 7–8 per the lifecycle) for the exposure workstream:RFC 0026 — Authentication & tenant binding. Closes RFC 0003 §9 and RFC 0016's deferred authn: static bearer tokens via the RFC 0020 config (
${env}indirection), enforced on both OTLP listeners and the query API. The authz core: each token carries an allowed tenant set; ingest keeps attribute-derived tenancy (§6.3 unchanged) but the derived tenant must fall in the token's set, rejected before the WAL ack; query validatesx-ourios-tenantagainst the same set, composing with (never replacing) the structural partition scoping. No-auth-section = today's open mode with a startup warning.RFC 0027 — MCP query surface. Agent-facing read tools (
query_logs,list_templates,template_drift+ the DSL grammar as a resource) over the querier's existing machinery; streamable HTTP at/mcpon the existing listener, module in ourios-server (no new crate), default off. Read-only, no SQL escape hatch (hazard §4.6), and implementation gated on RFC 0026. Documents the returned-log-bodies-are-untrusted-text hazard for LLM consumers.Sign-off order when you're ready: 0026 first (0027's gate).
🤖 Generated with Claude Code
Summary by CodeRabbit