Skip to content
SHC Docs

Identity and permission control: the per-app matrix

Layer 10. Edge. Edge

Status: MEASURED INVENTORY, 2026-08-17. Nothing in this document changes anything. No app default was edited, no estate was converged, no Keycloak object was written. Every “live” claim was read off the bitspur corp estate read-only on 2026-08-17; every “app” claim was read out of origin/main at b82fc2d and the ce pin in go.mod.

Companion to access-control.md, which owns SHC’s own role grammar (tenant:*, stack:* on the shc-access client), and to sso-redirect-coverage.md, which answers the sibling question for where a login lands. This document answers the one the owner asked:

“Can midPoint drive better permission management for things that Keycloak can’t control? Can midPoint control GitLab groups? What about other app-specific things? Map out which apps we can and need to control permissions on, which ones Keycloak can drive, which ones midPoint can drive. And document any provisioning or deprovisioning that midPoint should handle.”


  1. Keycloak expresses exactly one bit per group (you are in it or you are not) and it delivers that bit to an app as a groups claim. Everything an app does with that bit is the app’s own decision, made by the app’s own code, and no amount of Keycloak configuration widens it.
  2. midPoint writes only to Keycloak (one connector, ruled). It therefore drives exactly what Keycloak drives and not one thing more. midPoint is not a superset of Keycloak’s reach; it is a governor sitting on top of the same narrow pipe. Where an app’s permission is not expressible from a group claim, midPoint cannot fix it either.
  3. The thing that closes the gap is a broker adapter: a ~90-line per-app module in the identity-broker that calls the app’s own admin API. GitLab CE is the clean proof: its OIDC integration cannot grant read-only access at any price short of a Premium licence, and its REST API can, for free, today.
  4. What midPoint owns is the decision, not the write. Joiner/mover/leaver, approval, expiry, certification outcome: midPoint decides and writes a group membership into Keycloak. Keycloak emits the event. The broker turns that event into every write that lands inside an app. That handoff is specified in §7.

Every cell in the matrices carries one:

markmeaning
★MEASURED LIVE on the bitspur corp estate, 2026-08-17, read-only
◆READ FROM THE PACKAGE at main@b82fc2d / the go.mod ce pin
○INFERRED from the app’s own upstream documentation at our pinned version, cited in §8
?could not be established, stated as unknown, never guessed

1. The substrate: three facts that decide most rows

Section titled “1. The substrate: three facts that decide most rows”

1.1 There is exactly one group mapper, and it emits slashes ◆

Section titled “1.1 There is exactly one group mapper, and it emits slashes ◆”

ce’s modules/keycloak/oidc.socket.yaml (lines 865-957) mints and converges one protocol mapper named shc-groups on every client that binds the oidc socket, on every integration-job run:

{"name":"shc-groups","protocol":"openid-connect",
"protocolMapper":"oidc-group-membership-mapper",
"config":{"claim.name":"groups","full.path":"true",
"id.token.claim":"true","access.token.claim":"true",
"userinfo.token.claim":"true","introspection.token.claim":"true"}}

full.path: true is the default, so the claim carries /Admin, with the leading slash, not Admin. It is deliberately a client-level mapper and not a client scope, so no consumer has to change what it requests.

Of the 44 SSO-plugged apps (41 oidc.plug.yaml + 3 saml.plug.yaml) ◆, only six declare anything about the spelling:

appdeclaresemitted spelling
supersetgroupsFullPath: "true"/Admin
peertubegroupsClaim conditional on allowedGroup/Admin
nextcloudgroupsClaim: "{{ vars.keycloak.groupsClaim }}" (default empty)/Admin
minio (+ minio-classic)groupsClaim: "policy", groupsFullPath: "false"bare Admin, under claim policy
paperlessgroupsFullPath: "false"bare Admin
dependency-trackgroupsFullPath: "false"bare Admin

The other 35 silently take /Name. That is not a defect by itself; most of them ignore the claim entirely, but it is the reason every group-keyed rule in the catalogue has to be spelled with the slash, and it is the root of the nextcloud defect in §6.1.

1.2 ★ The mapper is live on only 8 of 26 clients

Section titled “1.2 ★ The mapper is live on only 8 of 26 clients”

The socket mints shc-groups on every integration-job run, but a client whose app has not been re-converged since ce grew that block has no mapper at all. Measured against the corp realm on 2026-08-17:

PRESENT (8) superset(full.path=true) paperless(false) dependency-track(false)
gitlab(true) frappe(true) glitchtip(true) librechat(true) ivatar(true)
MISSING (16) nextcloud peertube supabase immich wazuh windmill netbird
matrix huly penpot postiz openreplay ciso-assistant
sonarqube mailcow fleet
NO CLIENT (1) minio: MinIO on corp is not OIDC-wired at all (no
MINIO_IDENTITY_OPENID_* env on the running container)

So group-keyed authorization is dark on two thirds of the estate today, independently of what any app declares. Any plan that assumes the claim is present must first re-converge those 16 apps. This is a fact about the estate, not about the code; the code is correct.

The corp realm holds exactly four groups ★: /Admin (4 members) · /Employee (26) · /mail-users (2) · /shc-app-access (46), across 42 identities of which 23 are enabled.

1.3 ★◆ SAML carries no groups at all, and there is no LDAP

Section titled “1.3 ★◆ SAML carries no groups at all, and there is no LDAP”

ce’s modules/keycloak/saml.socket.yaml has zero group handling: no group-attribute statement mapper of any kind ◆. The three SAML apps (mautic, sonarqube, fleet) therefore cannot receive group membership from SHC’s Keycloak by any configuration, only by hand-minting a mapper outside the socket.

There is no ldap socket and no LDAP provider; ruled 2026-08-05 (decision), and still true. Any “just use LDAP group sync” answer is out of scope for this estate.


2. Matrix A: what a Keycloak group can actually drive

Section titled “2. Matrix A: what a Keycloak group can actually drive”

