flex-auth/examples/secrets-engine
tegwick dd3ce4c109
Some checks are pending
CI Smoke / host-smoke (push) Waiting to run
CI Smoke / container-smoke (push) Waiting to run
Build and Publish Container Image / build-and-push (push) Successful in 52s
Publish approval_binding_digest: a claim cannot name the request carrying it
secrets-engine confirmed T03, and re-verifying against the regenerated
destroy fixture found something neither repository can fix alone: a
pdp_digest recorded at issue time can never equal the request_digest of a
request that carries the claim in its context, because the claim is part
of the context that is hashed. Embedding the claim changes the very
digest the claim would need to name.

Not fixture staleness. It holds for every dual-control request whose
claim travels in context -- the shape GH-DEC-2026-008 had just ruled
mandatory. Left unresolved that ruling was unimplementable for exactly
the case it was written for, and destroy would have been permanently
un-allowable in production, failing closed forever on a check that could
never pass.

flex-auth owns the canonical request digest, so the fix is ours.
binding.approval_binding_digest is the same material with
context.approval removed, emitted only when a claim was carried. An
approval issued against a claim-free Check records that Check's
request_digest; the claim-bearing request reproduces it here.

DELIBERATELY ADDITIVE, and the reason matters. The tempting fix is to
drop context.approval from request_digest entirely. That is wrong:
request_digest is the replay identity, and two requests differing only in
which approval was presented must not share one, because their decisions
differ -- one allows, the other denies dual_control_required. Collapsing
them would let an allow obtained with a valid claim be replayed against a
request carrying none. So request_digest still covers the claim and still
moves; approval_binding_digest deliberately does not, and is documented
as not a replay identity. The tests assert the two functions DISAGREE on
a claim-bearing request, which is approval-engine's formulation of how to
defend a distinction that looks like duplication.

The fixture now demonstrates the property rather than asserting it: its
claim's pdp_digest equals the envelope's approval_binding_digest with
pdp_path true, and changing the claim's contents moved request_digest
while leaving approval_binding_digest untouched. Two files a consumer can
diff.

Also picked up approval-engine's new required binding.pdp_path via the
cross-repo schema test added yesterday -- which is the test doing exactly
what it was built for, one day later.

T03 is done. secrets-engine's own digest-material defect, which our two
real envelopes caught, is recorded in the workplan.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JTbVXpEiXA7mNJVpDnEPcB

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 412054@bnt-lap001
Assistant-Session: 3968fae1-8d59-4209-9bd6-c22594b8ab19
2026-09-06 14:52:33 +02:00
..
replay Publish approval_binding_digest: a claim cannot name the request carrying it 2026-09-06 14:52:33 +02:00
check_request_allow_destroy_dual_control.json Publish approval_binding_digest: a claim cannot name the request carrying it 2026-09-06 14:52:33 +02:00
check_request_allow_rotate.json Publish secrets-engine.catalog-lane.lifecycle v1 (FLEX-WP-0021 T01, T02) 2026-09-06 08:02:52 +02:00
check_request_deny_destroy_without_claim.json Publish secrets-engine.catalog-lane.lifecycle v1 (FLEX-WP-0021 T01, T02) 2026-09-06 08:02:52 +02:00
check_request_deny_revoke_not_an_action.json Publish secrets-engine.catalog-lane.lifecycle v1 (FLEX-WP-0021 T01, T02) 2026-09-06 08:02:52 +02:00
check_request_deny_unknown_subject.json Publish secrets-engine.catalog-lane.lifecycle v1 (FLEX-WP-0021 T01, T02) 2026-09-06 08:02:52 +02:00
policy_fixtures.yaml Publish approval_binding_digest: a claim cannot name the request carrying it 2026-09-06 14:52:33 +02:00
policy_package.md Publish approval_binding_digest: a claim cannot name the request carrying it 2026-09-06 14:52:33 +02:00
protected_system_manifest.yaml Publish secrets-engine.catalog-lane.lifecycle v1 (FLEX-WP-0021 T01, T02) 2026-09-06 08:02:52 +02:00
README.md Fix the destroy rule: it was written against an invented claim shape 2026-09-06 08:11:14 +02:00
registry_snapshot.json Publish secrets-engine.catalog-lane.lifecycle v1 (FLEX-WP-0021 T01, T02) 2026-09-06 08:02:52 +02:00
subject_manifest.yaml Publish secrets-engine.catalog-lane.lifecycle v1 (FLEX-WP-0021 T01, T02) 2026-09-06 08:02:52 +02:00

secrets-engine example

Policy package, manifests, and fixtures for secrets-engine's gated catalog-lane operations. Opened by FLEX-DEC-2026-005, carried by FLEX-WP-0021.

File What it is
policy_package.md secrets-engine.catalog-lane.lifecycle v1, allow_ttl: 15m
protected_system_manifest.yaml the secret-catalog-lane resource type and twelve actions
subject_manifest.yaml the single secrets-engine service identity
registry_snapshot.json loadable snapshot combining both manifests
policy_fixtures.yaml 29 fixtures — 11 allows, dual control both ways, and every denial branch
check_request_*.json standalone requests for POST /v1/check

The action vocabulary is secrets-engine's, delivered under FLEX-WP-0021-T01 and recorded in ../../docs/secrets-engine-action-vocabulary.md. Read that before changing any action string here.

Verify

go run ./cmd/flex-auth validate -kind policy -file examples/secrets-engine/policy_package.md
go run ./cmd/flex-auth load-registry -file examples/secrets-engine/registry_snapshot.json

25 Rego tests and 29 fixtures.

Not yet deployed

There is no flex-auth-secrets-engine pin yet (FLEX-WP-0021-T04), so secrets-engine has no address to call. Their policy pin (SECRETS_ENGINE_AUTHORIZATION_POLICY_PACKAGE / _VERSION) stays unset and fail-closed until FLEX-WP-0021-T05 hands them the published package and the Service DNS. Do not configure it from this directory.