Mockup round: Certificates admin card (#740), LDAP facts in Users & access and login messages (#741) #985

Closed
opened 2026-10-24 11:14:45 +00:00 by Cordy · 9 comments
Owner

Follow-up to the batch 5 decisions (2026-10-24). The backend for these ships in v0.6.352; the UI waits for approved whole-page mockups.

  1. Certificates card in Administration › Overview (#740):
    • server certificate expiry;
    • the CAs loaded from the trust directory (count, names, files that are not certificates);
    • recent TLS failures per outbound integration;
    • a red card while ldapInsecureSkipVerify is on;
    • one row per instance (#742);
    • bell items for expiry and failures.
  2. Users & access, read-only LDAP rows (#741): directory type, the DCs, the allowed groups and the group base, the last re-check and its result.
  3. Login page messages (#741): "Your account is not allowed to use Cairn" and "Your password has expired", shown only after the password has been verified. Whether AD returns 532/773 only after a correct password must be confirmed on a real DC first.
  4. Audit and bell texts for not-allowed (removed from the allowed group).

Research: research-740.md §4.4/UI and research-741.md §5/UI.

Follow-up to the batch 5 decisions (2026-10-24). The backend for these ships in v0.6.352; the UI waits for approved whole-page mockups. 1. **Certificates card** in Administration › Overview (#740): - server certificate expiry; - the CAs loaded from the trust directory (count, names, files that are not certificates); - recent TLS failures per outbound integration; - a red card while `ldapInsecureSkipVerify` is on; - one row per instance (#742); - bell items for expiry and failures. 2. **Users & access, read-only LDAP rows** (#741): directory type, the DCs, the allowed groups and the group base, the last re-check and its result. 3. **Login page messages** (#741): "Your account is not allowed to use Cairn" and "Your password has expired", shown only after the password has been verified. Whether AD returns 532/773 only after a correct password must be confirmed on a real DC first. 4. **Audit and bell texts** for `not-allowed` (removed from the allowed group). Research: `research-740.md` §4.4/UI and `research-741.md` §5/UI.
Author
Owner

Research round (2026-10-24): five topics, primary sources fetched in-session

Every claim is marked VERIFIED (primary source or Cairn code read this round), INFERRED (follows from verified facts) or UNVERIFIED (needs a live test). Full files with line references and sources: scratch/b7e/backlog/research-985-{1-ad-codes,2-messages,3-certs,4-ldapfacts,5-loose}.md.

1. AD bind sub-codes (login messages)

  • Microsoft does not document the order of checks for a simple bind; [MS-ADTS] calls the data text "strictly informational". VERIFIED.
  • Vendor KBs (Dell 2025, LDAPWiki, Broadcom): 530/531/532/533/701/773 only after a correct password; 775 (locked) also with a wrong password. Secondary sources only.
  • Samba source (master): lockout and Protected Users (52f) are checked before the password, all other states after it. Samba never returns 525. VERIFIED.
  • 525 cannot leak through Cairn: Cairn searches first and binds only an existing DN. VERIFIED (code).
  • Correction: "logon type not granted" is 0x569, not 534.
  • Still needs a real DC (15 min, script in research-985-1 §3): confirm 532/773 and 533/701 only come after a correct password on Windows Server 2016 to 2025. Until then those codes stay generic.
  • New finding: a timing difference (unknown name = one search; known name = search + bind) is an enumeration signal (ASVS 5.0 6.3.8, L3). UNVERIFIED in size; measure.
  • Today every LDAP refusal counts as a wrong password for the throttle, including a correct password refused as not allowed (ldap.go:1005/1015/1025, throttle.go:409). This contradicts requiredevices.go:10-12 and research-741 D6. VERIFIED (code).
  • A stale sync client with an old password can lock the Windows account through Cairn (sequential retries each reach AD). INFERRED.

2. Messages

  • "Not allowed" after a verified credential, without group names, is acceptable. The honest counter-argument is OWASP listing "account disabled" as a response to avoid. Keycloak does it after the password (VERIFIED); Nextcloud before it (a pitfall to avoid).
  • Proposed texts in research-985-2 (EN/DE/FR/IT), with neutral "IT support" instead of "administrator".
  • WCAG 2.2: #msg is role="status" (login.html:101); errors should use role="alert".
  • OIDC refusal today is a bare "login failed" page (oidc.go:125). Proposed: back to /login?refused=not-allowed with "Sign out of single sign-on", because the IdP session would sign the same person in again.
  • Implementation trap: the LDAP single-flight drops specific errors (ldap.go:332-343, 367-372).
  • The audit list hides the note for directory verbs (index.html:8379, 8476).

3. Certificates card

  • No backend exists yet: no status getters, no endpoint, skipped trust files only logged, no failure tracking, no per-instance store.
  • Thresholds: CA/B lifetimes 200 d (from 2026-03-15), 100 d (2027-03-15), 47 d (2029-03-15); Let's Encrypt default 64 d from 2027-02-10 and 45 d from 2028-02-16, expiry emails ended 2025-06-04, 6-day profile exists; ARI is RFC 9773. VERIFIED. The fixed 14 days (trust.go:39-43) warns permanently on a 6-day cert and is short for a 1-year private cert.
  • VerifyConnection cannot record failures (Go calls it only after verification succeeded). VERIFIED. Failures must be caught in the rotating RoundTrip, a gRPC wrapper and the LDAP dial.
  • Hostnames, SANs and error details are admin-only and never go into /metrics labels (/metrics is unauthenticated).

4. LDAP and OIDC facts in Users & access

  • The "Connected" chip is a constant (index.html:20169, 19452-19454), never measured. VERIFIED.
  • /api/v1/admin/access (access.go:27-57) has no LDAP facts.
  • Keycloak: GroupExists/UserGroupRefs handle subgroups correctly; findGroup (spaces.go:167-179) looks only at top-level results (bug), and bare names match at any depth (recheck.go:155), the class Keycloak fixed as CVE-2026-19608.
  • Entra: no groups-overage detection; group assignment needs P1/P2 and does not cascade to nested groups.

5. Loose ends and corrections to shipped docs

Several statements in the v0.6.352 docs were based on old knowledge and are wrong or incomplete. Filed together in the docs issue below:

  • SSL_CERT_FILE replaces only the bundle file; Go still reads /etc/ssl/certs. The warning that it "removes every public root" is wrong.
  • Windows Server 2025 requires LDAP signing only on new deployments; upgraded domains keep their setting.
  • Global Catalog holds members of universal groups only (domain local and global are both missing).
  • Gotenberg's writable root is needed for Chromium (/home/gotenberg), not LibreOffice (its profile is in /tmp).
  • The Vault/OpenBao Agent injector example cannot work with the chart (automountServiceAccountToken: false, no service-account values).
  • distroless stopped building debian12 on 2026-09-10; .ko.yaml:4 still uses it.
  • Samba bug 15515: an in-chain search can return nothing under a restrictive ACL, which Cairn reads as "not a member".

Contradiction to decide

Topic 1 recommends that a correct password refused for account state counts as neutral for the throttle; topic 2 recommends keep counting. Asked as a decision.

Live tests still needed

  1. Windows DC: 532/773/533/701 only after a correct password (research-985-1 §3).
  2. Timing: wrong password vs correct-but-not-allowed (Samba/AD).
  3. Keycloak 26: prompt=select_account/prompt=login; findGroup with an admin subgroup.
  4. Entra: unassigned user (AADSTS50105 path); user in more than 200 groups.
  5. Screen readers: role="alert" repeated message.
  6. TLS rotation timing per pod.

New issues for the findings are linked in the next comment.

## Research round (2026-10-24): five topics, primary sources fetched in-session Every claim is marked VERIFIED (primary source or Cairn code read this round), INFERRED (follows from verified facts) or UNVERIFIED (needs a live test). Full files with line references and sources: `scratch/b7e/backlog/research-985-{1-ad-codes,2-messages,3-certs,4-ldapfacts,5-loose}.md`. ### 1. AD bind sub-codes (login messages) - Microsoft does not document the order of checks for a simple bind; [MS-ADTS] calls the data text "strictly informational". VERIFIED. - Vendor KBs (Dell 2025, LDAPWiki, Broadcom): 530/531/532/533/701/773 only after a correct password; **775 (locked) also with a wrong password**. Secondary sources only. - Samba source (master): lockout and Protected Users (52f) are checked **before** the password, all other states after it. Samba never returns 525. VERIFIED. - 525 cannot leak through Cairn: Cairn searches first and binds only an existing DN. VERIFIED (code). - Correction: "logon type not granted" is `0x569`, not 534. - **Still needs a real DC (15 min, script in research-985-1 §3):** confirm 532/773 and 533/701 only come after a correct password on Windows Server 2016 to 2025. Until then those codes stay generic. - New finding: a timing difference (unknown name = one search; known name = search + bind) is an enumeration signal (ASVS 5.0 6.3.8, L3). UNVERIFIED in size; measure. - Today every LDAP refusal counts as a wrong password for the throttle, including a correct password refused as not allowed (ldap.go:1005/1015/1025, throttle.go:409). This contradicts requiredevices.go:10-12 and research-741 D6. VERIFIED (code). - A stale sync client with an old password can lock the Windows account through Cairn (sequential retries each reach AD). INFERRED. ### 2. Messages - "Not allowed" after a verified credential, without group names, is acceptable. The honest counter-argument is OWASP listing "account disabled" as a response to avoid. Keycloak does it after the password (VERIFIED); Nextcloud before it (a pitfall to avoid). - Proposed texts in research-985-2 (EN/DE/FR/IT), with neutral "IT support" instead of "administrator". - WCAG 2.2: `#msg` is `role="status"` (login.html:101); errors should use `role="alert"`. - OIDC refusal today is a bare "login failed" page (oidc.go:125). Proposed: back to `/login?refused=not-allowed` with "Sign out of single sign-on", because the IdP session would sign the same person in again. - Implementation trap: the LDAP single-flight drops specific errors (ldap.go:332-343, 367-372). - The audit list hides the note for directory verbs (index.html:8379, 8476). ### 3. Certificates card - **No backend exists yet**: no status getters, no endpoint, skipped trust files only logged, no failure tracking, no per-instance store. - Thresholds: CA/B lifetimes 200 d (from 2026-03-15), 100 d (2027-03-15), 47 d (2029-03-15); Let's Encrypt default 64 d from 2027-02-10 and 45 d from 2028-02-16, expiry emails ended 2025-06-04, 6-day profile exists; ARI is RFC 9773. VERIFIED. The fixed 14 days (trust.go:39-43) warns permanently on a 6-day cert and is short for a 1-year private cert. - `VerifyConnection` cannot record failures (Go calls it only after verification succeeded). VERIFIED. Failures must be caught in the rotating RoundTrip, a gRPC wrapper and the LDAP dial. - Hostnames, SANs and error details are admin-only and never go into `/metrics` labels (`/metrics` is unauthenticated). ### 4. LDAP and OIDC facts in Users & access - The "Connected" chip is a constant (index.html:20169, 19452-19454), never measured. VERIFIED. - `/api/v1/admin/access` (access.go:27-57) has no LDAP facts. - Keycloak: `GroupExists`/`UserGroupRefs` handle subgroups correctly; **`findGroup` (spaces.go:167-179) looks only at top-level results** (bug), and bare names match at any depth (recheck.go:155), the class Keycloak fixed as CVE-2026-19608. - Entra: no groups-overage detection; group assignment needs P1/P2 and does not cascade to nested groups. ### 5. Loose ends and corrections to shipped docs Several statements in the v0.6.352 docs were based on old knowledge and are wrong or incomplete. Filed together in the docs issue below: - `SSL_CERT_FILE` replaces only the bundle *file*; Go still reads `/etc/ssl/certs`. The warning that it "removes every public root" is wrong. - Windows Server 2025 requires LDAP signing only on **new** deployments; upgraded domains keep their setting. - Global Catalog holds members of **universal** groups only (domain local and global are both missing). - Gotenberg's writable root is needed for Chromium (`/home/gotenberg`), not LibreOffice (its profile is in `/tmp`). - The Vault/OpenBao Agent injector example cannot work with the chart (`automountServiceAccountToken: false`, no service-account values). - distroless stopped building debian12 on 2026-09-10; `.ko.yaml:4` still uses it. - Samba bug 15515: an in-chain search can return nothing under a restrictive ACL, which Cairn reads as "not a member". ### Contradiction to decide Topic 1 recommends that a correct password refused for account state counts as **neutral** for the throttle; topic 2 recommends **keep counting**. Asked as a decision. ### Live tests still needed 1. Windows DC: 532/773/533/701 only after a correct password (research-985-1 §3). 2. Timing: wrong password vs correct-but-not-allowed (Samba/AD). 3. Keycloak 26: `prompt=select_account`/`prompt=login`; `findGroup` with an admin subgroup. 4. Entra: unassigned user (AADSTS50105 path); user in more than 200 groups. 5. Screen readers: `role="alert"` repeated message. 6. TLS rotation timing per pod. New issues for the findings are linked in the next comment.
Author
Owner

New issues from the research:

  • #987 Keycloak findGroup ignores subgroups
  • #988 Keycloak bare group names match at any depth (CVE-2026-19608 class), needs a decision
  • #989 Entra groups overage not detected
  • #990 Samba bug 15515: nested check returns nothing, read as "not a member"
  • #991 LDAP sign-in timing reveals existing accounts (measure first)
  • #992 AD lockout through Cairn (refused-credential cache, client address in the log)
  • #993 distroless debian12 builds removed: move to static-debian13
  • #994 Chart: Agent injector example cannot work
  • #995 Docs corrections (the wrong or incomplete v0.6.352 statements)
  • #996 Entra: client certificate (private_key_jwt)
  • #997 Converter with a read-only root (live test)
  • #998 Audit list hides the reason for directory verbs

The OIDC-state-per-process finding went to #742.

New issues from the research: - #987 Keycloak `findGroup` ignores subgroups - #988 Keycloak bare group names match at any depth (CVE-2026-19608 class), needs a decision - #989 Entra groups overage not detected - #990 Samba bug 15515: nested check returns nothing, read as "not a member" - #991 LDAP sign-in timing reveals existing accounts (measure first) - #992 AD lockout through Cairn (refused-credential cache, client address in the log) - #993 distroless debian12 builds removed: move to static-debian13 - #994 Chart: Agent injector example cannot work - #995 Docs corrections (the wrong or incomplete v0.6.352 statements) - #996 Entra: client certificate (`private_key_jwt`) - #997 Converter with a read-only root (live test) - #998 Audit list hides the reason for directory verbs The OIDC-state-per-process finding went to #742.
Author
Owner

Decisions so far (Nikola, 2026-10-24)

  • Not allowed (after a verified credential): specific message, plus a config switch that forces the generic "Invalid credentials." text.
  • Password must be changed (532/773): one message plus an optional "Change password" link from auth.passwordChangeUrl; no password change inside Cairn; shipped only for the codes the real-DC test confirms.
  • Throttle and OIDC refusal: Nikola asked for more research first. Done below.

Research 6: throttle and correct-but-refused passwords (research-985-6-throttle.md)

  • No standard defines a "failed attempt" for this case (ASVS 5.0, OWASP cheat sheets, NIST SP 800-63B-4 silent; BSI ORP.4 text not retrievable). VERIFIED.
  • Others: neutral Keycloak (disabled user: forceChallenge, no logFailure), Samba AD (no badPwdCount change), Nextcloud WebDAV; counted Keycloak "Deny access" step, Nextcloud web login (and before the password), GitLab Git over HTTP (IP only), Authelia, Django. Entra not documented. VERIFIED (source).
  • The "oracle" is real (MSOLSpray logs AADSTS50055 "password expired" as SUCCESS, VERIFIED), but per-account counting does not cap it: stuffing and spraying try each account once; the spray detector behaves the same under every option; a botnet trips nothing under any option. The defences are the message switch, the audit entry with the client address, and timing (#991). INFERRED.
  • Pure neutral has two real problems: with the generic switch on, an instant answer vs a held wrong-password answer makes the throttle itself the oracle (ASVS 6.3.8; Keycloak CVE-2021-3513 is the same class); and stale devices with the account password reach LDAP on every request without a cap.
  • Counting as today has real costs for real people: after a mass removal, an office NAT trips the spray detector (30 s blocks for new staff); a re-admitted person gets up to 15 min of 429 and a false "N failed sign-ins" notice from their own devices.
  • Recommended option D, "count like a directory outage" (existing pattern, throttle.go:420-482): spends the account's budget with the same delays and 429 (indistinguishable from a wrong password), but never feeds the failed-sign-in notice, the bell limit items or the spray detector; cleared when the re-check admits the person again (OnResume). Safe even if an AD code turns out to come with a wrong password too.
  • Correction: topic 1's "contradiction with requiredevices.go" is a different case (there the person is allowed).

Research 7: OIDC refusal (research-985-7-oidc-refusal.md)

  • Security bug found: login CSRF, filed as #999 (sign-in state not bound to the browser; RFC 9700). Fix before the UI work.
  • Grafana, Nextcloud user_oidc, oauth2-proxy, Pomerium, Cloudflare Access: own "no access" page, no group names, none signs out of the IdP automatically. Grafana avoids the loop by not redirecting to the IdP again after a failure; Pomerium offers sign-out from a "signed in but denied" state. VERIFIED.
  • RP-initiated logout without a session is "explicitly not an error"; without id_token_hint the IdP must ask for confirmation (Keycloak confirmation page, Entra account picker). VERIFIED.
  • Keycloak does not act on prompt=select_account; prompt=login for another user ends on "Please sign out first". Entra supports select_account. VERIFIED (code/docs), live test pending.
  • Recommended: every callback result without a session goes back to /login with a marker (refused=not-allowed|failed|idp|removed); main action "Sign out of single sign-on" with the note that it also signs out of other apps, second action "Continue with single sign-on"; without oidcLogoutUrl suggest a private window. Every refusal treated like a re-check "not allowed" (end sessions, pause devices, audit), except a missing or overage groups claim (#989). Tell a person removed at re-check why they were signed out. Keep no ID token for refused people. "Use a different account" only for Entra after a test. Docs: also gate at the IdP. CrossOriginProtection on POST /auth/logout.
## Decisions so far (Nikola, 2026-10-24) - **Not allowed (after a verified credential):** specific message, plus a config switch that forces the generic "Invalid credentials." text. - **Password must be changed (532/773):** one message plus an optional "Change password" link from `auth.passwordChangeUrl`; no password change inside Cairn; shipped only for the codes the real-DC test confirms. - **Throttle** and **OIDC refusal:** Nikola asked for more research first. Done below. ## Research 6: throttle and correct-but-refused passwords (research-985-6-throttle.md) - No standard defines a "failed attempt" for this case (ASVS 5.0, OWASP cheat sheets, NIST SP 800-63B-4 silent; BSI ORP.4 text not retrievable). VERIFIED. - Others: **neutral** Keycloak (disabled user: `forceChallenge`, no `logFailure`), Samba AD (no `badPwdCount` change), Nextcloud WebDAV; **counted** Keycloak "Deny access" step, Nextcloud web login (and before the password), GitLab Git over HTTP (IP only), Authelia, Django. Entra not documented. VERIFIED (source). - The "oracle" is real (MSOLSpray logs AADSTS50055 "password expired" as SUCCESS, VERIFIED), but **per-account counting does not cap it**: stuffing and spraying try each account once; the spray detector behaves the same under every option; a botnet trips nothing under any option. The defences are the message switch, the audit entry with the client address, and timing (#991). INFERRED. - Pure neutral has two real problems: with the generic switch on, an instant answer vs a held wrong-password answer makes the **throttle itself the oracle** (ASVS 6.3.8; Keycloak CVE-2021-3513 is the same class); and stale devices with the account password reach LDAP on every request without a cap. - Counting as today has real costs for real people: after a mass removal, an office NAT trips the spray detector (30 s blocks for new staff); a re-admitted person gets up to 15 min of 429 and a false "N failed sign-ins" notice from their own devices. - **Recommended option D, "count like a directory outage"** (existing pattern, throttle.go:420-482): spends the account's budget with the same delays and 429 (indistinguishable from a wrong password), but never feeds the failed-sign-in notice, the bell limit items or the spray detector; cleared when the re-check admits the person again (`OnResume`). Safe even if an AD code turns out to come with a wrong password too. - Correction: topic 1's "contradiction with requiredevices.go" is a different case (there the person is allowed). ## Research 7: OIDC refusal (research-985-7-oidc-refusal.md) - **Security bug found: login CSRF**, filed as #999 (sign-in state not bound to the browser; RFC 9700). Fix before the UI work. - Grafana, Nextcloud user_oidc, oauth2-proxy, Pomerium, Cloudflare Access: own "no access" page, no group names, none signs out of the IdP automatically. Grafana avoids the loop by not redirecting to the IdP again after a failure; Pomerium offers sign-out from a "signed in but denied" state. VERIFIED. - RP-initiated logout without a session is "explicitly not an error"; without `id_token_hint` the IdP must ask for confirmation (Keycloak confirmation page, Entra account picker). VERIFIED. - Keycloak does not act on `prompt=select_account`; `prompt=login` for another user ends on "Please sign out first". Entra supports `select_account`. VERIFIED (code/docs), live test pending. - Recommended: every callback result without a session goes back to `/login` with a marker (`refused=not-allowed|failed|idp|removed`); main action "Sign out of single sign-on" with the note that it also signs out of other apps, second action "Continue with single sign-on"; without `oidcLogoutUrl` suggest a private window. Every refusal treated like a re-check "not allowed" (end sessions, pause devices, audit), except a missing or overage groups claim (#989). Tell a person removed at re-check why they were signed out. Keep no ID token for refused people. "Use a different account" only for Entra after a test. Docs: also gate at the IdP. `CrossOriginProtection` on `POST /auth/logout`.
Author
Owner

All decisions (Nikola, 2026-10-24)

Sign-in

  • Not allowed: specific message after a verified credential; config switch forces the generic text.
  • 532/773: one "password must be changed" message plus optional auth.passwordChangeUrl link; no change inside Cairn; only codes confirmed by the real-DC test.
  • Throttle: option D, a correct-but-refused password counts like a directory outage (same delays and 429; no failed-sign-in notice, no bell limit item, no spray; cleared on re-admission via OnResume).
  • Hint after 3 failures (covers AD lockout 775, which stays generic).
  • Neutral "IT support" wording in EN/DE/FR/IT, also for the existing disabled message.
  • A person removed at re-check is told why on the next visit.
  • New audit verb auth-signin-refused (admin tier; user, client address, source, reason; never group names), reasons visible in the audit list (#998).

OIDC

  • Refusal goes back to /login with a marker; main action "Sign out of single sign-on" (with the note about other apps), second "Continue with single sign-on"; private-window hint without oidcLogoutUrl. No automatic IdP sign-out, no ID token kept. "Use a different account" only for Entra after a test.
  • Every oidcAllowedGroups refusal ends sessions, pauses devices and is audited, except a missing or overage groups claim (#989).
  • #988: a bare group name means a top-level group (Keycloak 26.8 rule), same at sign-in and re-check; WARN when a bare name exists only as a subgroup; upgrade note.
  • #999 login CSRF: own release first (v0.6.353).

Users & access

  • Facts block (configured vs observed) replacing the constant chip; both admin tools Check connection and Check a person (admin session only, config targets only, rate-limited, audited).

Certificates card

  • Thresholds configurable: default the lifetime rule (amber min(14 d, lifetime/4), red min(7 d, lifetime/10); 30 d / 7 d for lifetimes of 100 d or more); tls.expiryWarn / tls.expiryCritical override for every certificate; start refuses critical >= warn.
  • ldapAllowPlain gets the same red non-dismissable card as ldapInsecureSkipVerify.
  • Shared per-instance status document (spacealerts pattern) plus per-instance metrics without hostnames.
  • Bell: pref key certificates mutes expiring and failing; expired and insecure not mutable; every tlstrust.HTTPClient call site names its integration (guard test); proxy row text only for now.

Loose ends

  • #994: chart serviceAccount values plus projected token for the injector only.
  • #990: docs now plus the direct-member guard in code.
  • #992: refused-credential cache plus client address in the AD log line.

Order: 1) #999 as v0.6.353. 2) Whole-page mockups for #985. 3) Spec and plan for the #985 batch with #987, #988, #989, #990, #992, #993, #994, #995, #998. 4) #991 timing and the real-DC test (#741) in parallel.

## All decisions (Nikola, 2026-10-24) **Sign-in** - Not allowed: specific message after a verified credential; config switch forces the generic text. - 532/773: one "password must be changed" message plus optional `auth.passwordChangeUrl` link; no change inside Cairn; only codes confirmed by the real-DC test. - Throttle: **option D**, a correct-but-refused password counts like a directory outage (same delays and 429; no failed-sign-in notice, no bell limit item, no spray; cleared on re-admission via `OnResume`). - Hint after 3 failures (covers AD lockout 775, which stays generic). - Neutral "IT support" wording in EN/DE/FR/IT, also for the existing disabled message. - A person removed at re-check is told why on the next visit. - New audit verb `auth-signin-refused` (admin tier; user, client address, source, reason; never group names), reasons visible in the audit list (#998). **OIDC** - Refusal goes back to `/login` with a marker; main action "Sign out of single sign-on" (with the note about other apps), second "Continue with single sign-on"; private-window hint without `oidcLogoutUrl`. No automatic IdP sign-out, no ID token kept. "Use a different account" only for Entra after a test. - Every `oidcAllowedGroups` refusal ends sessions, pauses devices and is audited, except a missing or overage groups claim (#989). - #988: a bare group name means a **top-level** group (Keycloak 26.8 rule), same at sign-in and re-check; WARN when a bare name exists only as a subgroup; upgrade note. - #999 login CSRF: own release first (v0.6.353). **Users & access** - Facts block (configured vs observed) replacing the constant chip; both admin tools **Check connection** and **Check a person** (admin session only, config targets only, rate-limited, audited). **Certificates card** - Thresholds **configurable**: default the lifetime rule (amber min(14 d, lifetime/4), red min(7 d, lifetime/10); 30 d / 7 d for lifetimes of 100 d or more); `tls.expiryWarn` / `tls.expiryCritical` override for every certificate; start refuses critical >= warn. - `ldapAllowPlain` gets the same red non-dismissable card as `ldapInsecureSkipVerify`. - Shared per-instance status document (spacealerts pattern) plus per-instance metrics without hostnames. - Bell: pref key `certificates` mutes expiring and failing; expired and insecure not mutable; every `tlstrust.HTTPClient` call site names its integration (guard test); proxy row text only for now. **Loose ends** - #994: chart `serviceAccount` values plus projected token for the injector only. - #990: docs now plus the direct-member guard in code. - #992: refused-credential cache plus client address in the AD log line. **Order:** 1) #999 as v0.6.353. 2) Whole-page mockups for #985. 3) Spec and plan for the #985 batch with #987, #988, #989, #990, #992, #993, #994, #995, #998. 4) #991 timing and the real-DC test (#741) in parallel.
Author
Owner

Mockup round (2026-10-25)

Three whole-page mockups. Each one uses Cairn's real CSS copied from web/static/index.html and login.html at main 8b54afdf, and every frame has a notes panel with the exact strings (EN/DE), data sources, edge states and accessibility. The files are in Nikola's design folder:

  • 985-a-signin-mockup.html, 20 frames:
    • 1: today's generic refusal.
    • 2a/2b: "not allowed", with and without the operator help line.
    • 3: the generic switch.
    • 4a/4b: password must be changed, with and without auth.passwordChangeUrl.
    • 5: the hint after 3 failures.
    • 6: throttled, unchanged.
    • 7a/7b: the disabled message, today and with "IT support".
    • 8a/8b/8c: OIDC refused with "Sign out of single sign-on", without oidcLogoutUrl, and DE dark.
    • 9a/9b/9c: the bare page today, refused=failed, refused=idp.
    • 10a/10b/10c: removed at re-check.
    • 11: Sign in again refused in the Devices dialog.
  • 985-b-users-access-mockup.html, 9 frames:
    • 1: today's constant "Connected" chip.
    • 2/2b: the LDAP facts in three boxes, plus the Overview chip.
    • 3: degraded state (ldapAllowPlain red card, second DC answering, missing allowed group, nested groups not verified).
    • 4: Check connection.
    • 5a/5b: Check a person.
    • 6: OIDC Keycloak, including the #988 bare-name warning.
    • 7: OIDC Entra, including the #989 overage counter.
  • 985-c-certificates-mockup.html, 12 frames:
    • 1a/1b/1c: Overview today, then the Certificates section collapsed and expanded.
    • 2: behind a proxy, with a failing integration and a skipped CA file.
    • 3: expiring and expired, an instance not reporting, configured thresholds.
    • 4a/4b: red cards for ldapInsecureSkipVerify and ldapAllowPlain.
    • 5a/5b/5c: bell items and the certificates mute preference.
    • 6a/6b: the audit list today and with reasons, auth-signin-refused and the option D note.

Notes per mockup: .superpowers/sdd/2026-10-25-985/mockup-{a,b,c}-notes.md. FR/IT for the new strings are still to be written at build time. The open questions go to Nikola next.

## Mockup round (2026-10-25) Three whole-page mockups. Each one uses Cairn's real CSS copied from `web/static/index.html` and `login.html` at main 8b54afdf, and every frame has a notes panel with the exact strings (EN/DE), data sources, edge states and accessibility. The files are in Nikola's design folder: - `985-a-signin-mockup.html`, 20 frames: - 1: today's generic refusal. - 2a/2b: "not allowed", with and without the operator help line. - 3: the generic switch. - 4a/4b: password must be changed, with and without `auth.passwordChangeUrl`. - 5: the hint after 3 failures. - 6: throttled, unchanged. - 7a/7b: the disabled message, today and with "IT support". - 8a/8b/8c: OIDC refused with "Sign out of single sign-on", without `oidcLogoutUrl`, and DE dark. - 9a/9b/9c: the bare page today, `refused=failed`, `refused=idp`. - 10a/10b/10c: removed at re-check. - 11: Sign in again refused in the Devices dialog. - `985-b-users-access-mockup.html`, 9 frames: - 1: today's constant "Connected" chip. - 2/2b: the LDAP facts in three boxes, plus the Overview chip. - 3: degraded state (`ldapAllowPlain` red card, second DC answering, missing allowed group, nested groups not verified). - 4: Check connection. - 5a/5b: Check a person. - 6: OIDC Keycloak, including the #988 bare-name warning. - 7: OIDC Entra, including the #989 overage counter. - `985-c-certificates-mockup.html`, 12 frames: - 1a/1b/1c: Overview today, then the Certificates section collapsed and expanded. - 2: behind a proxy, with a failing integration and a skipped CA file. - 3: expiring and expired, an instance not reporting, configured thresholds. - 4a/4b: red cards for `ldapInsecureSkipVerify` and `ldapAllowPlain`. - 5a/5b/5c: bell items and the `certificates` mute preference. - 6a/6b: the audit list today and with reasons, `auth-signin-refused` and the option D note. Notes per mockup: `.superpowers/sdd/2026-10-25-985/mockup-{a,b,c}-notes.md`. FR/IT for the new strings are still to be written at build time. The open questions go to Nikola next.
Author
Owner

Mockup decisions (Nikola, 2026-10-25)

A, sign-in: approved as drawn.

  • The generic switch covers only the three password-form messages (not allowed, must change password, disabled). The OIDC page is outside it.
  • auth.signinHelp is one operator string, shown under every message that names IT support.
  • A 429 counts toward the three-failure hint. The Change password link appears under the hint when it is set.
  • Frame 11 (groups claim missing or overage) reads "Cairn could not check your access" and is audited.
  • refused=idp shows no sign-out block.
  • "IT support" replaces "administrator" only in the sign-in messages for now.

B, Users & access: approved as drawn, plus:

  • The ldapAllowPlain red card appears on Overview and on Users & access.
  • The Domain Users note appears only when an allowed entry is named Domain Users.
  • The observed chip is shown on Overview for OIDC too.
  • The "Admin client" row stays as it is in LDAP mode.
  • "Locked in the directory" chip on account rows, read at each re-check.
  • The last Check connection result is kept per instance (time and admin), so other admins see it. It is stored state, not process memory (#742).
  • Entra row links to the app-roles guide.
  • A small revision round follows for the new chip and the stored check result.

C, Certificates: approved as drawn, with changes:

  • Own admin topic "Certificates" under Instance in the admin sidebar. Overview keeps only a summary row with a link, and failing or red items still raise cards and bell items.
  • Update check and licence server are not listed under outbound connections (they run by themselves; minimal outbound to swisscairn.ch is a promise).
  • Thresholds accept days (21d) or Go durations. Env vars: CAIRN_TLS_EXPIRY_WARN / CAIRN_TLS_EXPIRY_CRITICAL.
  • When several connections fail, one card lists them all. A line under the switches says expired and insecure items cannot be muted.
  • Small fixes ride along: the users audit group label, a wider action column, aria-checked on the notification switches.
  • A revision round follows for the new topic page and the Overview summary.
## Mockup decisions (Nikola, 2026-10-25) **A, sign-in: approved as drawn.** - The generic switch covers only the three password-form messages (not allowed, must change password, disabled). The OIDC page is outside it. - `auth.signinHelp` is one operator string, shown under every message that names IT support. - A 429 counts toward the three-failure hint. The Change password link appears under the hint when it is set. - Frame 11 (groups claim missing or overage) reads "Cairn could not check your access" and is audited. - `refused=idp` shows no sign-out block. - "IT support" replaces "administrator" only in the sign-in messages for now. **B, Users & access: approved as drawn, plus:** - The ldapAllowPlain red card appears on Overview and on Users & access. - The Domain Users note appears only when an allowed entry is named Domain Users. - The observed chip is shown on Overview for OIDC too. - The "Admin client" row **stays as it is** in LDAP mode. - **"Locked in the directory" chip on account rows**, read at each re-check. - **The last Check connection result is kept per instance** (time and admin), so other admins see it. It is stored state, not process memory (#742). - **Entra row links to the app-roles guide.** - A small revision round follows for the new chip and the stored check result. **C, Certificates: approved as drawn, with changes:** - **Own admin topic "Certificates" under Instance** in the admin sidebar. Overview keeps only a summary row with a link, and failing or red items still raise cards and bell items. - **Update check and licence server are not listed** under outbound connections (they run by themselves; minimal outbound to swisscairn.ch is a promise). - Thresholds accept days (`21d`) or Go durations. Env vars: `CAIRN_TLS_EXPIRY_WARN` / `CAIRN_TLS_EXPIRY_CRITICAL`. - When several connections fail, one card lists them all. A line under the switches says expired and insecure items cannot be muted. - Small fixes ride along: the `users` audit group label, a wider action column, `aria-checked` on the notification switches. - A revision round follows for the new topic page and the Overview summary.
Author
Owner

Mockup v2 decisions (Nikola, 2026-10-25): all three mockups approved

B v2 approved as drawn (985-b-users-access-mockup.html; v1 kept as -v1). Details:

  • Date format: the page's own format (2026-10-25 14:32).
  • Audit entry when a re-check first sees an AD lock (helps find the device that caused it, #992). Logged once per lock episode, with no entry while the lock lasts. The badge clears at the first re-check that finds the account unlocked.
  • Retired instances: a stored Check connection result is removed when its instance id is pruned (24 h, same rule as the certificate status).
  • Accounts filter: typing "locked" finds locked rows.
  • Entra guide: new heading "Assignment required and app roles" in directory-entra-id.md for the link.

C v2 approved as drawn (985-c-certificates-mockup.html; v1 kept as -v1). Details:

  • Warning dot on the Certificates sidebar item as well as on Overview.
  • Red and failing cards on both Overview and the Certificates page.
  • One link label: "Open Certificates".

A was approved earlier.

Next step: spec and plan for the #985 batch, with #987, #988, #989, #990, #992, #993, #994, #995 and #998 folded in.

## Mockup v2 decisions (Nikola, 2026-10-25): all three mockups approved **B v2 approved as drawn** (`985-b-users-access-mockup.html`; v1 kept as `-v1`). Details: - **Date format:** the page's own format (`2026-10-25 14:32`). - **Audit entry when a re-check first sees an AD lock** (helps find the device that caused it, #992). Logged once per lock episode, with no entry while the lock lasts. The badge clears at the first re-check that finds the account unlocked. - **Retired instances:** a stored Check connection result is removed when its instance id is pruned (24 h, same rule as the certificate status). - **Accounts filter:** typing "locked" finds locked rows. - **Entra guide:** new heading "Assignment required and app roles" in directory-entra-id.md for the link. **C v2 approved as drawn** (`985-c-certificates-mockup.html`; v1 kept as `-v1`). Details: - **Warning dot** on the Certificates sidebar item as well as on Overview. - **Red and failing cards** on both Overview and the Certificates page. - **One link label:** "Open Certificates". **A** was approved earlier. Next step: spec and plan for the #985 batch, with #987, #988, #989, #990, #992, #993, #994, #995 and #998 folded in.
Author
Owner

Research 8: what a missing groups/roles claim means (research-985-8-missing-claim.md)

Background. The batch-6 final review (S3) found a problem with the decision "every refusal ends sessions and pauses devices, except a missing or overage groups claim": the IdPs omit an empty claim. So removing someone's last role or group never ends their access.

What the IdPs send

  • Entra: "Claims are present only if a value exists to fill it" (VERIFIED). Microsoft's app-roles guide tells apps to handle an absent roles claim.
  • Keycloak 24 and main: the source writes no claim for an empty group or role list (VERIFIED).
  • Zitadel: same as Keycloak (VERIFIED).
  • Okta: same (staff forum, secondary).
  • Authentik: sends [].
  • Google: has no groups claim.
  • The only marked absence is Entra overage (_claim_names / hasgroups).

What other relying parties do. Grafana, oauth2-proxy, Nextcloud user_oidc, Dex (Argo CD) and Vault all read an absent claim as "no groups" and refuse (VERIFIED in source). oauth2-proxy and Dex re-check on refresh. Kubernetes signs the person in without groups, and its RBAC then denies. None keeps access because the claim is missing.

Standards

  • OIDC Core: a claim without a value "SHOULD be omitted".
  • RFC 9068 points groups/roles to RFC 7643, where missing, null and empty are "equivalent".
  • OWASP and ASVS 5.0 8.2.1: deny by default.

Caveat. With Entra "Assignment required" on, removing the last role is refused by Entra itself (AADSTS50105), so Cairn never sees that sign-in. Global Administrators bypass the assignment.

What Cairn can tell apart: overage (marked); a claim that is not a list; and, from its own history, whether this IdP has ever sent the claim. Discovery does not list groups or roles.

Recommended option E. A missing claim counts as not allowed: sessions end, devices pause, audit with claim=absent. Today's behaviour (nothing ends) stays only in three cases:

  • overage;
  • the claim has never been seen from this IdP (new rollout, a typo in oidcGroupsClaim);
  • a safety stop after 3 different people in a row without the claim (ERROR, red card and bell item, reset at the next sign-in that carries the claim).

Options A (absent always means not allowed), B (today) and D (only if this person's last sign-in had the claim) are compared in the file. Decisions are asked next.

## Research 8: what a missing groups/roles claim means (research-985-8-missing-claim.md) **Background.** The batch-6 final review (S3) found a problem with the decision "every refusal ends sessions and pauses devices, except a missing or overage groups claim": the IdPs omit an empty claim. So removing someone's last role or group never ends their access. **What the IdPs send** - Entra: "Claims are present only if a value exists to fill it" (VERIFIED). Microsoft's app-roles guide tells apps to handle an absent `roles` claim. - Keycloak 24 and main: the source writes no claim for an empty group or role list (VERIFIED). - Zitadel: same as Keycloak (VERIFIED). - Okta: same (staff forum, secondary). - Authentik: sends `[]`. - Google: has no groups claim. - The only marked absence is Entra overage (`_claim_names` / `hasgroups`). **What other relying parties do.** Grafana, oauth2-proxy, Nextcloud user_oidc, Dex (Argo CD) and Vault all read an absent claim as "no groups" and refuse (VERIFIED in source). oauth2-proxy and Dex re-check on refresh. Kubernetes signs the person in without groups, and its RBAC then denies. None keeps access because the claim is missing. **Standards** - OIDC Core: a claim without a value "SHOULD be omitted". - RFC 9068 points `groups`/`roles` to RFC 7643, where missing, null and empty are "equivalent". - OWASP and ASVS 5.0 8.2.1: deny by default. **Caveat.** With Entra "Assignment required" on, removing the last role is refused by Entra itself (AADSTS50105), so Cairn never sees that sign-in. Global Administrators bypass the assignment. **What Cairn can tell apart:** overage (marked); a claim that is not a list; and, from its own history, whether this IdP has ever sent the claim. Discovery does not list groups or roles. **Recommended option E.** A missing claim counts as not allowed: sessions end, devices pause, audit with `claim=absent`. Today's behaviour (nothing ends) stays only in three cases: - overage; - the claim has never been seen from this IdP (new rollout, a typo in `oidcGroupsClaim`); - a safety stop after 3 different people in a row without the claim (ERROR, red card and bell item, reset at the next sign-in that carries the claim). Options A (absent always means not allowed), B (today) and D (only if this person's last sign-in had the claim) are compared in the file. Decisions are asked next.
Author
Owner

Released in v0.6.354 (PR #1004), live on both dogfoods

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

  • /auth/mode returns ssoSignOut: true on both instances; GET /api/v1/admin/certificates without a session gets 401.
  • Administration > Certificates (files):
    • Status reads "TLS ends at your proxy" (the VPS Caddy proxy), system bundle 148 roots, tls.caDir not set, lifetime rule (default).
    • Outbound: OIDC (id.c0rdyceps.ch, peer cert until 2027-01-07) and Collabora (code.c0rdyceps.ch, until 2026-12-12), both OK, 0 failures.
    • files-bao shows the same, OIDC and Collabora, all OK. Its S3 (Garage) and OpenBao links are plain http inside the LAN, so they do not appear on the page.
  • Users & access > Access (OIDC, Keycloak with admin client):
    • Provider chip "Last sign-in 1 minute ago" replaces the constant chip.
    • Connection box shows client, name claim, groups claim, back-channel. "Who may sign in" reads "Not set" and "At sign-in only", with the consequence line.
    • Check connection ran: "Last check: 2026-10-25 22:28 by nikola-test (this instance)", 1 of 1 steps OK (admin client token), result stored per instance.
  • Audit list: the directory-check entry reads "Check connection: 1 of 1 steps OK · ", so the reasons are readable (#998).
  • Overview: unchanged apart from the new row. The rail dot belongs to the existing "No emergency account" card.

Not testable on the dogfoods (no test account in a refused state, no AD, no Entra)

  • The sign-in refusal states (frames 2 to 11) are covered by the web and Go tests.
  • Live tests stay open:
    • real Windows DC (#741: 532/773, the lock attribute, timing #991);
    • Entra (overage, AADSTS50105);
    • Vault/OpenBao injector (#994);
    • Keycloak subgroup cases.

Follow-ups

  • #1003: missing claim, option E, v0.6.355.
  • #1001: Keycloak with roles claim, no pause.
  • #1002: spaces and shares still match bare names at any depth.

The #985 scope is done; closing.

## Released in v0.6.354 (PR #1004), live on both dogfoods ### Live checks (2026-10-25, after Nikola signed in) - `/auth/mode` returns `ssoSignOut: true` on both instances; `GET /api/v1/admin/certificates` without a session gets 401. - **Administration > Certificates** (files): - Status reads "TLS ends at your proxy" (the VPS Caddy proxy), system bundle 148 roots, `tls.caDir` not set, lifetime rule (default). - Outbound: OIDC (id.c0rdyceps.ch, peer cert until 2027-01-07) and Collabora (code.c0rdyceps.ch, until 2026-12-12), both OK, 0 failures. - files-bao shows the same, OIDC and Collabora, all OK. Its S3 (Garage) and OpenBao links are plain http inside the LAN, so they do not appear on the page. - **Users & access > Access** (OIDC, Keycloak with admin client): - Provider chip "Last sign-in 1 minute ago" replaces the constant chip. - Connection box shows client, name claim, groups claim, back-channel. "Who may sign in" reads "Not set" and "At sign-in only", with the consequence line. - **Check connection** ran: "Last check: 2026-10-25 22:28 by nikola-test (this instance)", 1 of 1 steps OK (admin client token), result stored per instance. - **Audit list:** the `directory-check` entry reads "Check connection: 1 of 1 steps OK · <instance>", so the reasons are readable (#998). - **Overview:** unchanged apart from the new row. The rail dot belongs to the existing "No emergency account" card. ### Not testable on the dogfoods (no test account in a refused state, no AD, no Entra) - The sign-in refusal states (frames 2 to 11) are covered by the web and Go tests. - Live tests stay open: - real Windows DC (#741: 532/773, the lock attribute, timing #991); - Entra (overage, AADSTS50105); - Vault/OpenBao injector (#994); - Keycloak subgroup cases. ### Follow-ups - #1003: missing claim, option E, v0.6.355. - #1001: Keycloak with roles claim, no pause. - #1002: spaces and shares still match bare names at any depth. The #985 scope is done; closing.
Cordy closed this issue 2026-10-25 21:29:00 +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#985
No description provided.