Ceiling is the real limit at our pin, not the app’s marketing. Premium? answers: is fine-grained mapping gated behind a paid tier we do not hold?

AppProtoClaim spelling expectedMapper live?★ Ceiling a Keycloak group can drivePremium?
gitlab (CE 18.11.7)oidc ◆/Name (undeclared) ◆★ yeslogin-only, and on our build, strictly login-only. See §2.2: on the FOSS gitlab-ce package the group-consuming code is not merely tier-gated, three of the four settings are not compiled in at all ○★ YES: Premium, twice over. Read-only is unreachable via any claim
supersetoidc ◆/Name; declares groupsFullPath:true ◆★ yesfull role mapping: Admin / Alpha / Gamma / sql_lab / Public via AUTH_ROLES_MAPPING ○no (Apache-2.0)
dependency-trackoidc ◆bare Name; declares false ◆★ yesfull team mapping: OIDC group → Team, 14 permissions per team ○no
paperlessoidc ◆bare Name; declares false ◆★ yesDjango groups only, never is_staff/is_superuser ○no
wazuhoidc ◆not groups: realm roles under claim roles ◆★ nofull role mapping, but through a wazuh-roles realm-role mapper the socket does not mint; the app only prints instructions ◆no (GPLv2)
immich (v3.0.3)oidc ◆not groups: scalar immich_role ◆★ noadmin ↔ user boolean, at first login only. Upstream made it re-evaluate every login in v3.1.0; we are one minor short ○no
peertube (v8.2.4)oidc ◆/Name ◆★ nologin gate only (allowed-group). Role needs an integer claim and applies at account creation only ○no
miniooidc ◆bare Name under claim policy ◆★ no clientfull policy mapping: group name must equal a MinIO policy name; no match = no STS credential at all ◆no, but ★ not wired on corp, and MinIO was archived upstream 2026-04-25 ○
gitea (packaged)oidc ◆/Name; app reads bare ◆n/afull: --admin-group, --restricted-group, --group-team-map ○no (SAML is the paid bit; OIDC is free)
nextcloud (34.0.2)oidc ◆/Name ◆★ nogroups only (no role primitive). ★ Currently nothing: group provisioning is off live: §6.1no
windmill (1.784)oidc ◆/Name (undeclared) ◆★ nologin + one bit (SSO_AUTO_JOIN_OPERATOR, applies to everyone it matches) ◆★ YES: EE. Group sync is Enterprise; CE also caps SSO at 10 users ○
fleet (v4.90)saml ◆SAML carries no groups ◆n/alogin-only: match by NameID email ◆★ YES: Premium. JIT provisioning and role assignment are Fleet Premium ○
sonarqube (Community)saml ◆groupAttribute: "" = off ◆n/agroup membership only, and the groups must pre-exist; permissions come from templates ○partial: auto-provisioning is Developer+ ○
mautic (7.1.3)saml ◆no group attribute at all ◆n/anone. Every SAML identity gets role id 1 = Administrator ◆no
ciso-assistantoidc ◆/Name (undeclared) ◆★ nologin-only at our tier★ YES: Pro. IdP group federation is a Pro feature ○
openreplay (fork)oidc ◆/Name (undeclared) ◆★ noone bit: OIDC_ADMIN_GROUP, ★ empty on corp; the fork accepts admins, /admins and trailing-segment forms ◆? UNRESOLVED. Two independent doc sweeps disagreed: the public pricing table appears to list SSO/RBAC under Open-Source, the reputation and the reason our fork exists say EE. The pages that would settle it 404. Test on our own instance before designing around it
netbird (0.76.2)oidc ◆/Name (undeclared) ◆★ notwo axes, and only one is claim-drivable. NetBird groups (the thing access-control policies key on) can be fed from a JWT group claim, self-hosted and free ○, but our app declares nothing and ★ the client has no mapper. NetBird roles (owner/admin/user) are a separate axis, ★ set by SQL seed from vars.ownerEmail, not by claim ◆groups free; SCIM is cloud/Commercial ○
matrix (Synapse+MAS)oidc ◆/Name (undeclared) ◆★ nologin-only. MAS imports subject/localpart/displayname only ◆no
jitsiNone (inside the matrix stack) ◆n/an/anone: no role model exists. Only “authenticated room creator vs guest” ○no
huly (v0.7.432)oidc ◆/Name (undeclared) ◆★ nologin-only from the claim. Workspace role is written by the broker ◆no
frappe / erpnextoidc ◆/Name (undeclared) ◆★ yeslogin-only. Frappe’s Role doctype is not claim-drivable over OIDC ○no (GPLv3)
supabase (self-host)oidc ◆/Name (undeclared) ◆★ nonone that is safe. Studio is one shared basic-auth credential: no user accounts at all. Claims land in user_metadata, which upstream forbids for authz ○Studio SSO is cloud-only ○
glitchtip (6.2.5)oidc ◆/Name (undeclared) ◆★ yeslogin-only: auto-join as MEMBER ○no
penpot (2.17)oidc ◆/Name (undeclared) ◆★ nologin gate only: PENPOT_OIDC_ROLES gates sign-in, it does not assign ○no
postiz (2.23)oidc ◆/Name (undeclared) ◆★ nonone. The role enum is dead self-hosted: the permission check short-circuits to allow-all without Stripe configured ○no
librechat (0.8.7)oidc ◆/Name (undeclared) ◆★ yesfull role mapping: OPENID_ADMIN_ROLE + role sync ○no (MIT)
affine / affine-rsoidc ◆/Name (undeclared) ◆★ no clientlogin-only: identity claims only ○? README implies SSO is an EE feature yet OIDC ships in the MIT repo; docs return HTTP 402 and could not be quoted
mailcowoidc ◆not groups: user attribute mailcow_template ◆★ notemplate assignment per user attribute, a real per-user knob, but keyed on an attribute, not a group ◆no
vaultwardenoidc ◆/Name (undeclared) ◆n/alogin-only ◆no
ivataroidc ◆/Name (undeclared) ◆★ yesnone: the app has no role model. The app says so in-line ◆no
journiv (packaged)oidc ◆/Name (undeclared) ◆n/anone: admin/user, first user wins ○no
uptime-kuma (2.5.0)local-only ◆n/an/anone: single account, no OIDC at all. Upstream has rejected it repeatedly ○no
midpoint (4.8.12 classic)oidc ◆/Name (undeclared) ◆★ nologin-only; the plug maps preferred_username onto an existing midPoint user and states “roles and groups are not synchronised by this” ◆no
matomo / wordpress / kutt (packaged)oidc ◆/Name (undeclared) ◆n/alogin-only: none declares anything about groups ◆no
defectdojo (enterprise)none ◆n/an/anone: no SSO in the open-source build. The app deletes oidc.plug.yaml and refuses an -i oidc= edge; the answer is --gated ◆n/a
countwhat it means
Full role/team/policy mapping is reachable from a group claim, free7superset, dependency-track, gitea, wazuh, librechat, minio, paperless (groups-only)
Reachable only behind a paid tier we do not hold4gitlab, windmill, fleet, ciso-assistant (+ openreplay, unresolved)
Not reachable at any price: the app has no claim-drivable role modelthe restincluding 4 apps with no role model at all: jitsi, uptime-kuma, supabase-Studio, postiz (dead enum)

2.1 ★ The live privilege census: what the estate actually holds

Section titled “2.1 ★ The live privilege census: what the estate actually holds”

Read out of each app’s own database on 2026-08-17. The pattern is the point: almost every app is a two-user estate where both users are administrators. Where a role model exists, it is unused; where mapping is configured, it is mostly unpopulated.

appusersprivilegedroles/groups that existmapping configured?
dependency-track3 (2 OIDC, 1 managed)Administrators=3teams: Administrators, Automation, Portfolio Managers★ YES, and it works. MAPPEDOIDCGROUP: Admin→Administrators, shc-app-access→Portfolio Managers, spelled bare, matching its full.path=false mapper
superset2Admin=2, Gamma=1Admin, Alpha, Gamma, sql_lab, Publicmapper present (full.path=true); rolesMapping blank
nextcloud45admin=2groups: admin, shc-org(27), huly-contacts(0)no: §6.1
sonarqube5 (4 SAML)sonar-administrators=2sonar-administrators, sonar-users(5)no: groupAttribute empty, and SAML carries no groups
librechat6, all OIDCADMIN=0ADMIN, USER + 17 access rolesno: mapper present, role sync unset
wazuhUnknownUnknownstock only★ no. roles_mapping.yml is entirely stock; the only privilege path is a roles claim literally containing admin, and no mapper emits one → an OIDC user lands with own_index only
ciso-assistant2superuser=110 user groups, 8 roles, 11 assignments★ no: iam_idpgroup has 0 rows
windmill5 (4 keycloak)super_admin=1★ 0 instance groups; 1 workspace with 0 membersno
fleet2admin=20 teamsno
mautic2both Administratorexactly 1 role: id 1 Administratorn/a: the defect, live
immich3isAdmin=1admin/user booleanno
peertube2admin=10=admin, 1=mod, 2=userno
paperless2superuser=1★ 0 groupsmapper present, nothing to map to
netbird3owner=1owner/admin/userno
glitchtip2superuser=12 orgs, 1 membership (owner)no
penpot2★ all 3 memberships are owner+admin+editper-team booleansn/a
minio5 IAM usersUnknown5 policies, all service-account shaped★ no OIDC at all; no identity_openid config, no STS identities in the IAM tree, console reports loginStrategy: "form"
supabase★ 0Noneanon/authenticated/service_role existn/a
postiz / openreplay★ 0 eachNonerole columns existapp unused
ivatar2superuser=10 groupsn/a: no role model

★ Dependency-Track is the one app in the estate where the whole chain works end to end today: the shc-groups mapper is on its client with full.path=false, the app declares that spelling, and DT’s own MAPPEDOIDCGROUP rows are spelled to match. It is the existence proof that the design is sound and the gap is deployment, not architecture. It is also the row to copy.

2.2 ★ GitLab, in full: the owner’s example, answered

Section titled “2.2 ★ GitLab, in full: the owner’s example, answered”

GET /api/v4/license on git.corp.bitspur.com answers 404; the route does not exist, which is the CE signature (EE defines it and would answer 401) ★. So this is the FOSS Community Edition build, not an unlicensed Enterprise build sitting on the Free tier. That distinction turns out to matter, and it makes the answer worse, not better.

mechanismtier badge ○ships in the gitlab-ce FOSS package? ○usable here?
SAML Group Sync: IdP group → GitLab group + access level”Tier: Premium, Ultimate”Unknown❌
LDAP group sync”Tier: Premium, Ultimate”Unknown❌ (and there is no LDAP anyway, §1.3)
OIDC groups_attribute”Tier: Premium, Ultimate”Unknown❌
OIDC required_groups”Tier: Premium, Ultimate”★ “EE Only? Yes”❌ not compiled in
OIDC admin_groups”Tier: Free, Premium, Ultimate”★ “EE Only? Yes”❌ not compiled in
OIDC auditor_groups”Tier: Premium, Ultimate”★ “EE Only? Yes”❌ not compiled in
OIDC external_groups”Tier: Premium, Ultimate""EE Only? No”❌ tier-gated
SCIM”Tier: Premium, Ultimate”, and it “doesn’t support updating users”; it never sets access levelsUnknown❌
Basic OmniAuth OIDC sign-in”Tier: Free, Premium, Ultimate”yes✅: this is all we have
REST POST /projects/:id/members / /groups/:id/members”Tier: Free, Premium, Ultimate”, Self-Managedyes✅ this is the answer

So: on our build a Keycloak group can drive nothing in GitLab at all, not read-only, and not even instance admin. admin_groups is badged Free on the tier axis, which is what a quick check finds, but it is EE-distribution code and is absent from the gitlab-ce package we run. The two axes are independent and both have to be satisfied. This is the sharpest example in the document of why midPoint cannot help: there is no Keycloak-side configuration, and no governance layer above Keycloak, that puts code into a binary that does not contain it.

The REST API is Free on both axes, which is why §7.2 ranks a GitLab members adapter first.

★ Use Reporter (20), not Guest (10). On Self-Managed, Guest cannot view or pull project code in a private project ○; Reporter is the real read-only floor. Live today the estate has 11 active users and 7 member rows: 6 Owner, 1 Reporter ★.


3. Matrix B: lifecycle: who provisions, who deprovisions, what survives

Section titled “3. Matrix B: lifecycle: who provisions, who deprovisions, what survives”

midPoint can drive? is derived, not independent: midPoint writes only to Keycloak, so it equals the Matrix-A ceiling. It is spelled out per row anyway, because the wrong answer here is the intuitive one.

AppmidPoint can driveBroker adapter ★Provisioning-in★ Deprovisioning on Keycloak disable★ Long-lived credentials that survive
gitlablogin-only: same as KK. Cannot grant Reporter; a Premium licence, not midPoint, is the missing piecegitlab.ts (153 ln): exists, NOT wired (GITLAB_URL empty)API POST /users (GITLAB_PROVISION=false ★)would POST /users/:id/block; today: nothing★ 6 PATs, all with expiry; 11 active users; members: 6×Owner, 1×Reporter
nextcloudgroups only, and ★ nothing today (§6.1)nextcloud.ts (168 ln): wired, but resolve-only: no disablenone (resolve-only)nothing. Session survives to its own timeout★ 68 app passwords across 16 users; 45 accounts
matrix (MAS)login-onlymatrix.ts (326 ln): wired, disable = MAS user lockPOST /users + upstream link (MATRIX_PROVISION=false ★)MAS lock ✅: the one registered adapter that really disables★ 15 personal sessions (PATs), 54 oauth2 access tokens, 1 compat token; 0 of 16 users locked
mailcowtemplate onlymailcow.ts (356 ln): wired; no disable, but real per-credential revoke + doveadm auth-cache flushnonenothing at account levelapp passwords (per-user, broker-minted, label idbroker-corp ★)
erpnext / frappelogin-onlyerpnext.ts (148 ln): wired (ERPNEXT_URL set ★), disable sets enabled: 0POST /api/resource/User (ERPNEXT_PROVISION=false ★)✅ enabled: 0, but ★ erpnext is excluded from BROKER_RECONCILE_PLATFORMS, so this only fires off the admin-event pathFrappe API key/secret pairs
hulylogin-only from the claim; the broker writes the workspace seathuly.ts (754 ln): wired; no disable at all★ armed: HULY_PROVISION=true, HULY_PROVISION_GROUPS=/Employee,/Admin, the only live group-keyed rule in the estatenothinghuly platform tokens
windmilllogin + operator bit: EE gates the restwindmill.ts (157 ln): exists, NOT wired. The only adapter with a full group converge (grant and revoke)POST /users/createwould POST /users/update {disabled:true}★ 12 offline sessions, the only client on corp holding any
immichadmin bool at first loginimmich.ts (160 ln): exists, NOT wired; syncMembership revokes admin onlyPOST /admin/usersnone possible: immich has no lock/disable flag at the pin; only a delete that schedules erasureimmich API keys
peertubelogin gate onlypeertube.ts (148 ln): exists, NOT wired; syncMembership demotes onlynot possible (AddUser cannot set pluginAuth)would POST /users/:id/blockpeertube tokens
paperlessgroups onlypaperless.ts (154 ln): exists, NOT wired; registry refuses a membership writernot possible (allauth auto-signup off)would PATCH {is_active:false}DRF tokens
netbirdlogin-onlynetbird.ts (134 ln): exists, NOT wired; registry refuses membershiprefused by ruling: Keycloak is netbird’s IdP managerwould PUT {is_blocked:true}netbird PATs, device setup keys
supabasenone safesupabase.ts (250 ln): exists, NOT wiredPOST /admin/users (refuses unverified email)would ban ~100 years (GoTrue has no “forever”)★ service_role key; Studio shared basic-auth password
vaultwardenlogin-onlyvaultwarden.ts (132 ln): exists, NOT wiredinvite emailwould POST /users/:id/disablevault session; the vault itself is E2E
giteafull (free), but by claim, not by midPointgitea.ts (201 ln): exists, NOT wired; registry refuses membership (the claim owns it)POST /admin/userswould set prohibit_logingitea tokens, SSH keys
affinelogin-onlyaffine.ts (191 ln): exists, NOT wiredGraphQL createUserwould banUseraffine sessions
supersetfull role mapping ✅, the best case in the estatenonenonenothing; FAB user rows persistsuperset DB creds are the real prize behind Admin
dependency-trackfull team mapping ✅nonenonenothingDT API keys
wazuhfull role mapping, but needs a wazuh-roles mapper nobody mints ◆nonenonenothingwazuh API tokens, agent keys
miniofull policy mapping, ★ but not wired on corpnone; registry refuses membershipnonenothing★ static access keys (no expiry)
fleet / sonarqube / mautic (SAML)login-only: SAML carries no groups at allnonenonenothingfleet enroll secrets; sonarqube tokens; mautic API creds
ciso-assistant, glitchtip, penpot, postiz, librechat, openreplay, journiv, ivatar, matomo, wordpress, kuttlogin-onlynonenonenothingper-app tokens
jitsi, uptime-kuma, defectdojonothing to drivenonenonen/an/a

★ The credential floor, measured on corp 2026-08-17

Section titled “★ The credential floor, measured on corp 2026-08-17”

These survive a Keycloak disable regardless of anything above:

whatcountexpiry
nextcloud app passwords68 across 16 usersnone
MAS personal sessions (PATs)15none
MAS oauth2 access tokens54short
gitlab PATs (unrevoked)6all 6 carry an expires_at
keycloak offline sessions12, all on windmill★ offlineSessionMaxLifespanEnabled: false → never expire by max lifespan; 30-day idle only
corp accessTokenLifespan14400s = 4ha disabled user keeps a valid access token for up to 4 hours
corp ssoSessionIdleTimeout / MaxLifespan1800s / 36000s
minio static access keyspresent ★no expiry

The 4-hour access token is the floor on every “we disabled them” claim in this document. Nothing short of back-channel logout plus per-app token revocation closes it, and only matrix currently revokes anything.


4. ★ What the broker is actually doing on corp today

Section titled “4. ★ What the broker is actually doing on corp today”

Measured from the running container’s environment (values redacted; only presence and non-secret group names read):

  • 5 adapters registered; an adapter registers only if its *_URL is non-empty: huly, nextcloud, matrix (MAS), mailcow, erpnext. Plus midpoint for org sync (not an adapter).
  • 10 adapters exist in code but are dark: gitlab, windmill, immich, peertube, paperless, netbird, supabase, vaultwarden, gitea, affine: all have empty *_URL.
  • 4 platforms reconciled: BROKER_RECONCILE_PLATFORMS=huly,nextcloud,matrix,mailcow. erpnext is registered but outside that list, so its disable only fires off the admin-event path, never the 15-minute sweep.
  • Of the 5 registered, only 2 implement disable: matrix (MAS lock) and erpnext (enabled: 0). huly, nextcloud and mailcow have no account disable at all.
  • Every group-keyed knob is empty except one: WINDMILL_GROUP_MAP=, IMMICH_ADMIN_GROUP=, PEERTUBE_ADMIN_GROUP=, PEERTUBE_MODERATOR_GROUP= are all blank. The single armed rule in the estate is HULY_PROVISION_GROUPS=/Employee,/Admin, correctly slashed.
  • All *_PROVISION flags are false except HULY_PROVISION=true.
  • BROKER_PROVISION_API=false; BROKER_RECONCILE_ENABLED=true at 900s; BROKER_EVENTS_ENABLED=true at 30s. ★ The corp realm has adminEventsEnabled: true, so the admin-event outbox path can work

Read that as: the machinery is built, five sockets are plugged in, and almost every switch is off.


midPoint 4.8.12 runs on corp, gated, ingress-less, healthy, with 0 resources and 0 shadows. Three independent reasons ◆:

  1. provisioning.serverUrl: "" ships empty and gates the whole Keycloak resource. apps/*/midpoint*/compose.yaml renders 910-shc-keycloak-resource.xml only {% if vars.provisioning.serverUrl %}, so at defaults the resource never exists.
  2. The design assumed a keycloakAdmin socket that would mint the service-account client and hand back credentials. Nothing serves that socket: not apps/, not addons/, not ce. A plug naming it could never bind. The app’s own tests assert the absence.
  3. midPoint’s JVM trusts keystore.jceks, not the JRE bundle, so every HTTPS call to Keycloak fails until a manual keytool -importcert.

When it is turned on, the shipped resource is deliberately narrow: <generateObjectClass>ri:user</generateObjectClass> only, with the in-app comment “user ONLY. The absence of ri:group here IS the scope guard; do not add it” and “group membership is written by Keycloak alone, and this resource’s schema cannot express a group.”

★ Drift found while measuring: apps/classic/midpoint-classic carries an authorization-rest-3#all authorization on the SHC Service: Org Sync role that apps/integrated/midpoint lacks, with a measured note saying REST answers 403 without it. Both apps’ docs claim the compose files are byte-identical; they are not. No test covers it. The live estate runs midpoint-classic, i.e. the one that works. Filed here, not fixed here.


6.1 ★ nextcloud’s group whitelist cannot match a Keycloak group: PROVEN

Section titled “6.1 ★ nextcloud’s group whitelist cannot match a Keycloak group: PROVEN”

The app ships ◆ apps/flagship/nextcloud/vars.yaml:105:

groupWhitelistRegex: "^(admin$|sso-)"

with groupProvisioning: "1" alongside it. The socket default is full.path=true, so the claim carries /admin, not admin.

Read out of the live user_oidc 8.10.1 source in the running container: ProvisioningService::getGroupWhitelistRegex() wraps a value that does not begin with / in /…/ delimiters, and getSyncGroupsOfToken() applies it to the raw claim value, before any prefixing:

$group = (object)['gid' => $v, 'displayName' => $v]; // $v is "/admin"
if ($groupsWhitelistRegex) {
$matchResult = preg_match($groupsWhitelistRegex, $group->gid);
if ($matchResult !== 1) { /* "not part of whitelist" */ continue; }
}

★ Executed in the live container against the delimited pattern /^(admin$|sso-)/:

/admin => 0 admin => 1
/sso-staff => 0 sso-staff => 1
/Admin => 0 /Employee => 0
/mail-users => 0 /shc-app-access => 0

Verdict: the shipped regex is incompatible with the shipped mapper. It matches none of the four groups the corp realm actually has. If group provisioning ran with these two defaults together, Nextcloud would import zero groups and log “not part of whitelist” for every one.

★ It is not firing today, for three separate reasons, each of which is itself a finding:

  1. the nextcloud Keycloak client has no shc-groups mapper (§1.2): no groups claim reaches Nextcloud at all;
  2. live provider-1-groupProvisioning = "0": group sync is off, against the app’s "1";
  3. live provider-1-groupWhitelistRegex = "": the shipped value never reached the live provider.

Nextcloud’s actual group table confirms it: two groups, shc-org (27 members) and admin (2), neither imported from Keycloak, neither named after a corp realm group. The live deployment predates the current app.

This is therefore a latent defect that fires on the next converge that both re-runs the oidc integration job (minting shc-groups) and pushes the app’s groupProvisioning=1 + regex. The fix is one of: declare groupsFullPath: "false" in nextcloud’s oidc.plug.yaml (the paperless treatment), or re-spell the regex as ^(/admin$|/sso-). The first is preferable; it makes the app’s documented naming convention true again.

