Skip to content

docs(rfc): rfc 0026 authn/tenant binding + rfc 0027 mcp query surface - #374

Merged
jensholdgaard merged 2 commits into
mainfrom
rfc0026-0027-drafts
Jul 5, 2026
Merged

docs(rfc): rfc 0026 authn/tenant binding + rfc 0027 mcp query surface#374
jensholdgaard merged 2 commits into
mainfrom
rfc0026-0027-drafts

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Two drafted designs (§§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 validates x-ourios-tenant against 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 /mcp on 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

  • Documentation
    • Added new RFC documentation covering upcoming authentication and tenant-based access controls.
    • Added new RFC documentation for a read-only MCP query surface for querying data.
    • Updated the RFC index to include the new entries.

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>
@jensholdgaard
jensholdgaard requested a review from Copilot July 5, 2026 14:47
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 10be521e-df54-4348-88f8-339a7279a1f8

📥 Commits

Reviewing files that changed from the base of the PR and between 28e3f0a and abe2dfa.

📒 Files selected for processing (2)
  • docs/rfcs/0026-authentication-tenant-binding.md
  • docs/rfcs/0027-mcp-query-surface.md
📝 Walkthrough

Walkthrough

This 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.

Changes

RFC documentation additions

Layer / File(s) Summary
RFC 0026: Authentication & tenant binding
docs/rfcs/0026-authentication-tenant-binding.md
Documents bearer-token auth config, ingest/query tenant enforcement before WAL append, telemetry/audit behavior, alternatives, acceptance criteria, and open questions.
RFC 0027: MCP query surface
docs/rfcs/0027-mcp-query-surface.md
Documents an MCP read-only query surface at /mcp, gated by RFC 0026 auth, covering tool set, output discipline, alternatives, acceptance criteria, and open questions.
Docs index update
docs/SUMMARY.md
Adds links to RFC 0026 and RFC 0027 in the RFCs list.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

  • jensholdgaard/ourios#259: RFC 0016 defines the querier HTTP endpoint with tenant scoping that RFC 0026 extends with bearer-token authentication and tenant binding.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the RFC changes, but it omits the template's Related and Checklist sections and doesn't use the required headings. Add the ## Related section and the checklist items from the template, and format the description with the repository's required headings.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the two RFC additions and their focus on auth/tenant binding and the MCP query surface.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc0026-0027-drafts

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/rfcs/0026-authentication-tenant-binding.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1a4db29 and 28e3f0a.

📒 Files selected for processing (3)
  • docs/SUMMARY.md
  • docs/rfcs/0026-authentication-tenant-binding.md
  • docs/rfcs/0027-mcp-query-surface.md

Comment thread docs/rfcs/0026-authentication-tenant-binding.md Outdated
Comment thread docs/rfcs/0027-mcp-query-surface.md Outdated
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants