Repository navigation
E21-33: the role provisioner's process, mandate-provisionerd (DEC-2350 S4b-2) - #2307
Closed
kunwarshivam wants to merge 4 commits into
Closed
kunwarshivam wants to merge 4 commits into
kunwarshivam wants to merge 4 commits into
Conversation
The provisioner over the Postgres control stream, written as mandate-deployd writes it, and the vault, logged in by AppRole as the provisioner and again every hour. A session near its token's end that no login replaced stops the process, failed, so it never calls the vault with a lapsed token. --fixture runs it over memory and a vault that keeps nothing, and a release build refuses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
…rocess Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5V2t72QcDywyLPViJtmFF
This was referenced Oct 22, 2026
Merged
Owner
Author
|
Closing as included: this head is an ancestor of #2311, which landed as 0b2c139 (DEC-77). Generated by Claude Code |
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.
Story
E21-33, DEC-2350 S4b-2: the process that runs #2306's
Provisionerin the cell. It is one PR, not a DEC-77 pair, in the shape of deployd's #1582, as the coordinator agreed. It is stacked on #2306 (baseclaude/v2-provisioner-impl,0b252923). It adds 882 lines, about 350 of them tests and theCargo.locklines; over the ~400 guideline, flagged.mandate-provisionerd run --workspace <id> --namespace <ns> --probe <socket> [--vault-address <a> --vault-dir <d> | --fixture], andprobe livez|readyz.MANDATE_JOURNAL_DSN), throughmandate-deployd's ownPgControl. Both processes writectl:<workspace>the same way: take the epoch, read the head, append. The alerts go throughStderrAlerts, a code and a runbook only.--vault-dir(ca.crt).Identity::Provisioner, withprovisioner.role-idandprovisioner.secret-idread throughread_mounted_credentials. They are read again at every login, so a rotated secret id is picked up.LEASE_SECS, a day. A refused re-login is retried after 60 s, not once a pass.Renewalstops using a sessionEXPIRY_MARGIN_SECS(300 s) before its day ends. That end is reckoned from the client's login time, which is never later than the vault's.role_provisioner_session_expiredand stops as failed, so it is restarted and logs in afresh. It never calls the vault with a stale token.RELOGIN_SECS < LEASE_SECS - EXPIRY_MARGIN_SECS.--fixture(the coordinator's condition):FixtureVaultthat keeps nothing.fixture_allowed(asked, cfg!(debug_assertions))refuses it in a release build, withfixture_not_built. That mirrors the stub issuer's release pin.FixtureVault, its module,MemoryControl's import and the fixture run itself are compiled only into debug builds.--namespace: a flag rather than read from the ServiceAccount file, so the chart (S4c) can switch off token automount for a pod whose only egress is the vault.mandate-provisionerdis at layer 10, abovemandate-deployd(8) andmandate-provisioner(9). Neither of those depends on the other, so reusingPgControladds no cycle. The forbidden list is the same as both.Spec clause → test
process::a_pass_that_could_not_finish_is_a_heartbeat_and_a_refused_record_stops_the_processprocess::the_session_is_renewed_hourly_and_a_refused_login_a_minute_laterprocess::a_session_near_its_tokens_end_is_never_usedprocess::a_release_build_refuses_the_fixtureprocess::a_vault_directory_without_the_ca_or_the_credentials_refuses_the_start,binary::a_vault_directory_without_the_ca_refuses_the_startprocess::the_fixture_vault_makes_and_removes_every_rolebinary::without_a_probe_socket_a_workspace_a_namespace_or_a_vault_the_process_refusesbinary::the_process_answers_its_probes_and_drains_on_sigterm,binary::a_probe_with_no_process_behind_it_fails_and_an_unknown_probe_is_refusedDependencies
None new. It uses workspace crates,
secrecy(already registered; it holds the mounted CA as read) andtokio.Journal events added
None. The provisioner's §9.33 records are S3's.
Not done
role-provisionerprocess, vault-only egress, the AppRole Secret mount, and no ServiceAccount token.stub-release. The refusal is unit-tested and the fixture is compiled out, so a separate CI job would only re-prove the build profile. I can add it if wanted.Decisions needed
None.
Safety checklist (safety-critical changes)
main.rs, ES-05)unwrap,expect, or panics on trading pathsx-plannedor(planned: ...)marker added to a value the code already serves, or a reviewer signed it off (DEC-683)Checks
cargo xtask ci lintagainstclaude/v2-provisioner-impl: green.cargo xtask ci mutantsagainstclaude/v2-provisioner-impl: 30 tested, 25 caught, 5 unviable, 0 missed.cargo clippy --release -p mandate-provisionerd --all-targets -- -D warnings: clean.cargo nextest run -p mandate-provisionerd: 10 passed.Generated by Claude Code