Second-order trap worth recording: a value that already begins with / is treated as an already-delimited regex, so an operator “fixing” this by writing /admin gets a pattern with no closing delimiter.

Third-order trap, avoided here by luck: upstream’s uniqueUid default is 1, which sha256-hashes group gids as well as user ids. Live corp has provider-1-uniqueUid: "0", so that trap is disarmed, but the app ships uniqueUid: "", and the safe value is not the upstream default.

6.2 ★ The mapper is missing on 16 of 26 clients

Section titled “6.2 ★ The mapper is missing on 16 of 26 clients”

Restated from §1.2 because it is the single biggest gap between what the apps assume and what the estate has. Two apps’ in-app comments (supabase’s (“the mapper is minted with full.path=false”) and openreplay’s (“oidc.plug.yaml does NOT mint one”)) are stale against the current socket. Neither is load-bearing today, because neither client has the mapper at all, but both will mislead the next reader.


7.1 Which apps need central permission control?

Section titled “7.1 Which apps need central permission control?”

Not all of them. A tool where every authenticated employee is equal needs authentication, not authorization. Three tiers:

MUST CONTROL: a wrong answer here is a real loss

Section titled “MUST CONTROL: a wrong answer here is a real loss”
appwhy
gitlabsource code. Today ★ 6 of 7 member rows are Owner. Read-only is the whole point of the owner’s question
supersetAdmin includes database-connection management = credential access to every datasource. Already lowered to Gamma + mapping on 2026-08-17 (review)
wazuhthe SIEM. Read access to security telemetry for the whole estate
dependency-trackvulnerability data + the Administrators default. MR !232 is already lowering it
mautic★ every SAML identity becomes a full Administrator today. MR !231 is already fixing it. Worst of the three in the review because it is silent
nextcloudthe document store. 45 accounts, 68 app passwords
minioobject storage = the backing store for other apps’ data. ★ Not OIDC-wired at all today
matrixthe messaging system of record
vaultwardensecrets. Login-only is arguably fine because the vault is E2E, but account lifecycle must be exact
erpnext / frappeHR and finance. Also the source of the org tree midPoint governs from

NICE TO HAVE: control is worth having, absence is survivable

Section titled “NICE TO HAVE: control is worth having, absence is survivable”

paperless (groups already free and free-spelled) · gitea (best-in-class free mapping, if it is ever deployed) · windmill (script execution matters, but EE-gated: see §7.2) · immich · peertube · librechat · ciso-assistant · fleet · sonarqube · netbird · huly · supabase.

appwhy
uptime-kumasingle account, no OIDC upstream, repeatedly rejected. Gate it at forward-auth and stop
jitsino role model exists. A conference is a conference
postizthe role enum is dead self-hosted; the permission check allow-alls
ivatarno role model, and the app says so
glitchtip / penpot / journiv / matomo / kutt / wordpresseveryone-equal is the correct posture for an error tracker, a design tool and a link shortener
defectdojono SSO in the open-source build at all; --gated is the whole answer
supabase Studioone shared basic-auth credential; there is no user to authorize. Gate it, do not model it
affinelogin-only, and the licence question is unresolved

The honest headline: 10 must-control apps, of which 5 have a free claim-driven path and 5 do not.

7.2 Where is a broker role-setting adapter worth writing?

Section titled “7.2 Where is a broker role-setting adapter worth writing?”

Ranked by (value × reachability) ÷ effort. Effort baseline: existing adapters average ~180 lines including tests; the MembershipDelta {granted, revoked} contract and the mandatory logoutUser pairing already exist as the seam.

#appwhy it is worth iteffortnote
1gitlab★ The owner’s example, and the cleanest win in the estate. No claim can grant Reporter on our build at any price (§2.2) while POST /projects/:id/members {access_level: 20} is Free on both the tier and the distribution axis ○. The adapter already exists (gitlab.ts, 153 ln) with an admin PAT carrying api+sudo; it just calls zero member endpoints todaymedium: new endpoints, not a new adapter★ Use Reporter (20), not Guest (10): Guest cannot read code in a private project on self-managed
2windmillThe adapter already implements a full group converge, grant and revoke, the only one that does. It is dark because WINDMILL_URL is empty and WINDMILL_GROUP_MAP is blank ★near-zero: configuration, not code★ there are 0 instance groups and the single workspace has 0 members, so the groups must be created before the map means anything. ○ CE caps SSO at 10 users; we have 5
3immichAdapter exists and already revokes admin. Our pin (v3.0.3) evaluates the role claim at creation only, so drift is permanent without a writer ○low: wire it, set IMMICH_ADMIN_GROUPupstream fixes this in v3.1.0; a repin may retire the need
4peertubeAdapter exists and demotes. The plugin sets role at creation only ○, so promotion/demotion never sticks without a writerlowgrant side still absent by design
5mautic★ Every SAML identity is an Administrator, and SAML carries no groups at all, so only an API writer can ever fix this. PATCH /api/users/{id}/edit {role:<int>} exists ○medium: new adapterMR !231 lowers the default; an adapter would make it per-person
6fleetRole assignment is Premium ○, but POST /api/v1/fleet/users/admin {global_role} is notmedium: new adapter⚠ global_role and teams are mutually exclusive; setting one clears the other
7ciso-assistantGroup federation is Pro ○; the DRF API (/api/role-assignments/) is notmedium: new adapter
8matrixServer-admin is a boolean over PUT /_synapse/admin/v2/users/{id} ○. Adapter exists and is wired; this is one methodlow

Where an adapter is the wrong answer, and why; write this down so nobody tries:

  • minio: inverted. ★ mc admin policy attach works for MinIO-managed users only, not for OIDC identities; for OIDC users the policy must come from the claim ○. Here the IdP is the only writer and the API cannot help. (Separately: upstream archived the repo 2026-04-25; treat MinIO as end-of-life before investing.)
  • postiz: no API for roles at all; only a direct DB write ○. Do not.
  • jitsi, uptime-kuma: nothing to write to.
  • nextcloud, gitea, dependency-track, minio, paperless, netbird: the broker’s AdapterRegistry throws at boot if an adapter for these grows a syncMembership, because their group claim already owns membership on every login ◆. That is a deliberate single-writer guard. For these apps the fix is always the claim, never the adapter.
  • superset, wazuh: free claim-driven mapping already exists. Fix the mapper and the mapping, not the API.

