Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
-- Phase 09 Task #82 — Admin-Panel OIDC Login (Authentik SSO).
|
||||
--
|
||||
-- Extends AdminUser with the four fields needed to link an internal
|
||||
-- admin account to an external OIDC identity:
|
||||
-- ssoProvider — e.g. 'authentik' (NULL = legacy/password-only admin)
|
||||
-- ssoSubjectId — the stable `sub` claim from the IdP
|
||||
-- ssoGroups — snapshot of the IdP groups at the last successful login
|
||||
-- lastSsoLoginAt — bookkeeping / audit aid
|
||||
--
|
||||
-- The unique (ssoProvider, ssoSubjectId) constraint guarantees that a
|
||||
-- single Authentik account can only ever be bound to one AdminUser, which
|
||||
-- makes the JIT-provisioning upsert idempotent under concurrent logins.
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "AdminUser"
|
||||
ADD COLUMN "ssoProvider" TEXT,
|
||||
ADD COLUMN "ssoSubjectId" TEXT,
|
||||
ADD COLUMN "ssoGroups" TEXT[] NOT NULL DEFAULT ARRAY[]::TEXT[],
|
||||
ADD COLUMN "lastSsoLoginAt" TIMESTAMP(3);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "AdminUser_ssoProvider_ssoSubjectId_key"
|
||||
ON "AdminUser" ("ssoProvider", "ssoSubjectId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "AdminUser_ssoSubjectId_idx"
|
||||
ON "AdminUser" ("ssoSubjectId");
|
||||
Reference in new issue
Block a user