A policy-as-code capable authorization registry/control-plane service.
Find a file
tegwick 0bc624ba62
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 3s
Build and Publish Container Image / build-and-push (push) Successful in 57s
fix(decision): registry facts win over caller-supplied attributes
secrets-engine's first live request rejected our allow: binding.
request_digest is computed over material they never sent, because we
enrich subject and resource from the registry before hashing. Answering
that meant reading the enrichment path, which had a worse defect in it.

Enrichment was additive-if-absent — addAttribute wrote a registry value
only where the request had no value for that key. So where a caller
supplied a key, the caller's value won and the registry's never applied.
Every registry ceiling and allowlist was advisory. Verified against the
shipped ops-warden package, each one added key on an otherwise-denied
request:

  max_ttl_hours: 99      registry says 8    -> allowed a 12h certificate
  allowed_principals     registry allowlist -> disallowed_principal bypassed
  allowed_subjects       registry allowlist -> unknown_subject bypassed

The third is the one to read twice: a subject the registry does not know
authorized itself by naming itself in the allowlist it was being checked
against.

Not remotely reachable today — the PEP builds the CheckRequest,
ops-warden sends no resource.attributes, and enforce admits one identity.
It is a defence-in-depth failure: any path that lets attacker-influenced
data into a CheckRequest field became a full policy bypass rather than a
bounded input problem. Callers sending resource.attributes is not
hypothetical; secrets-engine does it on every request.

Registry facts now win, and diagnostics.registry_overrode names every
displaced key, because a registry that silently discards a contradicting
claim hides that a caller asserted authority it did not have.

subject.type is carved out, and the reason is a finding of its own.
Making the registry win there denied every secrets-engine allow: the
registry's type is CARING vocabulary (Human, Agent, Automation, Service)
and the request's is the protected system's actor vocabulary (service,
adm, agt, atm). Two fields sharing a name; substituting one for the other
is translation rather than identity, which GH-DEC-2026-008 ruled against.
Note what surfaced it — the registry's type had been dead data since the
field existed, because the caller's value always won.

Also publishes binding.submitted_request_digest, over the request exactly
as sent. request_digest was published as the consumer replay test and
cannot be one. Nothing is lost hashing the pre-enrichment form:
enrichment is a function of the request and the snapshot, and
registry_snapshot_digest already pins the snapshot.

Existing pins do not move. All three replay fixtures' request_digest and
approval_binding_digest values are byte-identical — those requests
contradict no registry fact. A field to add, not a value to correct.

