AUDIT-WP-0018-T04: align seed with settled CCR-2026-0063 (railiance-platform f3b0c4f)
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 2s

- sso delivery is ExternalSecret/Secret sso/bounded-executor-tokens key
  audit-core (the Secret the rapp run Job already mounts), not
  nk-bind-executor-audit/audit-token.
- CCR check now also pins the new reader shape (audience openbao, explicit
  max TTL 15m, token_self_lifecycle) and that the CCR names this script as
  its custody procedure and the bounded-executor-tokens delivery.
- Docs/workplan: this script is the single seeder; railiance-platform
  fences the boundary (nk_bind_executor_custody.py fence) and owns
  manifests/nk-bind-executor-eso.yaml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 523928@bnt-lap001
Assistant-Session: 6c737afb-9c14-4152-9f02-477214b9c350
This commit is contained in:
tegwick 2026-11-04 02:05:18 +01:00
parent 5e0f496caf
commit 3157454b84
4 changed files with 56 additions and 20 deletions

View file

@ -12,7 +12,8 @@ contract. One process mints one bearer and writes it to the two places that need
It then syncs ExternalSecret audit-core/audit-core-senders, restarts the receiver,
and proves without writing an event that the live receiver knows the bearer
with the exact registered scope. If railiance-platform's ExternalSecret
sso/nk-bind-executor-audit exists, the script syncs it and compares the token by hash.
sso/bounded-executor-tokens exists (manifests/nk-bind-executor-eso.yaml), the
script syncs it and compares key audit-core by hash.
This script is silent. The wrapper discards stdout and stderr, so `warden access --exec`
fails closed on any output. The token is never printed, never passed on a command line
@ -25,10 +26,15 @@ entry is not rewritten. Anything else refuses and changes nothing: a sender
without custody, a drifted entry, another request's custody, a token
collision or a concurrent registry write.
CCR-2026-0063 names this script as its custody procedure (railiance-platform
f3b0c4f). It is the only seeder; railiance-platform's nk_bind_executor_custody.py
fences the coding-agent boundary first and verifies afterwards.
Founder-run only. The exact command is in docs/bounded-executor-receipts.md, section
"Founder runbook". The script does not create OpenBao policies or roles, the coding-agent
boundary, the ClusterSecretStore or the ExternalSecret in sso. Those belong to
railiance-platform and the rapp-bounded-executor package.
railiance-platform (credential-change applier, nk_bind_executor_custody.py fence,
manifests/nk-bind-executor-eso.yaml).
"""
from __future__ import annotations
@ -61,8 +67,8 @@ CUSTODY_META = "platform/metadata/workloads/net-kingdom/bounded-executor/audit-s
BOUNDARY = "sys/policies/acl/agent-high-risk-boundary"
CLUSTER_UID = "a553c742-0115-43d4-99a4-a5ca56fe0786" # railiance01 kube-system
SSO_SECRET = "nk-bind-executor-audit"
SSO_KEY = "audit-token"
SSO_SECRET = "bounded-executor-tokens" # ExternalSecret and Secret name (CCR-2026-0063 delivery)
SSO_KEY = "audit-core" # the key the rapp run Job mounts
TOKEN_SHAPE = re.compile(r"[A-Za-z0-9_-]{64}")
# Runs inside the receiver pod. The bearer arrives on stdin and leaves only as
@ -133,8 +139,15 @@ def check_ccr(doc: dict) -> None:
ob = doc.get("openbao") or {}
require(ob.get("kv_path") == CUSTODY_KV and ob.get("fields") == ["AUDIT_TOKEN", "CUSTODY_REQUEST"]
and ob.get("metadata_read") is False, "ccr_custody_contract_mismatch")
auth = ob.get("auth") or {}
require(auth.get("audience") == "openbao" and auth.get("token_explicit_max_ttl") == "15m"
and ob.get("token_self_lifecycle") is True, "ccr_reader_shape_mismatch")
delivery = doc.get("delivery") or {}
require(delivery.get("namespace") == "sso", "ccr_delivery_mismatch")
target = str(delivery.get("target", ""))
require(delivery.get("namespace") == "sso"
and f"sso/{SSO_SECRET}" in target and f"key {SSO_KEY}" in target
and "seed-nk-bounded-executor-sender" in str(delivery.get("custody_procedure", "")),
"ccr_delivery_mismatch")
def load_ccr(path: Path = CCR_FILE) -> tuple[dict, str]: