feat(registry): accept the Ory session in the zot UI #2119
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/zot-oidc-ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Clicking Registry on the portal landed on a username/password form. Every other cluster UI accepts the Ory session, so the portal link dead-ended.
The cause: the live zot config had no
http.auth.openidblock. Three comments in this manifest recorded the wiring as deferred work. This is that flip — the shape is recovered from the retired XRegistry composition (platform-seanfarm, deleted 2026-07-23 in74dad2d).Rebased onto the zot-v2 storage migration (
3cf59eb4/554f5cef): all edits re-anchor ontoStatefulSet/zot-v2, and the guard now requires the registrar to stay wave-less (implicit wave 0: the Job mintszot-oidcalongside the StatefulSet, before the wave-1 Service switch).What changes
hydra-zot-client-registrarregisters thezot-platformOry client and mints thezot-oidcSecret, following the argo-workflows / forgejo / argocd registrar pattern.credentialsFileand runs the OIDC flow itself. No oathkeeper hop: an ext-auth hop onregistry.sean.farmwould gate/v2/and break every pull.sean@sean.farmjoinsadminPolicy— the identity zot derives from theemailclaim (verified against v2.1.15: username falls back to the userinfo email when noclaimMappingis set).What does not change
htpasswd,apikeyandanonymousPolicy: ["read"]are untouched. No CI push, containerd mirror or bootc pull can complete an interactive redirect, so all/v2/traffic keeps working exactly as before.tests/zot-binjovi-publisher.sh(including the new migration contract) passes unmodified.Two details that are not cosmetic
secureSessionis explicit.UseSecureSessionauto-enables only when zot terminates TLS. zot serves plain HTTP behind the gateway, so without this the session cookie ships with noSecureattribute.The registrar is a
Synchook, RBAC un-annotated, no waves. PreSync reads better and is a trap: this bundle declares its own Namespace, the Application setsCreateNamespace=false, and ArgoCD applies plain resources — andCreateNamespace— only after PreSync completes (argo-cd#4753, #3762); on a cold rebuild a PreSync registrar wedges the app permanently. A wave on the registrar would let the StatefulSet roll before its Secret exists.BeforeHookCreationmeans every registry sync re-runs the registrar and re-PUTs the Hydra client — idempotent, secret preserved by read-back, but each sync round-trips Hydra.Deploy cost, honestly
This edits the pod template, so the singleton restarts once and rescans its repositories before serving — about 5 minutes live (that is what the 900s startup budget exists for,
32407d4e; the earlier "seconds" figure here covered only the Secret wait and was wrong). Do not merge mid-kernel-roll (the PDB comment explains why zot's host rolls last). Batching with #2121 (readiness-timeout fix) costs one restart instead of two.Bootstrap edge
registry <- orybecomes a cold-rebuild ordering edge. It self-converges (the Job waits 60x5s for Hydra,backoffLimit: 20) and is not circular:scripts/k3s-create.shkeepshttps://codeberg.orgas the fallback endpoint behindregistry.sean.farm.Testing
tests/zot-oidc-ui.sh(new, CI-gated) — red on the parent commit, green here; guards the wiring, the untouched image path, the hook phase, and the wave-less registrar.tests/check.sh— 143/143 guards pass, 0 skipped, on the rebased tree.kubectl kustomize bundle/registryrenders;zot-v2carries thezot-oidcmount; the embeddedconfig.jsonparses.Not yet verified in-cluster: the browser login. Expect an "Ory" button on zot's login page, not the disappearance of that page — one click, no credentials, no consent screen. If login fails or lands read-only:
kubectl -n registry logs zot-v2-0 | grep -i 'username\|callback\|claim'shows which username zot resolved; fix theadminPolicyliteral or pinclaimMapping.https://claude.ai/code/session_019JVStQiFwbSLGHArU2sA4X
5bd721c90ab3e12b5bacb3e12b5bac2df7b06847sean referenced this pull request2026-08-31 14:46:12 +00:00
2df7b0684777806d1d51