Create westside-admin Keycloak client + document SOP (admin-console procedure) #301
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ldraney/pal-e-platform#301
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Type
Task
Lineage
Companion to westside-admin scaffolding. Independent of app code; blocks
forgejo_admin/westside-admin#2(auth implementation needs the client to exist) andforgejo_admin/pal-e-deployments#133(overlay's KEYCLOAK_CLIENT_SECRET secret depends on this).Scope-revision lineage: Original ticket assumed terraform-managed Keycloak clients. Scope review (
review-1096-2026-04-25) discovered:~/pal-e-platform/keycloak.tfdoes not existterraform/modules/keycloak/main.tfonly deploys the SERVER (namespace, secret, PVC, deployment, service, theme configmap) — zerokeycloak_openid_clientresourcesterraform/providers.tfdoes not declare thekeycloakproviderwestside-basketballrealm +westside-appclient are admin-console-managed, not IaCkeycloak_realmresource withouttofu import— would collide with live realm and could overwrite theme/policies/users, breaking westside-app SSODecision (path A — admin-console + SOP): match the existing pattern (manual creation), document the procedure as a queryable SOP in pal-e-docs. Defer IaC migration to a separate epic if/when desired.
Repo
forgejo_admin/pal-e-platform(the SOP file lives in pal-e-docs as a note, but the procedure itself is platform-team responsibility, hence this ticket here for tracking)User Story
story-westside-admin-admin-row-crud(project: westside-admin). Implements the Keycloak side of the admin gate safety constraint.Scope
Two deliverables, both must complete:
1. Create the OIDC client manually via Keycloak admin console at https://keycloak.tail5b443a.ts.net/admin (admin user). Realm:
westside-basketball. New client config:westside-adminS256(enforce in advanced settings)https://westside-admin.tail5b443a.ts.net/auth/callbackhttps://westside-admin.tail5b443a.ts.netIf confidential client chosen: copy the generated client secret into the
westside-admin-secretsKubernetes Secret inpal-e-deployments/overlays/westside-admin/prod/westside-admin-secrets.enc.yaml(SOPS-encrypted). Coordinate withforgejo_admin/pal-e-deployments#133.2. Create a queryable SOP in pal-e-docs documenting this procedure. Note slug:
sop-keycloak-client-creation. Tag:sop,active. The note should:review-1096-2026-04-25After both steps complete: verify
https://keycloak.tail5b443a.ts.net/realms/westside-basketball/.well-known/openid-configurationis reachable; verify the new client appears in the Keycloak admin console.Acceptance Criteria
westside-adminclient visible in Keycloak admin console under realmwestside-basketballsop-keycloak-client-creationcreated in pal-e-docs with tagsop,activehttps://keycloak.tail5b443a.ts.net/realms/westside-basketball/.well-known/openid-configurationreturns realm config (sanity check Keycloak is reachable)Test Expectations
forgejo_admin/westside-admin#2lands, the auth flow against this client succeeds end-to-endConstraints
mrparkers/keycloakterraform provider in this ticket (out of scope; deferred to a separate IaC epic)keycloak_realmresource — would collide with live realm and could break westside-app SSOChecklist
sop-keycloak-client-creationcreated in pal-e-docsreview-1096-2026-04-25Related
project-westside-adminarch-deployment-westside-adminreview-1096-2026-04-25(scope investigation that drove path A)feedback_funnel_requires_authforgejo_admin/westside-admin#2(auth code),forgejo_admin/pal-e-deployments#133(overlay secrets)Scope Review: NEEDS_REFINEMENT
Review note:
review-1096-2026-04-25Ticket premise is incorrect: there is no terraform-managed Keycloak client to "clone." The
keycloakterraform provider is not configured interraform/providers.tf, nokeycloak_realmresource exists, and nokeycloak_openid_clientresources exist anywhere interraform/. Thewestside-basketballrealm and existingwestside-appclient are managed via the Keycloak admin console, not IaC.Issues:
~/pal-e-platform/keycloak.tfdoes not exist. Keycloak terraform lives atterraform/modules/keycloak/main.tfand only manages the server (deployment/svc/PVC/theme).[SCOPE]Decide bootstrap strategy: configure keycloak provider + import realm in this ticket, or land a separate "adopt Keycloak under IaC" ticket first.[SCOPE]Decide public+PKCE vs confidential client.[SCOPE]Create architecture notearch-keycloak(label has no backing note).[BODY]Fix file path reference and replace "clone the westside-app client" guidance.[BODY]Add explicit AC for realm management (data lookup vs import) with zero realm-level drift.keycloak_realmforwestside-basketballwithout import would 409 or overwrite realm settings (theme, users), breaking westside-app SSO for Lucas and Marcus.[DECOMPOSE]After SCOPE answered: split into provider+realm-adoption / client-resource / (optional) secret-export. Route toskill-decompose-ticket.Full findings in the review note.
Terraform: Keycloak OIDC client westside-admin in westside-basketball realmto Create westside-admin Keycloak client + document SOP (admin-console procedure)Scope Review: APPROVED
Review note:
review-1096-2026-04-25-v2Path A rewrite resolves all v1 findings. False premise removed, outage risk avoided via explicit Constraints, two deliverables (admin-console client +
sop-keycloak-client-creationSOP) are tightly coupled and fit a single agent pass. ACs testable, dependencies cleanly documented.Non-blocking carryover:
[SCOPE]arch-keycloakarchitecture note still missing — track as a separate backlog item; SOP partially compensates. Do not block #1096.Ready to advance backlog → todo.
SOP authored as
sop-keycloak-client-creationin pal-e-docs (project:pal-e-platform, tags:sop, active, keycloak).Scope of this PR-less delivery: ticket explicitly forbids terraform changes (Constraints) and the realm/clients are admin-console-managed per
review-1096-2026-04-25. There is no repo file target — the SOP note IS the deliverable.Coverage of ACs:
sop-keycloak-client-creationcreated with tagsop,activewestside-appclient as the public+PKCE pattern reference;westside-adminas the cookie-SSR/confidential patternwestside-admincreated inwestside-basketballrealm with config matching the SOP's "OIDC Client Config Summary" tablepal-e-deployments/overlays/westside-admin/prod/westside-admin-secrets.enc.yamlper ticket #133https://keycloak.tail5b443a.ts.net/realms/westside-basketball/.well-known/openid-configurationreachable — this is verifiable now from any tailnet deviceAdditions beyond ticket scope (intentional, captured by review feedback):
statevalidation on/auth/callback(Keycloak does not enforce this; review feedback flagged this as a gap in the original Track A design).Discovered scope (not filed as a separate ticket — flagging for Ava):
arch-keycloakarchitecture note is referenced byreview-1096-2026-04-25as missing. The SOP cross-referencesarch-deployment-westside-adminas a substitute, but the dedicatedarch-keycloaknote documenting the IaC vs admin-console-managed boundary is still absent. Worth a separate ticket if Ava agrees.Handoff: this ticket is doc-complete on the SOP side. Closing it requires the manual admin-console action (which I cannot perform — live realm). Recommend Ava decides whether to (a) keep this open until Lucas runs the SOP and creates the client, or (b) split into two issues (SOP done now, client creation tracked separately as a manual ops task). Per dispatch instructions I will NOT close the ticket myself.