★ One product observation the owner may want, stated once and not argued here: Gitea’s --admin-group / --restricted-group / --group-team-map does over plain OIDC, for free, precisely what GitLab charges Premium for ○. Gitea is already packaged in this catalogue (apps/integrated/gitea) and is not deployed. If read-only Git access by IdP group is the actual requirement rather than GitLab specifically, that is a licence decision, not an engineering one, and it is cheaper than both a Premium seat count and a GitLab members adapter. This document does not recommend a migration; it records that the option exists and costs nothing to evaluate.

7.3 What provisioning and deprovisioning should midPoint own?

Section titled “7.3 What provisioning and deprovisioning should midPoint own?”

Confirmed, with one sharpening. The proposed split (midPoint owns the decision and the lifecycle event and writes only to Keycloak; the broker owns every write into an app) is correct and is the only split consistent with what was measured. The sharpening is that there are three writers, not two, and the third is the group claim itself.

ERPNext (org tree, reporting line)
│ broker OrgSyncLoop, hourly ★ BROKER_ORGSYNC_INTERVAL=3600
▼
midPoint ── decides ──► writes ONE thing ──► Keycloak group membership
│ joiner / mover / leaver (and user enabled/disabled)
│ access request + manager approval
│ certification campaign outcome
│ Validity Scanner expiry
│ │
│ ✗ NEVER writes into an app │ emits
│ ✗ NEVER holds an app's admin credential ▼
│ Keycloak ADMIN_EVENTS
│ (USER, GROUP_MEMBERSHIP)
│ │
│ broker AdminEventPoller, 30s ★
│ + ReconcileLoop, 900s ★ (the floor)
│ ▼
│ ┌──────────────────────┴───────────────┐
│ │ │
│ the CLAIM writes it the BROKER writes it
│ (app reads groups at login; (adapter calls the
│ broker is FORBIDDEN to) app's admin API)
│ nextcloud gitea dtrack gitlab windmill immich
│ minio paperless netbird peertube mautic fleet …

What midPoint writes: the complete list, and nothing else:

  1. PUT /admin/realms/{realm}/users/{id}: enabled: true|false
  2. PUT /admin/realms/{realm}/users/{id}/groups/{groupId}: join
  3. DELETE /admin/realms/{realm}/users/{id}/groups/{groupId}: leave
  4. (joiner only) POST /admin/realms/{realm}/users: create

That is four calls. The connector for them is Evolveum’s Keycloak ConnId connector, already pinned in the app by URL + sha256 ◆, scoped to ri:user only; the deliberate absence of ri:group is the guard that keeps midPoint out of group definition while letting it write group membership.

What Keycloak emits: rows in its own ADMIN_EVENTS table, resource types USER and GROUP_MEMBERSHIP, operations CREATE/UPDATE/DELETE. ★ The corp realm has adminEventsEnabled: true, so this works today. Deliberately not the Event Listener SPI; that is at-most-once by construction, with no durable queue and no replay; the broker treats the admin-events table as an outbox instead, with a persisted watermark and at-least-once delivery ◆.

What the broker does with it:

eventbroker action
GROUP_MEMBERSHIP DELETE★ immediate admin.logoutUser(sub) + audit, then converge every registered adapter’s syncMembership. The logout is paired with the revocation, not left to the sweep
GROUP_MEMBERSHIP CREATEconverge syncMembership: grants only what the new membership justifies
USER UPDATE → enabled:falsemarkPrincipalDisabled + lifecycle.applyUser → every adapter’s disable
USER 404same as disable; treat as departed
(floor) every 900sfull realm sweep, so a dropped event self-heals. Deprovisioning is gated on reconcile_run.complete = true; absence of evidence is not evidence of absence ◆

The three rules that make this safe, and must not be broken:

  1. One writer per fact. An app whose group membership is set by its own OIDC claim must never also be written by a broker adapter; the registry enforces this at boot for the six claims-owned platforms ◆. Pick one writer per app and record which.
  2. midPoint never holds an app credential. Its blast radius is one Keycloak service account with manage-users, view-users, query-users, query-groups, view-realm ◆. Every app admin token stays in the broker, which is already the only service holding them.
  3. Revocation is paired with logout, always. A membership removal that does not also end the session leaves ★ up to 4 hours of valid access token. The broker already does this pairing; anything new must too.
ownsdoes not own
joiner: create the Keycloak user, seed base groups from the ERPNext org treecreating any account inside any app
mover: recompute group membership when the reporting line changeswriting a role inside any app
leaver: disable the Keycloak user, strip every groupdisabling an account inside any app
access request + manager-routed approvalthe app-side effect of the approval
certification campaign outcome → group removalverifying the app actually removed it
time-bound access via the Validity Scanner → automatic group removal at expirytoken/credential expiry inside an app

The gap this leaves, stated plainly: midPoint’s Validity Scanner can expire a group membership on schedule. It cannot expire ★ 68 Nextcloud app passwords, ★ 15 MAS PATs, ★ 12 never-expiring offline sessions, or ★ MinIO static keys. Those need per-app revocation, which is broker work, and only mailcow implements anything like it today. Certification that does not revoke credentials is theatre, and closing that is a bigger prize than any single role-mapping adapter.


8. Sources for every ○ (upstream, at our pin)

Section titled “8. Sources for every ○ (upstream, at our pin)”
claimsource
GitLab OIDC groups_attribute / required_groups / external_groups / auditor_groups = “Tier: Premium, Ultimate”; admin_groups = “Tier: Free, Premium, Ultimate” (Self-Managed)docs.gitlab.com/administration/auth/oidc/
★ The second GitLab axis: “GitLab Enterprise Edition (EE) Only?”: required_groups Yes, admin_groups Yes, auditor_groups Yes, external_groups No. Tier badge and distribution are independent; the FOSS gitlab-ce package omits the three marked Yes regardless of tierdocs.gitlab.com/integration/saml/
GitLab SCIM is Premium and “doesn’t support updating users”; it never sets access levelsdocs.gitlab.com/user/group/saml_sso/scim_setup/
GitLab SAML Group Sync (group_links → access level) = “Tier: Premium, Ultimate”docs.gitlab.com/user/group/saml_sso/group_sync/
GitLab LDAP group sync = “Tier: Premium, Ultimate”docs.gitlab.com/administration/auth/ldap/ldap_synchronization/
GitLab members API = “Tier: Free, Premium, Ultimate”; access levels 10 Guest / 15 Planner / 20 Reporter / 30 Developer / 40 Maintainer / 50 Ownerdocs.gitlab.com/api/members/, /api/project_members/
Guest cannot pull code in a private project on Self-Managed → Reporter is the read-only floordocs.gitlab.com/user/permissions/
Windmill SSO group sync = Enterprise; CE SSO capped at 10 userswindmill.dev docs
Fleet JIT provisioning + SAML role assignment = “Applies only to Fleet Premium”fleetdm.com/docs/deploy/single-sign-on-sso
Wazuh RBAC is free (GPLv2); roles administrator/readonly/users_admin/… ; Keycloak path is documented for SAML, roles_keydocumentation.wazuh.com SSO + RBAC reference
MinIO OIDC policy-claim mapping still in the AGPL build; mc admin policy attach is for MinIO-managed users only; repo archived 2026-04-25, binaries discontinuedgithub.com/minio/minio docs/sts/keycloak.md, README
Immich role claim re-evaluated every login from v3.1.0 (we pin v3.0.3)immich PR #29991
PeerTube role-property needs an integer claim and applies at creation onlypeertube auth-openid-connect plugin docs
Nextcloud user_oidc group provisioning is free; groupWhitelistRegex is a filter, not a rewrite; uniqueUid=1 hashes group gidsgithub.com/nextcloud/user_oidc issues #771, #911, #1215
Superset AUTH_ROLES_MAPPING, roles Admin/Alpha/Gamma/sql_lab/Public, freeFlask-AppBuilder security docs
Dependency-Track OIDC team sync free; memberships reset on every login when enabled, and ALPINE_OIDC_TEAMS_DEFAULT applies only when sync is disabled, so with sync on, a user in no mapped group loses everything each login. Group values must match exactly, including casedependencytrack.org docs
Wazuh: “Each group that is generated in the IDPs can only be used as one backend_role”, and “OpenSearch and the SAML assertion are case sensitive”documentation.wazuh.com SSO
Paperless groups must already exist with matching names; ..SYNC_GROUPS + ..SYNC_GROUPS_CLAIM, and groups must be added to SCOPEpaperless-ngx configuration docs
Journiv refuses to authenticate users whose claim lacks email_verified: truejourniv docs
Gitea --admin-group / --restricted-group / --group-team-map free over OIDC (SAML is the paid bit)docs.gitea.com/administration/command-line
SonarQube SAML group sync free, but groups must pre-exist and memberships cannot be API-written while sync is onSonarQube docs
Supabase self-hosted Studio = one shared basic-auth credential; user_metadata is user-editable and must not carry authzsupabase.com/docs/guides/self-hosting/docker, /platform/access-control
Uptime Kuma has no OIDC/SAML; requests rejected upstreamuptime-kuma issues #553, #3272, PR #6232
Jitsi JWT context.user carries no moderator/affiliation fieldlib-jitsi-meet/doc/tokens.md
CISO Assistant IdP group federation is a Pro featureintuitem docs
Postiz permission check allow-alls without Stripe configuredpostiz source
NetBird can fetch a user’s groups from a JWT claim self-hosted; SCIM is cloud/Commercial onlydocs.netbird.io/selfhosted/identity-providers, /manage/team/user-roles
Gitea --group-team-map does for free what GitLab charges Premium fordocs.gitea.com/administration/command-line

Explicitly UNVERIFIED: stated as unknown rather than guessed, and each one is a question for a hands-on test rather than more reading:

  • openreplay’s tier story. Two independent doc sweeps reached opposite conclusions; docs.openreplay.com/en/sso/ and the enterprise-edition page both 404. We run a soft-fork that exists to restore SSO, which is evidence but not proof. Test on our instance.
  • Wazuh’s OIDC path. Wazuh documents SAML for SSO with Keycloak as a listed IdP. Our app wires OIDC through the underlying OpenSearch security plugin, which works, but is not a first-class documented Wazuh route, so upstream support for it is not guaranteed.
  • AFFiNE’s OIDC entitlement gating. docs.affine.pro and affine.pro/pricing answer HTTP 402 (pay-per-crawl) to automated fetches. The README implies SSO is an EE feature; OIDC nonetheless ships in the MIT repo with no visible gate. Verify by hand in a browser.
  • Penpot’s update-team-member-role RPC surface; Huly’s GUEST/ReadOnlyGuest semantics; Frappe’s child-table role-update syntax.

It changes no default, wires no adapter, mints no mapper and converges nothing. Four things it surfaces are owed elsewhere and are deliberately not done here:

  1. nextcloud groupsFullPath: "false" (or the re-spelled regex): §6.1. Needs a live login in front of it.
  2. Re-converging the 16 apps whose clients have no shc-groups mapper: §1.2. That is a roll, not a docs MR.
  3. The midpoint / midpoint-classic authorization-rest-3#all drift: §5. One hunk, no test.
  4. Stale in-app comments in supabase’s and openreplay’s oidc.plug.yaml about the mapper’s full.path and existence: §6.2.

The two least-privilege defaults this sweep would have raised are already in flight as MRs !231 (mautic) and !232 (dependency-track).