Repository navigation
The shared secret is transport, not authorisation - #20
Open
sumerjohal wants to merge 3 commits into
Open
sumerjohal wants to merge 3 commits into
sumerjohal wants to merge 3 commits into
Conversation
AR2_INTERNAL_SHARED_SECRET opened GET /list-artifact/{list_id} and
GET /list-artifact/{list_id}/traceback with no credential and no MEAL entry
(review ledger AG-076). Pancake, which holds the same secret, treats the
header as transport only: its holders route still demands an authority
credential and still logs. The two services disagreed about what the secret
means, and AR2 had the weaker reading.
What the secret must open: one read of a lot's members, which Pancake makes
to mint a grant for the lot's owner before any grant exists. That read is
kept, and is now written to the ledger as list.read.internal, with the hub
subject Pancake forwarded, before the members are returned. If the ledger
cannot be written the members are not disclosed.
What it need not open: the trace-back walk. No service called it with the
secret. The bypass is removed and the route takes a credential only.
Tests: app/tests/test_internal_secret.py, eight tests. The trace-back
control and the ledger control fail against the previous code; each has a
sibling showing the same check fires on a real answer. One existing test
that read members internally now captures the ledger write.
stomata run: 12/12. Suite: 180 passed, 1 xfailed (was 172). Lint: 36, unchanged.
Co-authored-by: Cursor <cursoragent@cursor.com>
…popping it Other modules install theirs at import time; popping left later modules running against the real dependency. Surfaced by the same pattern in #21. Co-authored-by: Cursor <cursoragent@cursor.com>
…tRequest credential_id is a required string there; the packet carried None and the e2e workflow's Pancake answered 422, which AR2 correctly turned into a 503 and a refused read. The string now says there was no credential rather than inventing one. The unit test asserts the four required fields are strings, naming the Pancake schema it mirrors. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
CI's e2e job caught a contract mismatch on the first push: Pancake's |
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.
What
AR2_INTERNAL_SHARED_SECRETopenedGET /list-artifact/{list_id}andGET /list-artifact/{list_id}/tracebackwith no credential and no MEAL entry (review ledger AG-076). Pancake, which holds the same secret, treats the header as transport only: its holders route still demands an authority credential and still logs. The two services disagreed about what the secret means, and AR2 had the weaker reading.Change
Kept, and audited: the secret still opens one read of a lot's members. Pancake makes that read to mint a grant for the lot's owner (
grants.py,fieldlists.py), before any grant exists, so it cannot present one. The read is now written to the ledger aslist.read.internalwith the hub subject Pancake forwards, before the members are returned. If the ledger write fails, the members are not disclosed (503).Removed: the secret no longer opens trace-back. No service called it that way (checked Pancake:
audit.py,fieldlists.py,grants.py); the walk takes a grant or an authority credential only.MCP
trace_backwrapper no longer passes the internal header.docs/MCP_SURFACE.mdregenerated (no textual change).Tests
app/tests/test_internal_secret.py, eight tests:test_the_secret_does_not_open_trace_backfails againstmain(returned the walk, no ledger entry); its sibling returns the same lot's fields with a credential, so the control refuses a real answer.test_the_secret_reads_members_and_the_read_is_in_the_ledgerfails againstmain(no entry);test_the_ledger_write_happens_before_the_members_are_returnedshows fail-closed.harness/bin/stomata run: 12/12. Suite 180 passed, 1 xfailed (was 172). Lint 36, unchanged.Operator note
After this merges, every Pancake grant issuance writes one
list.read.internalevent to Pancake's/audit/events. That is the point. If Pancake's audit route is down, grant issuance fails rather than proceeding unrecorded.Independent of #19; the two touch different routes in
traceforward.pyand merge in either order. Review finding A2, 2026-10-08.