feat(evidencectl): bind local task-grant and first-party exchange clients to the borrowed issuer - #1068
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
jeremi
force-pushed
the
feat/evidence-dev-exchange-client-bindings
branch
from
September 14, 2026 17:56
117b245 to
81231a3
Compare
An Evidence access policy may name an institutional task grant: the requester clients, the grant source issuer, and the selector bindings read from the exchanged token. A local session registers those clients against the borrowed BREG issuer owner as institutional exchange clients with their declared bootstrap scope. A borrowed bundle already names the machine clients it admits. It now also states the owner's per-client assertion pairing in `authentication.assertionIssuers`, derived the way the owner's BREG runtime derives its own from the exchange connections that list each client. An Evidence client the owner registered as an exchange client is admitted only with a declared exchange binding whose source authorities that pairing names; without one it is still refused. The owner's pairing is re-read before the session starts and must match the compiled one. Security-sensitive: authorization. Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
An active Evidence client may declare a signed first-party context exchange: one bootstrap scope, its resource, and the exact trusted issuer of the signed context. A local session borrowing a BREG issuer owner registers that client as a first-party exchange client, and refuses a client that is both a task grant requester and a first-party exchanger. Startup requires the owner to register the client against a `first_party` connection for that issuer and to pair the client with it, so the borrowed bundle's `assertionIssuers` names the authority. Security-sensitive: authorization. Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
…sing Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
jeremi
force-pushed
the
feat/evidence-dev-exchange-client-bindings
branch
from
September 15, 2026 02:05
81231a3 to
a2e7c52
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.
Summary
Evidence dev sessions that borrow a BREG issuer owner can now serve institutional task-grant and first-party exchange clients. Before this change, a local Evidence gateway refused any client the owner had registered as an exchange client, so a composition with an assistant acting under a Casework task grant could not read Evidence.
evidencectlaccess policies may declare an optionaltaskGrant(kind, exactsourceIssuer, activerequesterClients, per-question selectorbindingsto verified token claims). The compiler emits authenticated-grant origins and binds the policy tag to the full grant semantics.evidencectl access client addgains--grant-bootstrap-scope/--grant-bootstrap-resourcefor institutional exchange clients and--first-party-bootstrap-scope/--first-party-bootstrap-resource/--first-party-issuerfor first-party context exchange clients. The two modes are mutually exclusive; clap enforces the first-party flag set as a whole.authentication.assertionIssuers, derived the same way the owner's BREG runtime derives it from the exchange connections that list each client. An owner-registered exchange client is admitted only with a declared binding whose source authorities that pairing names. The owner's pairing is re-read at startup and must match the compiled bundle.Owning area:
crates/registry-evidencectl,crates/registry-evidence-authoring, and theevidencectlreference page.Checks
cargo fmt --all -- --checkcargo test --locked -p registry-evidencectl -p registry-evidence-authoring(all pass). New coverage incrates/registry-evidencectl/tests/access.rs(flag combinations and persistedexchangedocuments that must not publish a client) and indev.rs/authoring.rsunit tests: compiledassertionIssuersemission, owner pairing that no longer matches the bundle, an unpaired task source authority, exchange clients without a declared binding, andclient_task_sources(unassigned requester, institutional binding without a task policy, task requester using first-party exchange, requester without a binding, binding without a borrowed owner).cargo clippy --locked -p registry-evidencectl -p registry-evidence-authoring --all-targets -- -D warningscheck:cli-reference: the newaccess client addoptions and constraints were reviewed against the catalog onmain, and the review record now carries their digests.Notes
Security-sensitive: authorization (local dev composition only; no server runtime change).
verify_borrowed_registrationsand the pairing derivation incrates/registry-evidencectl/src/dev.rs, andActiveClientExchange::validateinaccess.rs.assertionIssuersmap applies no pairing rule, which is why the borrowed bundle must state the owner's pairing rather than leave it empty.access/clients/*.yamlgains an optionalexchangeobject; documents without it are unchanged.DCO
Signed-off-bytrailer.