A policy-as-code capable authorization registry/control-plane service.
Find a file
tegwick d2dc39a8b8
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 3s
FLEX-WP-0008 T03-T04: tenant-engine live-lookup context adapter, close
internal/adapters/tenantengine: HTTPClient.LiveRoles() calls tenant-engine's
GET /tenants/{id}/roles/live. LiveRolesResult.Available is the load-bearing
field -- false on any transport error, non-200, or malformed body, never
inferred as zero roles. AttachToContext() writes both tenant_roles and
tenant_roles_available into a CheckRequest.Context map; a consuming Rego
policy must check tenant_roles_available before trusting tenant_roles.

Architectural finding recorded in the workplan: engine.go's Check() has no
context-adapter hook, and none of the existing topaz/relationship/rule
adapters are wired into cmd/flex-auth either -- they're standalone packages
for downstream composition. This adapter is a request-preparation helper a
protected system's own request-building code calls before POST /v1/check,
not an engine-internal hook, matching that precedent exactly.

9 Go tests; gofmt/vet/build clean; go test ./... green repo-wide.

Verified as a real three-service chain: live flex-auth serve + live
tenant-engine, created a tenant and granted it a CUS role through the real
flex-auth-gated write path, then read it back through this adapter (via a
throwaway harness, not committed) -- known tenant: roles=[CUS]
available=true; unknown tenant: roles=[] available=false err="status 404".

FLEX-WP-0008 closed: T01-T04 all done. tenant-engine's write path is now
real end-to-end; any other protected system can pull live tenant capability
role context, fail-closed. Remaining open item unchanged from TEN-WP-0003:
KEY-WP-0005 (key-cape's IAM Profile core-claims gap).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-23 23:33:34 +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 Add Forgejo CI smoke workflow (enablement template) 2026-07-08 12:32:37 +02:00
.github/workflows Land foundations: assessment, ADR-001/002/003, FLEX-WP-0005, Go skeleton 2026-05-16 01:54:44 +02:00
cmd/flex-auth FLEX-WP-0007: production registry fixture, tests, and sync runbook 2026-06-24 14:52:35 +02:00
docs FLEX-WP-0008 T01-T02: tenant-engine resource/action vocabulary + policy package 2026-07-23 23:05:57 +02:00
examples FLEX-WP-0008 T01-T02: tenant-engine resource/action vocabulary + policy package 2026-07-23 23:05:57 +02:00
internal FLEX-WP-0008 T03-T04: tenant-engine live-lookup context adapter, close 2026-07-23 23:33:34 +02:00
pkg/api FLEX-WP-0006: implement ops-warden signing gate policy 2026-06-23 21:17:42 +02:00
registry Add capability registry with seed entry from reuse-surface 2026-06-16 01:46:54 +02:00
schemas FLEX-WP-0006: implement ops-warden signing gate policy 2026-06-23 21:17:42 +02:00
workplans FLEX-WP-0008 T03-T04: tenant-engine live-lookup context adapter, close 2026-07-23 23:33:34 +02:00
.custodian-brief.md chore(consistency): sync task status from DB [auto] 2026-07-23 23:06:17 +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 Regenerate agent instructions from state-hub templates (CUST-WP-0055 T01) 2026-07-08 14:50:24 +02:00
CLAUDE.md Add credential routing instructions for all agent runtimes 2026-06-18 22:48:37 +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 docs(intent/scope): align with ops-warden as first shipped consumer 2026-06-27 20:37:07 +02:00
LICENSE Initial commit 2026-05-04 14:21:47 +00:00
Makefile Pin FlexAuthResourceManifest schema (resource-registration-v0) 2026-05-16 02:04:00 +02:00
README.md Refine workplans for CARING profile 2026-05-17 04:15:38 +02:00
SCOPE.md docs(scope): reflect baseline complete — all FLEX-WP-0001..0007 done 2026-06-30 01:40:19 +02:00
WORK-RECORDS.md chore(consistency): sync WORK-RECORDS.md for FLEX-WP-0008 T01-T02 [auto] 2026-07-23 23:06:28 +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.