net-kingdom/sso-mfa/k8s/user-engine
tegwick 4a915ce6c7 NK-WP-0026 finished: user-engine caller identity verified live against railiance01
T02 done. Deployed user-engine digest c501aeb2 reads the projected flex-auth
token per decision (verified in the running container); flex-auth-user-engine
138aa347 serves with caller-auth enforce. Probes: valid 200
decision:d9aef25f08e17b84, missing token 401, wrong-system 403.

Closes manifest drift: runtime.yaml pinned e3b5f65b, the digest T01 warned
against, while the cluster ran c501aeb2. Re-applying it would have rolled the
portal back to an image that cannot authenticate to a PDP now in enforce.
kubectl diff is now empty.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 22:01:12 +02:00
..
backup.yaml Add user-engine backup and rollback verification 2026-07-30 00:00:14 +02:00
ingress.yaml Deploy KeyCape-backed portal login edge 2026-07-28 00:39:22 +02:00
openbao-runtime.yaml Move identity secret stores to local OpenBao 2026-08-03 21:37:17 +02:00
README.md docs: point user-engine apply home at rapp-user-engine 2026-08-18 12:39:24 +02:00
registration-acceptance-harness.yaml Complete live registration acceptance 2026-08-14 17:39:08 +02:00
restore-drill.yaml Add user-engine backup and rollback verification 2026-07-30 00:00:14 +02:00
runtime.yaml NK-WP-0026 finished: user-engine caller identity verified live against railiance01 2026-08-19 22:01:12 +02:00
verify-operability.sh Move portal workloads to registry digests 2026-07-30 00:25:16 +02:00

user-engine portal on reef-railiance

Apply home moved. The managed package is rapp-user-engine. Render, deploy, verify, and rollback from that repo (make deploy, make verify-live). These files remain migration input until that package is the only checkout operators apply.

This is a stateful rail-kubernetes platform workload. It intentionally has no public Ingress until the KeyCape authorization-code/PKCE edge and user-engine-portal client are configured. Direct access to protected routes must remain impossible because the application accepts identity only from a trusted edge marker plus verified claims.

The portal image is published through the activity-core workload-scoped Forgejo package credential and deployed from forgejo.coulomb.social/coulomb/user-engine by immutable digest. The public package read was verified without an image pull Secret; publishing still uses the ExternalSecret-backed credential and temporary client state.

The CloudNativePG operator creates user-engine-pg-app, including its uri field. OpenBao is authoritative for the portal edge marker and provisioner service token at platform/workloads/user-engine/runtime. The openbao-runtime.yaml stores and ExternalSecrets deliver those values into the existing namespaced Secret names without changing application interfaces.

The audit-core sender and email-connect ingest credentials stay authoritative in their provider namespaces. Run tools/sync-user-engine-delivery-secret.sh from the repository root to copy only those scoped values into user-engine-delivery without printing them. Rerun it after either provider rotates its token, then restart user-engine because the application receives these two values as environment variables.

The desired runtime also projects a short-lived ServiceAccount token with audience flex-auth at /var/run/secrets/flex-auth-caller/token. user-engine re-reads it per policy decision; it is not a Kubernetes API credential and is not copied into a Secret. This manifest must be promoted with a user-engine image that understands USER_ENGINE_FLEX_AUTH_TOKEN_FILE and flex-auth desired state that binds system:serviceaccount:user-engine:user-engine. The current pinned digest predates that coordinated rollout.

kubectl apply -f openbao-runtime.yaml
kubectl apply -f runtime.yaml
kubectl -n user-engine rollout status deployment/user-engine
kubectl -n user-engine get cluster,pod,service,networkpolicy

Rollback sets the Deployment image to the preceding immutable digest. Database migrations are additive and run before serving; restore uses the standard CNPG recovery contract once the offsite object-store reference is attached.