OIDC: a missing groups/roles claim counts as not allowed, with safety nets (option E, v0.6.355) #1003

Closed
opened 2026-10-25 19:23:19 +00:00 by Cordy · 4 comments
Owner

Research: research-985-8-missing-claim.md (summary on #985). Decision (Nikola, 2026-10-25): option E, shipped in v0.6.355 (v0.6.354 keeps today's behaviour).

  • A missing groups/roles claim counts as not allowed. Sessions end, devices pause, and an audit entry is written (auth-signin-refused reason=not-allowed claim=absent). A Sign in again lands on the sign-in page like any other refusal.
  • Today's behaviour stays in three cases ("groups unknown": refused, nothing ends, frame 11 text):
    • Entra overage (_claim_names / hasgroups);
    • this IdP has never sent the claim on this deployment: a shared "claim seen" marker in the state directory (#742);
    • the safety stop has tripped. It trips after 3 different people in a row sign in without the claim:
      • Cairn logs an ERROR and shows a red card and a bell item;
      • the pauses caused by that streak (at most 2) are lifted;
      • the stop resets at the next sign-in that carries the claim;
      • the stop state is shared across instances.
  • A claim that is a single string counts as a one-item list (as Dex, Kubernetes and Vault do). A claim that is neither a list nor a string stays "groups unknown".
  • Later (separate issue): confirming membership through the Keycloak admin client at sign-in.
  • Users & access: a "Groups claim: last seen ..." row plus the red card when the safety stop trips.
  • Tests and live tests: as listed in the research file (Entra steps 1-5, Keycloak steps 1-5).
Research: `research-985-8-missing-claim.md` (summary on #985). Decision (Nikola, 2026-10-25): **option E**, shipped in v0.6.355 (v0.6.354 keeps today's behaviour). - **A missing groups/roles claim counts as not allowed.** Sessions end, devices pause, and an audit entry is written (`auth-signin-refused reason=not-allowed claim=absent`). A Sign in again lands on the sign-in page like any other refusal. - **Today's behaviour stays in three cases** ("groups unknown": refused, nothing ends, frame 11 text): - Entra overage (`_claim_names` / `hasgroups`); - this IdP has never sent the claim on this deployment: a shared "claim seen" marker in the state directory (#742); - **the safety stop has tripped.** It trips after 3 different people in a row sign in without the claim: - Cairn logs an ERROR and shows a red card and a bell item; - the pauses caused by that streak (at most 2) are lifted; - the stop resets at the next sign-in that carries the claim; - the stop state is shared across instances. - **A claim that is a single string** counts as a one-item list (as Dex, Kubernetes and Vault do). A claim that is neither a list nor a string stays "groups unknown". - **Later (separate issue):** confirming membership through the Keycloak admin client at sign-in. - **Users & access:** a "Groups claim: last seen ..." row plus the red card when the safety stop trips. - **Tests and live tests:** as listed in the research file (Entra steps 1-5, Keycloak steps 1-5).
Author
Owner

Mockup decisions (Nikola, 2026-10-26)

1003-groups-claim-mockup.html (11 frames) is approved as drawn, with these answers:

  • The facts sit on the Groups claim row in the Connection box.
  • The card shows counts only. Usernames stay in the admin-only audit list.
  • The bell item opens Users & access › Access.
  • The rail dot follows the existing rule (Overview only). The Overview Identity row does not turn red.
  • With oidcAllowedGroups unset, the informational line also says the person gets no admin group and no group spaces from the claim.

Open, research first. Review finding S5 on the implementation (.superpowers/sdd/2026-10-26-batch7/review-a.md):

  • The scenario: Entra with "Assignment required" off. Tenant accounts without an app role arrive without the claim, so two of them signing in right after a removed person trip the safety stop.
  • The effect: the trip lifts the removed person's pause, and Entra has no re-check to pause it again.
  • Next step: Nikola asked for deep research before deciding.
## Mockup decisions (Nikola, 2026-10-26) `1003-groups-claim-mockup.html` (11 frames) is **approved as drawn**, with these answers: - The facts sit on the Groups claim row in the Connection box. - The card shows counts only. Usernames stay in the admin-only audit list. - The bell item opens Users & access › Access. - The rail dot follows the existing rule (Overview only). The Overview Identity row does not turn red. - With `oidcAllowedGroups` unset, the informational line also says the person gets no admin group and no group spaces from the claim. **Open, research first.** Review finding S5 on the implementation (`.superpowers/sdd/2026-10-26-batch7/review-a.md`): - **The scenario:** Entra with "Assignment required" off. Tenant accounts without an app role arrive without the claim, so two of them signing in right after a removed person trip the safety stop. - **The effect:** the trip lifts the removed person's pause, and Entra has no re-check to pause it again. - **Next step:** Nikola asked for deep research before deciding.
Author
Owner

Research 9: the safety stop on providers without a re-check (research-985-9-entra-stop.md)

How likely is it?

  • In Entra, "Assignment required" defaults to false. With it off, "all users are able to sign in", including invited guests, and any member may invite guests by default. VERIFIED (Graph, Entra docs).
  • Global Administrators always get through.
  • Unassigned people arrive without roles.
  • Keycloak lets any realm user sign in to any client by default. Since Keycloak 22, a user with no group gets no claim (a silent change; Vault #31568 broke on it).
  • With the Keycloak admin client, the next re-check pauses again within 5 minutes.
  • Usage data on how often Assignment required is off: none found. UNVERIFIED.

The lift is small. A removed Entra person who never signs in on the web keeps their app passwords anyway (as in v0.6.354). The lift only undoes a catch. Someone deliberate could still trip it with two guest accounts.

The bigger flaw: the streak signal. Where a missing claim is normal (everyone without access), three visitors in a row trip the stop with nothing broken. That gives a false ERROR, card and bell, and until the next sign-in that carries the claim nobody who truly lost access is caught.

Others. Grafana, oauth2-proxy, Dex, Vault/OpenBao, Nextcloud user_oidc, Pomerium and Coder have no circuit breaker and no automatic re-admission. All refuse, and recovery is manual.

Options

  • A. Accept and document.
  • B. No automatic lift without a re-check.
  • C. Count only people whose previous sign-in carried the claim (needs a record per person).
  • D. Re-pause at reset (wrong in a real outage).
  • E′. Recommended: only sign-ins that would end something count toward the stop, meaning the person has a Cairn session on this instance or app passwords a pause would cover.
    • Visitors and guests can no longer trip the stop.
    • Lifting a removed person needs two other removed Cairn users.
    • At most 2 people are harmed before the stop.
    • Fewer shared-state writes (#742).
    • Plus A's docs: recommend Assignment required.
    • The mockup changes only in wording ("{n} people who use Cairn ..."), with an optional fact line for no-claim refusals of people with nothing in Cairn.
  • A Graph lookup for Entra stays with the planned Graph client.
## Research 9: the safety stop on providers without a re-check (research-985-9-entra-stop.md) **How likely is it?** - In Entra, "Assignment required" defaults to `false`. With it off, "all users are able to sign in", including invited guests, and any member may invite guests by default. VERIFIED (Graph, Entra docs). - Global Administrators always get through. - Unassigned people arrive without `roles`. - Keycloak lets any realm user sign in to any client by default. Since Keycloak 22, a user with no group gets no claim (a silent change; Vault #31568 broke on it). - With the Keycloak admin client, the next re-check pauses again within 5 minutes. - Usage data on how often Assignment required is off: none found. UNVERIFIED. **The lift is small.** A removed Entra person who never signs in on the web keeps their app passwords anyway (as in v0.6.354). The lift only undoes a catch. Someone deliberate could still trip it with two guest accounts. **The bigger flaw: the streak signal.** Where a missing claim is normal (everyone without access), three visitors in a row trip the stop with nothing broken. That gives a false ERROR, card and bell, and until the next sign-in that carries the claim nobody who truly lost access is caught. **Others.** Grafana, oauth2-proxy, Dex, Vault/OpenBao, Nextcloud user_oidc, Pomerium and Coder have no circuit breaker and no automatic re-admission. All refuse, and recovery is manual. **Options** - **A.** Accept and document. - **B.** No automatic lift without a re-check. - **C.** Count only people whose previous sign-in carried the claim (needs a record per person). - **D.** Re-pause at reset (wrong in a real outage). - **E′.** Recommended: only sign-ins that would **end something** count toward the stop, meaning the person has a Cairn session on this instance or app passwords a pause would cover. - Visitors and guests can no longer trip the stop. - Lifting a removed person needs two other removed Cairn users. - At most 2 people are harmed before the stop. - Fewer shared-state writes (#742). - Plus A's docs: recommend Assignment required. - The mockup changes only in wording ("{n} people who use Cairn ..."), with an optional fact line for no-claim refusals of people with nothing in Cairn. - A Graph lookup for Entra stays with the planned Graph client.
Author
Owner

Decision (Nikola, 2026-10-26), after research 9

  • The streak counts only sign-ins that would end something, meaning the person has a Cairn session on this instance or app passwords a pause would cover. The decision text becomes "3 different people whose access it would end".
  • The automatic lift stays, at most 2 people.
  • Docs recommend Entra "Assignment required".
  • Wording: "{n} people who use Cairn signed in in a row without the groups claim" on the card and bell (the approved mockup, text only).
  • Optional fact line: today's no-claim refusals from people with nothing in Cairn, with the hint "Assignment required is probably off".
  • Graph lookup: stays with the Graph client issue, not v0.6.355.
## Decision (Nikola, 2026-10-26), after research 9 - **The streak counts only sign-ins that would end something**, meaning the person has a Cairn session on this instance or app passwords a pause would cover. The decision text becomes "3 different people whose access it would end". - **The automatic lift stays**, at most 2 people. - **Docs** recommend Entra "Assignment required". - **Wording:** "{n} people who use Cairn signed in in a row without the groups claim" on the card and bell (the approved mockup, text only). - **Optional fact line:** today's no-claim refusals from people with nothing in Cairn, with the hint "Assignment required is probably off". - **Graph lookup:** stays with the Graph client issue, not v0.6.355.
Cordy referenced this issue from a commit 2026-10-26 04:24:08 +00:00
Author
Owner

Released in v0.6.355 (PR #1006), live on both dogfoods

Live checks (2026-10-26, after Nikola signed in):

  • directory.oidc.claimSeen is state=seen on both instances, set by Nikola's sign-in. claimStop.tripped=false and noAccessToday.count=0.
  • Users & access › Connection › Groups claim shows "Last seen in a sign-in 2 minutes ago (this instance)". Because oidcAllowedGroups is unset, the decided informational line also appears: "a sign-in without this claim is accepted; the person then gets no admin group and no group spaces from the claim".
  • The bell has no claim-stop item, as expected.

Not testable on the dogfoods. The refusal, safety-stop trip, lift and reset paths need oidcAllowedGroups set and test users without the claim. They are covered by the Go and web tests and listed in #1005 sections B and C (Keycloak dogfood steps and Entra steps from research-985-8 §8 and research-985-9).

Closing; the live steps stay tracked in #1005.

## Released in v0.6.355 (PR #1006), live on both dogfoods **Live checks (2026-10-26, after Nikola signed in):** - `directory.oidc.claimSeen` is `state=seen` on both instances, set by Nikola's sign-in. `claimStop.tripped=false` and `noAccessToday.count=0`. - Users & access › Connection › Groups claim shows "Last seen in a sign-in 2 minutes ago (this instance)". Because `oidcAllowedGroups` is unset, the decided informational line also appears: "a sign-in without this claim is accepted; the person then gets no admin group and no group spaces from the claim". - The bell has no claim-stop item, as expected. **Not testable on the dogfoods.** The refusal, safety-stop trip, lift and reset paths need `oidcAllowedGroups` set and test users without the claim. They are covered by the Go and web tests and listed in #1005 sections B and C (Keycloak dogfood steps and Entra steps from research-985-8 §8 and research-985-9). Closing; the live steps stay tracked in #1005.
Cordy closed this issue 2026-10-26 10:17:29 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#1003
No description provided.