Skip to content

E21-32: the executor writes its account's fingerprint at connect (DEC-2345, F3c) - #2288

Merged
kunwarshivam merged 224 commits into
mainfrom
claude/v2-vault-fingerprint-connect-impl
Oct 23, 2026
Merged

kunwarshivam merged 224 commits into
mainfrom
claude/v2-vault-fingerprint-connect-impl

Conversation

@kunwarshivam

@kunwarshivam kunwarshivam commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Story

E21-32 (claim #1442), F3c of DEC-2345 item 7: the implementation half of the DEC-77 pair whose tests are in #2287. Connections spec §3.1, §5.2 step 5. Decisions: DEC-2345, DEC-2339.

Stack: #2287, then #2275, with F3b-2 (#2283) merged in.

The diff is +5/−54:

  • It replaces fingerprinted's stub body. The fingerprint and reference are now encoded in encode_entry's form and created at the request's SecretPath::Fingerprint.
  • It deletes the five #[ignore = "pending E21-32"] lines.
  • It deletes the five behaviour-only rows.

Spec clause → test

As in #2287. Every one of its pending tests now runs and passes.

Dependencies

None.

Journal events added

None.

Not done

As in #2287.

Decisions needed

None.

Safety checklist (safety-critical changes)

  • No floats in money or quantity paths
  • No clock reads or randomness in the core
  • No unwrap, expect, or panics on trading paths
  • Ordering: inputs processed in journal order
  • Replay: same inputs give identical outputs
  • No secrets or trading content in logs or notifications
  • No x-planned or (planned: ...) marker added to a value the code already serves, or a reviewer signed it off (DEC-683)

Checks

  • mandate-executord and mandate-connections: 268 passed, 0 skipped.
  • Mutants pass: MANDATE_BASE_REF=origin/claude/v2-vault-start-wait-impl cargo xtask ci mutants, run against the live dev OpenBao (MANDATE_OPENBAO_REQUIRED=1). It covered mandate-vault, mandate-executord and mandate-connections, so F3b-2 and F3c together: 61 mutants, 42 caught, 19 unviable, 0 missed, 0 timeouts.
  • Review agent report attached

🤖 Generated with Claude Code

https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF

claude added 30 commits October 19, 2026 16:54
…s policy and its role requests, tests pending (DEC-2060)

Reserves DEC-2060. Each per-connection process logs in with Kubernetes auth as
the ServiceAccount named by its connection id's hex; one templated policy per
kind reads the path from the login's own ServiceAccount name, so the dedicated
provisioner only ever creates a role bound to exactly that ServiceAccount, every
other parameter pinned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…s policy and its role requests (DEC-2060)

Implements the stubs and deletes the pending markers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…s ServiceAccount named x and the hex (DEC-2060)

A separate exchange namespace would leave its pods outside the workspace's
default deny, egress policies and admission pin. A second spike on OpenBao
2.7.1 showed a literal x before the template within one path segment works:
the executor, SA <hex>, reads connections/x<hex>/token, which the exchange, SA
x<hex>, writes; each role binds its one SA, and an even-length hex name is never
an odd-length x name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
… hex (DEC-2060)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…espace is the workspace's (DEC-2060)

So OpenBaoConfig names every mount the login and the provisioner use, from one
place, and no second layout can disagree with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
# Conflicts:
#	crates/mandate-vault/src/kubernetes.rs
#	crates/mandate-vault/src/tests/kubernetes.rs
…n's reader, tests pending (DEC-2060)

The contract agreed with lane LV: OpenBaoSource::login_kubernetes(config,
identity, jwt, now) for a connection's executor or token exchange, and
mounted::read_service_account_token(dir) with SERVICE_ACCOUNT_TOKEN_DIR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…nctions, tests pending (DEC-2060)

So the role and ServiceAccount checks are tested and mutated without a cluster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…n's reader (DEC-2060)

Implements the stubs and deletes the pending markers. read_mounted and the
token reader share one bounded, link-safe read, differing only in the mode bits
they refuse and their bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…nd the cross-contract tests, pending (DEC-2060)

kv_path and openbao_policy become fallible so kv_path can place a
connection's entries through connection_segment, a stub here. The pending
tests pin the segment, roles named by their ServiceAccount (OpenBao folds
role and policy names to lowercase), every role parameter required, a
malformed accessor refused, and a cross-contract test: each kind's policy
with its bound ServiceAccount put in is exactly the policy written from
kv_path, over ids that collide under a raw or case-folding layout. The
process-name test reads processes.json. DEC-2060 is written in full.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…d by their ServiceAccount (DEC-2060)

Merges PRV-1a's pending tests and implements them: connection_segment is
x and the id's hex, and kv_path stores every connection's code and token
under it, so the templated policies reach exactly what every writer and
reader uses. service_account_name gives the exchange that same segment.
Roles are named by the ServiceAccount, since OpenBao folds role names to
lowercase. The provisioner's policy requires all eight parameters, and
an accessor that is not one plain segment is refused. The cell's vault
drill reads the stored segments, written out by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…ceAccount, tests pending (DEC-2060)

OpenBao folds role names to lowercase, so PRV-1 names each role by its
ServiceAccount; the login's path and its verdict follow, with an Ab case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…ceAccount (DEC-2060)

Merges PRV-2a; kubernetes_login_path gives the ServiceAccount name as the
role, and the verdict follows it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…oyment manager makes the ServiceAccounts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…d a missing role is its own refusal, tests pending (DEC-2060)

SourceError::RoleMissing (role_missing, not an outage) lets the token
exchange's login wait for a role the provisioner has not made yet, as
agreed with lane D1; kubernetes_login_refusal is that mapping, a stub.
provision takes an optional KubernetesAuth and, given one, sets up both
Kubernetes mounts and their templated policies through stubs
kubernetes_mount_requests, mount_accessor and provision_kubernetes. A
server test pins the result on the dev server, a missing role included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…d a missing role is its own refusal (DEC-2060)

provision, given a KubernetesAuth, enables each Kubernetes mount the
vault's sys/auth does not list, points it at the API server, and writes
each kind's templated policy keyed by its mount's accessor. A Kubernetes
login reads a refusal's body only to tell RoleMissing from the rest, and
wipes it like every other body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…'s code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
# Conflicts:
#	crates/mandate-vault/src/kubernetes.rs
#	crates/mandate-vault/src/openbao.rs
#	crates/mandate-vault/src/tests/kubernetes.rs
#	crates/mandate-vault/src/tests/openbao.rs
…ogin is held to the workspace's namespace, tests pending (DEC-2061)

Access::Take is a new access that only a connection's token exchange holds,
on its own connection's code, granted only by its Kubernetes-auth templated
policy as update without create; the AppRole policies never grant it.
login_kubernetes gains namespace, checked by kubernetes_namespace_verdict
(a stub), and read_service_account_namespace (a stub) reads the downward
API's namespace beside the projected token. DEC-2061 is written in full
and infrastructure §5.2's token-exchange row names the take. Three tests
that widen implemented tables are behaviour-only rows until PRV-2c-2b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…or its Kubernetes login

login_kubernetes now takes the workspace's namespace; #2009's executor
reads it from the projected volume with read_service_account_namespace,
so no pod names its own namespace in its arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
… and read the executor's namespace before it dials

The pending gate names a test by its path inside its file, so each row's
test is the bare function name. The executor reads its namespace before
vault_login, as LV asked, so an unreadable one is
vault_credentials_unreadable and nothing dials without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…not never update at all

The connection manager's AppRole grant paths rightly carry update, so the
check is over the KV data paths only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…count entry, tests pending (DEC-2345)

Review hardening: with the fingerprint first, a refused second create
leaves only the pseudonymous hash, never the raw account id. The tests
follow the order: a refused fingerprint create keeps no account id,
and a refused account create leaves the fingerprint alone. With the
stub first, the retry-after-crash test now stops at the stub too, so
it is pending with its own behaviour-only row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…lt-fingerprint-connect-impl

# Conflicts:
#	crates/mandate-executord/tests/oauth_check.rs
#	xtask/behaviour-only/mandate-executord__oauth_check__a_refused_account_create_leaves_only_the_fingerprint.toml
claude added 14 commits October 22, 2026 19:23
…error fails provisioning, test pending (DEC-2345)

Review F1, round 2: a failed GET of the key was read as missing, so
provisioning created over a key OpenBao kept unchanged, and an
exportable one was accepted unverified after one transient error.
key_needs_creating, stubbed here, reads only a 404 as missing, judges a
key that is there by the verdict, and passes every other refusal on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…error fails provisioning (DEC-2345)

F1 round 2's implementation: key_needs_creating creates the key only on
a 404 and verifies one that is there; any other refusal of the GET
fails provisioning. After a create, provisioning reads the key again
and verifies it, and it reads the transit mount again after mounting
it, so neither is ever taken unverified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…provisioning

The set-up posted the transit mount and the key without reading the
answers, so a mount not yet routable left no key, provisioning made a
fresh one, and the test saw Ok. Each step now retries until the vault
takes it, and the planted key is read back as exportable or deletable
before provisioning runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
A union, main's newer code kept: the manager's fingerprint operations through main's
ManagerFingerprints, the executor's hash through this branch's SecretSource::hmac_account on a
BrokerAccountId, the key check of review F1 round 2, both connection error codes, and main's
Following, whose agents the closed wait now reads. A revoked connection's risk exit is received,
as main's compromise revoke follows its agents (DEC-2343 item 1). Two establish tests still fail
against main's executor and are reported, not changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…dropped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
The executor's fold skips both this branch's ConnectionEstablished and main's PositionReleased.
With main's rule-13 fixes (DEC-2357, DEC-2358) the establishment tests pass unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
@kunwarshivam
kunwarshivam changed the base branch from claude/v2-vault-fingerprint-connect to main October 23, 2026 12:49
@kunwarshivam
kunwarshivam marked this pull request as ready for review October 23, 2026 12:51
SIGTERM alone and a stop code alone must each drain the run. The test edge now ends any run at a
pass bound with its own code, and the lease test checks its pass, so the || to && mutant in
serve's stopping is caught at once instead of timing out the mutation run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
The vault keeps main's provisioner_only beside this branch's typed SecretSource::hmac_account,
which replaces main's inherent copy as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
@kunwarshivam
kunwarshivam merged commit 42338d8 into main Oct 23, 2026
58 of 60 checks passed
@kunwarshivam
kunwarshivam deleted the claude/v2-vault-fingerprint-connect-impl branch October 23, 2026 15:02
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