Repository navigation
feat: configure auth-api and auth-ui for the estate path - #113
Merged
Merged
Conversation
The fragment changes the handover of auth needs (#80), so the estate path can run auth in auth-system as the old path runs it today: - deploy/env/auth-api/base.env carries every variable of the old path's Deployment. What the Vault Agent Injector templated into /vault/secrets/auth-api.env (each OIDC client's secret, the database, mail and RabbitMQ logins) becomes ${secret:...} placeholders VSO syncs; the coordinates of what auth-api depends on and its own address become placeholders. auth-api keeps reading the transit key and the dynamic database login itself, as the old path's Vault role: deploy-kit 0.31 cannot declare the read of transit/keys/auth-api-jwt the JWKS needs. - deploy/env/auth-ui/base.env says auth-ui takes no configuration. - auth-ui listens on 8080, as JorisJonkers-dev/auth-ui's unprivileged nginx does. - The image runs as uid 65532. deploy-kit renders the lock's uid beside runAsNonRoot, so a root image never starts there; the fragment's lock step now refuses one.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #80 (epic JorisJonkers-dev/estate#204). The fragment side of handing
authover to the estate path as it runs today (operator decision 2026-10-23: as is, on deploy-kit 0.31,migration: self).Do not merge before JorisJonkers-dev/auth-ui's 8080 release is out (JorisJonkers-dev/auth-ui#57) and fleet-infra's two handover PRs have reconciled: this release's publish locks auth-ui's latest release and now refuses a root image. Order and commands: JorisJonkers-dev/estate
docs/runbooks/auth-handover.md.What changes
deploy/env/auth-api/base.env: every variable of the old path's Deployment. The injector's/vault/secrets/auth-api.envvalues (8AUTH_CLIENTS_*_SECRET,DB_USER/DB_PASSWORD,MAIL_PASSWORD,SPRING_RABBITMQ_USERNAME/PASSWORD) are${secret:...}placeholders, synced by VSO;AUTH_TRANSIT_*are literals; hosts and ports are${dependency:...}, URLs${exposure:auth.public#url}.delivery: self, but auth-api logs in as the old roleauth-api: deploy-kit can declaresignbut not the read oftransit/keys/auth-api-jwtits JWKS needs. The old role also keepsdatabase/creds/auth-api(VAULT_DB_ENABLED=true, as today).deploy/env/auth-ui/base.env: no configuration, as today.provides: http: 8080,writablePaths: [/tmp](unprivileged nginx).Dockerfile:USER 65532:65532. The render setsrunAsNonRoot: truewith the lock's uid, so the current uid 0 would be refused at pod start. Checked locally: the v0.19.0 image as 65532, read-only root,/tmptmpfs, all caps dropped, starts Spring up to the datasource.publish.yml: the fragment lock step refuses a root image.Validated and rendered with deploy-kit 0.31.0
Built from the tag (
git archive v0.31.0).deploy-kit validate: accepted.publishand thencomposeagainst every participant's latest fragment from GHCR and this repository's cluster-state.yml:authstilllegacy: composes, nothing rendered for auth, other artifacts unchanged;authonestateand the collector'sservinglocation (estate PR): 19 artifacts, no refusal.Render vs live (
kubectl get -o yaml, 2026-10-23)auth-api Deployment
{name}→{name, instance}: immutable, so the first pin force-recreates it (runbook keeps old pods serving).auth-api-primaryserves, the target scales to 0; HPA min=max=2 (livereplicas: 2).instance,part-of: auth,managed-by: deploy-kit,component: jvm,app.kubernetes.io/version, 4consumes.*; Vault injector annotations gone.priorityClassName: platform-critical-app→ none.nodeSelector: site=frankfurt→ required affinity on frankfurt-contabo-1, enschede-gtx-960m-1, enschede-t1000-1 (may run in Enschede; Postgres/Valkey stay in Frankfurt).command(sources the injector file,-XX:+UseZGC -XX:MaxRAMPercentage=55, two javaagents) → image entrypoint (otel agent), flags inJAVA_TOOL_OPTIONS. Pyroscope init container, its volume and the 7PYROSCOPE_*vars are gone: no continuous profiling.runAsNonRoot, uid/gid 65532, seccomp RuntimeDefault, read-only root, drop ALL, no privilege escalation;/tmpemptyDir (64Mi limit).PYROSCOPE_*; plusPORT=8081,JAVA_TOOL_OPTIONS; the 15 injector-file vars are now pod env.DB_HOST→platform-postgres,VALKEY_HOST→platform-valkey,SPRING_RABBITMQ_HOST→platform-rabbitmq,MAIL_HOST→stalwart(ExternalName aliases to the same Services);OTEL_EXPORTER_OTLP_ENDPOINTalloy…:4318→alloy…:4317withOTEL_EXPORTER_OTLP_PROTOCOLhttp/protobuf→grpc.http). Probes: same paths and port; readiness/liveness period 10s, timeout 5s, threshold 3 (same); startup 5s×120 (timeout 1s → 5s).auth-ui Deployment
nginx:alpine, root, :80) → next auth-ui release (nginx-unprivileged, uid 101, :8080). Port and probes 80 → 8080; a startup probe is added (5s×6).{name}→{name, instance}(recreate); Flagger primary; replicas 1.default→auth-ui, no token automount.Services: not rendered. Flagger takes over
auth-api(8081) andauth-ui(8080, which fleet-infra adds and routes to first) in place, selecting<name>-primary, and adds-primary/-canary.PDB:
auth-apiminAvailable 1 onname=auth-api→ maxUnavailable 1 onname=auth-api-primary.auth-ui: none rendered (the orphan is deleted by hand).ServiceMonitor
auth-api→ PodMonitorauth-api(same path, 30s,jobLabel: app.kubernetes.io/instance, so stilljob=auth-api). Orphan deleted by hand.Namespace: gains
managed-by: deploy-kit. ServiceAccountauth-api: same name, labels added.New: VaultConnection, VaultAuth (role
auth-system-auth-api), 4 VaultStaticSecrets, 4 ExternalName aliases, the vault-policy Job/CronJob, 2 Canaries, HPA, release-gate ConfigMap, thereporter-auth/rollouts-authpair. NetworkPolicies are rendered but not applied.Vault: new policy
auth-system-auth-api: read on the 4 KV documents, update ontransit/sign/auth-api-jwt, read ondatabase/creds/auth-owner.Elsewhere in the composition: the
estate-vso-secretsPostgres catalog gainsauth_db(ownerauth-owner, dataauth-data). It adopts the existing database:REASSIGN OWNED BY auth_user TO "auth-owner", thenGRANT "auth-owner" TO auth_user.apps-grimoire,apps-n8n,apps-outline,apps-tribeltandapps-estate-dashboardgaindependsOn: apps-auth.Unchanged and noted:
AUTH_CORS_ALLOWED_ORIGINSis as live, which lacksestate.anddigital-strategy.(they sign in with OIDC, not forward-auth).