Repository navigation
feat(bep): inject store values in bep serve (T67) - #2597
Conversation
BoxRedeemer now overrides redeem_reference. An admitted store member is given to the forwarder as Redeemed::Store, with the store, identifier and injection form, so the forwarder reads the value per request. A store member is judged against the handle's upstream and the current rule's authorities. Any other value outside Authorization is still refused as sealed_header_misplaced before it is decided. Each flow bep serve builds now reads from the host store. The redeemer takes its [secret-store-rules] through with_rules. bep serve passes none until T25 reads them.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to Gatehouse §6.10 line 849 step 4. The redeemer decides a store member against the handle's upstream and the current rule. The forwarder checks placement before it reads the store, and the audit names store:id and never the value. The read happens in the BEP process for each request, as lines 831 and 844 require. No store member is admitted in production until T25 (#2280) wires with_rules in main.rs. That issue is the filed residual, and it also owns the proof through Proxy::serve.
Ruled at 90e36f4 against gominimal/arch@109541a48c31 by claude-opus-5-5.
There was a problem hiding this comment.
Own review at 90e36f4: the override keeps the header check ahead of the sign-in decision and decides a store member before it, the bound and current sets for a store member come from the handle and its rule, and the forwarder reads the value per request. The serve path still never gives the redeemer any [secret-store-rules], so BEP-032 is not reached end to end. That gap and the interim notes that still name closed #2280 are filed as residual #2599. Merging with the residual filed.
Generated by Claude Code
|
/revise Round on #2597 after a merge conflict at 90e36f4. No round is in flight. #2583 (T33) landed on main and changed the
Generated by Claude Code |
|
That What the platform saidcould not start the coder: Error: there is no container instance that can be provided to this durable object Nothing to type again: the command gets a rocket when its round starts, or a refusal that names the reason. No round was counted for it yet. |
Resolve the facts doc in crates/bep/src/redeemer.rs: keep the restored revocations sentence from main (T33) and this branch's store paragraph, which now points at #2599.
|
A merge of main before round 1, not counted against the cap (1 of 3), pushed as Resolved conflicts in:
Verify Outside the task's
Converted to a draft: something above needs a person before review. The branch now merges main cleanly. The facts doc in crates/bep/src/redeemer.rs keeps main's sentence about restored revocations (BEP-068) and this branch's store paragraph, which now points at #2599. A store rule aimed at a GitHub host or the Host header is still refused by name when the configuration is read, and the boxes tests pin that. Notes from the agent: This was a conflict round only. I merged origin/main and resolved the one marker in crates/bep/src/redeemer.rs as the directive asked. I dropped the 'empty at start until T33 (#2290)' sentence, kept main's with_revocations sentence, and pointed the store paragraph at #2599 in place of #2280. I changed no behaviour. The other merged paths (Cargo.lock, audit.rs, main.rs, revoke.rs, store.rs, box_audit.rs, secret.rs, minvmd) came from main and merged without conflict. The PR branch is T67, and task.md holds T25. I ran the T25 boxes test lines too, and all of them pass. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The compare is a merge of main. It changes only doc comments in this PR's files. The PR's code is the same as on 90e36f4, so the PASS on that head stands. BEP-032 conforms to Gatehouse §6.10 line 849. The store rules in bep serve stay open as residual #2599.
Ruled at bed6883 against gominimal/arch@109541a48c31 by claude-opus-5-5.
…re-values-in-bep-serve # Conflicts: # crates/bep/src/forward.rs # crates/bep/src/redeemer.rs
…re-values-in-bep-serve
|
A merge of main before round 1, not counted against the cap (2 of 3), pushed as Resolved conflicts in:
Verify Outside the task's
Converted to a draft: something above needs a person before review. A store rule aimed at a GitHub host or the Host header is refused by name when the configuration is read. The tests that pin this pass at the branch head after the merge with main. Notes from the agent: This round resolved the merge conflict with main only. The conflicts were in crates/bep/src/forward.rs and crates/bep/src/redeemer.rs. The branch adds store references (Facts.kind, the BoxRedeemer::redeem_reference override, store_decision). Main adds the handle jti for the audit record (Facts.jti, redeem_with_jti, a redeem_reference return type of (Redeemed, String)). The resolution keeps both. BoxRedeemer::redeem_reference now returns (Redeemed, String) and gives the jti for store and sign-in decisions. A misplaced sealed header gives an empty jti, as the trait default on main does. Main had an 'Interim' doc note on Redeemer::redeem_reference about #2586. I removed it, because this branch is the change that the note waits for. cargo clippy -p bep --all-targets is clean, and cargo nextest run -p bep passes 213 tests. The task.md for this round describes T25, but this branch is the T67 branch (inject store values in bep serve). The T25 tests already exist on main, and they pass here. The merge commit touches no file outside crates/bep. The merged-in files from main are not edits of this round. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The compare to this head is two merges of main. The store path in redeemer.rs now carries the handle jti, and it keeps the same placement as before. Gatehouse §6.10 lines 844 and 849 still decide the change, and BEP-032 conforms. The end-to-end wiring of [secret-store-rules] in bep serve stays open as #2599.
Ruled at a7ff760 against gominimal/arch@109541a48c31 by claude-opus-5-5.
There was a problem hiding this comment.
Own review at a7ff760. The merge with #2596 keeps both changes. BoxRedeemer::redeem_reference returns (Redeemed, String) and gives the handle jti for store and sign-in decisions. A misplaced sealed header gives an empty jti, as the trait default on main does. The header check still comes before a sign-in decision. Residual #2599 holds the bep serve store-rule wiring.
Generated by Claude Code
There was a problem hiding this comment.
Babysitter approval at a7ff760: every merge gate passes at this head (arch PASS at a7ff760, zero open threads, every lane aggregator green). Squash title feat(bep): inject store values in bep serve (T67) and the squashed message pass commitlint. Queued for squash merge.
Generated by Claude Code
T67 — Inject store values in bep serve
slice: S10
kind: task
covers: BEP-032
size: M
est: 120 code, 160 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: an admitted store reference that the serve path cannot read is refused as
store_item_unreadableinmin box audit, never forwarded without the keyobservability: one debug line per store injection naming the store and identifier, never the value
layers:
- redeem:
- crates/bep/src/redeemer.rs:
BoxRedeemeroverridesRedeemer::redeem_referenceand returnsRedeemed::Storefor an admitted store member (Gatehouse §6.10 line 849, redemption step 4), with theheadercheck still beforeredeemruns- crates/bep/src/proxy.rs: the
bep servepath callsFlow::with_store(Arc::new(HostStore))where it builds eachFlow- crates/bep/src/forward.rs: the two interim notes on
redeem_referenceandwith_store(#2586) are removedtest: cargo nextest run -p bep serve_injects_a_stored_key_for_an_admitted_store_member
produces: none
consumes: none
proof: A box's request to a store rule's registered upstream leaves
bep servewith the stored key in the registered form, and the box never holds the key.depends on:
- blocked by #2257
- blocked by #2292
Proof
A test shows a box's request to a store rule's registered upstream (api.openai.com) going through BoxRedeemer and the forwarder. The request leaves with
authorization: Bearer <stored key>, and the sealed value is gone. The box holds only the sealed value. The audit record nameskeychain:openaiand never the key. Each Flow that bep serve builds now reads values from the host store. On a host that cannot read the store, the request is refused asstore_item_unreadable, and nothing is forwarded.Notes from the agent: 1) The production path is not live end to end yet. bep serve (main.rs) still gives BoxRed 8000 eemer no store rules, and it does not admit store authorities at CONNECT. Both wait for T25 (#2280). So I added
BoxRedeemer::with_rules(default: no rules), and the test uses it. main.rs is outside the layers, and I did not change it. Its interim warning about #2280 is still correct.2) The test drives BoxRedeemer plus Flow::forward_requests with a MemoryReader store. It does not go through the TLS Proxy::serve harness, because that harness's upstream certificate and CA union cover GitHub hosts only. The proxy.rs change is one line:
.with_store(Arc::new(HostStore))where serve builds each Flow.3) In facts(), a store member now gets the handle's
upstreamas the bound set and the current rule's authorities as the current set, which is what redeem.rs documents. A sign-in member keeps the module host sets.4) redeem_reference opens the value once to learn its member kind. A non-store value outside Authorization is then refused as sealed_header_misplaced before decide, and before any sign-in read or renewal. The store member's placement check stays in the forwarder (inject_store).
5) I added a second test, serve_refuses_an_unreadable_store_member (not macOS). It covers the diagnostics line: HostStore off macOS gives store_item_unreadable in the audit. The full bep suite passed (201) after the last change, and clippy -p bep --all-targets is clean. I …[truncated]
Tests
cargo nextest run -p bep serve_injects_a_stored_key_for_an_admitted_store_memberVerify
min task run agent-verifypassed ([tasks.verify]).Layer exception
None needed. The merge round at bed6883 listed
crates/bep/src/forward.rs,proxy.rsandredeemer.rsas outside the task's layers because it read T25's task file (its notes say so). Those three files are T67's layers in #2586, so the change stays in layer.Residuals
bep servegives the redeemer no[secret-store-rules], so BEP-032 is not reached end to end; the interim notes naming closed T25 — Read client-owned store rules and refuse rules in the deny set #2280 move there.Closes #2586
Generated by Claude Code