Regression tests verified failing against the old behaviour before being
kept. FLEX-DEC-2026-012; FLEX-WP-0025 carries the residual, that a policy
still cannot tell a fact from an assertion.

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

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 715613@bnt-lap001
Assistant-Session: fabd95c1-4c9e-4080-8849-8707ae025f80
2026-09-07 13:43:33 +02:00
.claude/rules docs: workplan-first agent guidance prose (CUST-WP-0055 T04 batch 2) 2026-07-08 16:41:17 +02:00
.forgejo/workflows Publish images via CI; file staged-promotion overlay debt 2026-08-11 10:35:34 +02:00
.github/workflows Land foundations: assessment, ADR-001/002/003, FLEX-WP-0005, Go skeleton 2026-05-16 01:54:44 +02:00
.repo-manager Publish approval_binding_digest: a claim cannot name the request carrying it 2026-09-06 14:52:33 +02:00
charts/flex-auth Enforce caller-auth on flex-auth-user-engine and record the live A2 probe 2026-08-19 14:00:53 +02:00
cmd/flex-auth feat(policy): add credential grant authorization package 2026-08-23 13:59:03 +02:00
decisions fix(decision): registry facts win over caller-supplied attributes 2026-09-07 13:43:33 +02:00
deploy Enforce verified secrets-engine operator caller identity 2026-09-06 23:38:36 +02:00
docs fix(decision): registry facts win over caller-supplied attributes 2026-09-07 13:43:33 +02:00
examples fix(decision): registry facts win over caller-supplied attributes 2026-09-07 13:43:33 +02:00
history Align INTENT and SCOPE to security layer model v0.7; plan conformance work 2026-08-29 14:43:49 +02:00
intakes chore(registrar): assign State Hub identifiers 2026-08-29 02:45:11 +02:00
internal fix(decision): registry facts win over caller-supplied attributes 2026-09-07 13:43:33 +02:00
pkg/api fix(decision): registry facts win over caller-supplied attributes 2026-09-07 13:43:33 +02:00
railiance Pin deployed secrets-engine tenant policy v2 2026-09-06 21:39:10 +02:00
registry Add capability registry with seed entry from reuse-surface 2026-06-16 01:46:54 +02:00
schemas fix(decision): registry facts win over caller-supplied attributes 2026-09-07 13:43:33 +02:00
tests Enforce caller-auth on flex-auth-ops-warden (FLEX-WP-0016-T03) 2026-08-19 20:10:31 +02:00
tools Finish FLEX-WP-0019 layer-model v0.7 conformance 2026-09-03 23:48:45 +02:00
values Enforce verified secrets-engine operator caller identity 2026-09-06 23:38:36 +02:00
workplans fix(decision): registry facts win over caller-supplied attributes 2026-09-07 13:43:33 +02:00
.custodian-brief.md chore(consistency): sync task status from DB [auto] 2026-09-07 08:46:29 +02:00
.gitignore Land foundations: assessment, ADR-001/002/003, FLEX-WP-0005, Go skeleton 2026-05-16 01:54:44 +02:00
.golangci.yml Land foundations: assessment, ADR-001/002/003, FLEX-WP-0005, Go skeleton 2026-05-16 01:54:44 +02:00
.repo-classification.yaml Human-review .repo-classification.yaml (CUST-WP-0050 follow-up) 2026-06-22 17:56:17 +02:00
AGENTS.md docs(agents): repoint remote State Hub URL to the in-cluster address 2026-08-25 00:21:00 +02:00
CLAUDE.md Add credential routing instructions for all agent runtimes 2026-06-18 22:48:37 +02:00
Containerfile Package flex-auth policy service 2026-08-09 01:35:30 +02:00
go.mod Implement policy package loader 2026-05-17 05:30:40 +02:00
go.sum Implement policy package loader 2026-05-17 05:30:40 +02:00
INTENT.md Finish FLEX-WP-0019 layer-model v0.7 conformance 2026-09-03 23:48:45 +02:00
LICENSE Adopt Target Revenue Source License V1C1 (org-wide preliminary rollout) 2026-07-30 00:16:31 +02:00
Makefile Finish FLEX-WP-0019 layer-model v0.7 conformance 2026-09-03 23:48:45 +02:00
README.md Refine workplans for CARING profile 2026-05-17 04:15:38 +02:00
SCOPE.md fix(decision): registry facts win over caller-supplied attributes 2026-09-07 13:43:33 +02:00
tenancy.yaml fix(posture): remove redundant implemented level 2026-08-22 15:22:33 +02:00
WORK-RECORDS.md chore(consistency): refresh work records 2026-09-07 08:47:31 +02:00

flex-auth

Policy-as-code authorization registry and control plane for NetKingdom-aligned systems.

Start with INTENT.md for the project boundary and direction. Research notes and ADRs live in docs/ and docs/adr/.

The product boundary is captured in SCOPE.md, and the current Product Requirements Document is docs/ProductRequirementsDocument.md.

The 2026-05-15 pre-implementation assessment that shapes the current sequencing is in docs/pre-implementation-assessment.md.

The CARING reference-implementation approach is captured in docs/caring-architecture-blueprint.md.

Workplans live in workplans/, with sequencing captured in docs/workplan-planning-map.md.