fix(auth): reserve ingest attribution for write scope - #370
Merged
Conversation
An ingest-scoped browser credential may upload a document but must not be able to assert another caller as its immutable creator. Gate trusted-principal headers on full write authority, document the boundary, and exercise both narrow refusal and write compatibility over signed HTTP requests.
Address every LOW finding from OPUS round 1. Make perimeter presence explicit at ingest composition, pin shared-secret compatibility with a real HTTP proof, split attribution from route-scope behavior, and align canonical and operator documentation with the full-write authority rule.
Address every LOW finding from OPUS round 2. State the presenting-credential rule at the canonical decision and OpenAPI source, remove stale per-caller wording, and make the composition flag required so a future call site cannot omit the fail-closed choice.
Address every LOW finding from OPUS round 3. Qualify the no-auth trusted-network path, state ingest/read disjointness precisely, restore the design rationale, use the canonical amendment form, and align the test module's stated scope.
Put the trusted-principal explanation beside its setting and name the exact operator control in public docs. Clarify that narrow credentials lose only their attribution headers while their upload still succeeds.
State that ingest credentials cannot create any attribution, including self-attribution, and enumerate the read-scoped operation and connector listing routes.
fazpu
force-pushed
the
fix/ingest-principal-authority
branch
from
September 3, 2026 17:48
6e106a1 to
c7213af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
OPUS review of #363 identified that a narrow browser
ingestcredential could still assert arbitrary immutableX-Ingest-Principal-*attribution whentrusted_principal_sourcewas enabled. D62 permits that browser to upload directly, but does not grant it authority to nominate another principal.What this does
writescope, in addition to the trusted network setting, before ingest attribution headers are acceptedreadscope wording noted in the same reviewHow verified
uv run lint-importsuv run ruff check src/ benchmarks/uv run ruff format --check src/ benchmarks/uv run pyright src/ benchmarks/uv run python scripts/export_openapi.py -o openapi.jsonand committed the regenerated security descriptiontest_backfill/test_clustering; split CI lanes are authoritativeDocs
The configuration page and ingest-principal design now state that narrow credentials cannot assert immutable principal attribution.
Contributor agreement