Spike: Keycloak integration and role-based schema design #16
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
Spike
Lineage
Standalone — palinks is evolving from single-user to multi-user with role-based link visibility and feature flags. Need to design how Keycloak auth maps to the Rails data model and how it's provisioned across platform repos.
Repo
Multiple —
palinks,pal-e-platform,pal-e-services,pal-e-deploymentsQuestion
How should Keycloak roles integrate with the palinks Rails schema to support role-scoped links and feature flags?
palinksrealm already exist, or do we need a new one? Do we create a new client? How are roles (superadmin, member) defined — realm roles vs client roles?linkstable (no users, no clicks, no feature flags). What tables/columns are needed?userstable that mirrors Keycloak subjects, or rely entirely on token claims?links.visibilitywork — enum column with valuespublic,member,superadmin? Hierarchy-based scope check?docs/visibility.mdanddocs/architecture.md. No other roles needed at this stage.omniauth-keycloak?devise+ OIDC? Bareopenid_connectgem?pal-e-platform: Is there existing Keycloak infra to reuse? Realm config?pal-e-services: Terraform changes needed — Keycloak client, secrets, OIDC config?pal-e-deployments: New secrets (client ID, client secret, realm URL) in SOPS overlay?Deliverables
Required outputs:
docs/auth.mdcreated — consolidates auth design from existingdocs/architecture.mdanddocs/visibility.mdinto a single reference. Covers Keycloak integration, role mapping, schema plan, and OIDC gem decision.Time-box
3 hours
Related
palinks— the service being integratedpal-e-platform— Keycloak cluster lives herepal-e-services— Terraform provisioningpal-e-deployments— k8s secrets and overlayldraney/palinks #15— custom domain (may affect OIDC redirect URIs)ldraney/palinks #17— visibility tier definitions (depends on this spike's role model)ldraney/palinks #19— seed data (consumes schema decisions from this spike)Scope Review: NEEDS_REFINEMENT
Review note:
review-1378-2026-06-07Spike template is complete and well-structured, but traceability backing notes are missing and existing docs reveal a role model inconsistency that this spike should reconcile.
Issues found:
project-palinksnote missing in pal-e-docs -- cannot verify story:auth-roles traceabilityarch-palinksnote missing in pal-e-docs -- no architecture backing note (repo hasdocs/architecture.mdbut it's not mirrored)docs/architecture.mddefines 4 roles (admin, collaborator, lead, public);docs/visibility.mddefines 3 tiers (superadmin, member, public). Spike should reconcile these.docs/architecture.mdanddocs/visibility.mdalready contain substantial Keycloak design. Clarify whetherdocs/auth.mdconsolidates or supplements existing docs.Scope Review: APPROVED
Review note:
review-1378-2026-06-07-r2Re-review of all 5 previous findings — all resolved:
project-palinksandarch-palinksnotes created in pal-e-docs with proper traceabilitydocs/architecture.mdanddocs/visibility.mdaligned to superadmin/member/anonymousdocs/auth.mdTicket is ready for next_up.
Reading issue body for QA review context.
ldraney referenced this issue2026-06-08 03:21:26 +00:00