Assess: do we want the "last enabled local admin" floor when a config-file break-glass admin exists? #880

Closed
opened 2026-10-12 14:51:42 +00:00 by Cordy · 6 comments
Owner

Raised by Nikola on 2026-10-12, after the #865 follow-up (v0.6.330, PR #879). This is an assessment issue: review the setup critically and decide whether the rule is really needed. Nikola will add one or more scenarios in a comment.

What v0.6.330 does

Delete, "Remove admin" and disable all refuse the last enabled local administrator (local store, local-users.json), and they still refuse the last administrator in total. Code last-admin. Before this release, only disable used the local floor; delete and demote checked the total.

Why this may be one safety net too many

Cairn already has two ways to keep an emergency admin, set up differently:

Config-file break-glass Local-store admin
Where auth.users + auth.admins in config.json, or CAIRN_ADMIN_USERNAME / CAIRN_ADMIN_PASSWORD_HASH Dashboard, local-users.json (state backend)
Who can remove it Only whoever can edit the config/env (a dashboard session cannot) Any admin from the dashboard
Docs call it "one to three break-glass emergency admins that no dashboard action can delete" (local-accounts.md) "the break-glass and small-deployment identity beside any IdP" (code comments)
Counted by the new local floor No (config accounts are skipped) Yes

So an instance with a config-file break-glass admin and one local admin now protects both. The local admin can't be deleted, demoted or disabled even though the config-file admin already guarantees a way back in. That effectively makes two break-glass admins, set up two different ways.

Questions to decide

  1. Should the local floor apply only when no config-file (auth.users / env) admin exists? Or only in local auth mode, where the local store is the whole universe?
  2. If a config-file admin exists, is the all-source floor ("not the last administrator in total") enough for local-store admins?
  3. Should the UI and docs name one recommended break-glass method (config file, which a dashboard session can't touch) and treat local-store admins as ordinary accounts?
  4. What about instances that use local-store admins as their only admins (no IdP, no config admin)? The floor clearly matters there, because it is the last admin in total anyway.
  5. Consistency with #865: whatever rule we choose applies to delete, demote and disable together, with one message.

Notes

  • Code: internal/api/localusers.go lastAdminCheck (the local branch) and internal/auth/localstore.go *Checked setters.
  • Docs that would change: users-access.md (#865 section), local-accounts.md (worked break-glass example).

No change until the scenarios are discussed and decided here.

Raised by Nikola on 2026-10-12, after the #865 follow-up (v0.6.330, PR #879). This is an assessment issue: review the setup critically and decide whether the rule is really needed. Nikola will add one or more scenarios in a comment. ## What v0.6.330 does Delete, "Remove admin" and disable all refuse the **last enabled local administrator** (local store, `local-users.json`), and they still refuse the last administrator in total. Code `last-admin`. Before this release, only disable used the local floor; delete and demote checked the total. ## Why this may be one safety net too many Cairn already has two ways to keep an emergency admin, set up differently: | | Config-file break-glass | Local-store admin | |---|---|---| | Where | `auth.users` + `auth.admins` in config.json, or `CAIRN_ADMIN_USERNAME` / `CAIRN_ADMIN_PASSWORD_HASH` | Dashboard, `local-users.json` (state backend) | | Who can remove it | Only whoever can edit the config/env (a dashboard session cannot) | Any admin from the dashboard | | Docs call it | "one to three break-glass emergency admins that no dashboard action can delete" (local-accounts.md) | "the break-glass and small-deployment identity beside any IdP" (code comments) | | Counted by the new local floor | No (config accounts are skipped) | Yes | So an instance with a config-file break-glass admin **and** one local admin now protects both. The local admin can't be deleted, demoted or disabled even though the config-file admin already guarantees a way back in. That effectively makes two break-glass admins, set up two different ways. ## Questions to decide 1. Should the local floor apply only when **no** config-file (`auth.users` / env) admin exists? Or only in `local` auth mode, where the local store is the whole universe? 2. If a config-file admin exists, is the all-source floor ("not the last administrator in total") enough for local-store admins? 3. Should the UI and docs name **one** recommended break-glass method (config file, which a dashboard session can't touch) and treat local-store admins as ordinary accounts? 4. What about instances that use local-store admins as their only admins (no IdP, no config admin)? The floor clearly matters there, because it is the last admin in total anyway. 5. Consistency with #865: whatever rule we choose applies to delete, demote and disable together, with one message. ## Notes - Code: `internal/api/localusers.go` `lastAdminCheck` (the `local` branch) and `internal/auth/localstore.go` `*Checked` setters. - Docs that would change: users-access.md (#865 section), local-accounts.md (worked break-glass example). No change until the scenarios are discussed and decided here.
Author
Owner

ah that is beautiful, you made the correct questions without me having to give any scenarios, so i will answer them straight.

  1. when no Config-file break-glass admin is defined, then the local floor should exist, as that could lockout all admins. even if there is no idP and local mode is the whole universe, if a Config-file break-glass exists, then that is enough. in anycase. self-disable, self-delete and self-demote on the last admin from his own login shouldn't be possible if he is the last one. breakglass still exists if somehow users find a way to fully lock them out. this is regarding non-idP provided instances.
  2. no
  3. yes but also mention that if there is no break-glass account established, that a local-store account will also exist alongside with their idP provided one, as potentially (and alos check and deep research as i am sure that happened somewhere) a missconfiguration on the idP might remove all admin rights from a cairn instance from the supposed admins.
  4. is answered within my anser in 1.
  5. it does apply to all 3 actions.

deep research also check our docs if they need adjusting.
confirm with me again when we tackle this issue next

ah that is beautiful, you made the correct questions without me having to give any scenarios, so i will answer them straight. 1. when no Config-file break-glass admin is defined, then the local floor should exist, as that could lockout all admins. even if there is no idP and local mode is the whole universe, if a Config-file break-glass exists, then that is enough. in anycase. self-disable, self-delete and self-demote on the last admin from his own login shouldn't be possible if he is the last one. breakglass still exists if somehow users find a way to fully lock them out. this is regarding non-idP provided instances. 2. no 3. yes but also mention that if there is no break-glass account established, that a local-store account will also exist alongside with their idP provided one, as potentially (and alos check and deep research as i am sure that happened somewhere) a missconfiguration on the idP might remove all admin rights from a cairn instance from the supposed admins. 4. is answered within my anser in 1. 5. it does apply to all 3 actions. deep research also check our docs if they need adjusting. confirm with me again when we tackle this issue next
Author
Owner

Code research: how it works today (main 6422f547, v0.6.333)

Admin sources and how they count (internal/api/localusers.go)

Source Where Counted by the all-source floor (adminTotalOf) Counted by the local floor
Config file auth.admins (incl. CAIRN_ADMIN_USERNAME) LocalUsers.ConfigAdmins yes no
Dashboard grants for directory accounts admins.json (LocalUsers.Admins) yes no
Local-store admins, enabled only (#865) local-users.json yes yes
IdP admin group (auth.adminGroups) resolved at sign-in no (dynamic, not counted) no

Rules in force

  • Yourself: delete, demote ("Remove admin") and disable of your own account are always refused, whether or not you are the last admin. Codes: cannot-remove-self, "you cannot remove your own administrator role", cannot-disable-self. Removing your own admins.json grant is refused too.
  • All-source floor: refuses demoting, deleting or disabling the last administrator in total.
  • Local floor (lastAdminCheck, v0.6.330): delete, demote and disable all refuse the last enabled local-store admin. It does not look at config-file accounts at all. So with a config break-glass admin present, the local admin is still protected. That is the double safety net this issue is about.
  • Break-glass detection: none. Nothing in the code combines "is in auth.users" (has a config password) with "is in auth.admins" (is an admin). A name in auth.admins alone can also be a directory account, which is not a break-glass account.

Compared with your decisions (comment above)

  1. Config break-glass exists → the local floor should not apply. Not the case today. Needs a change.
  2. No config break-glass → the local floor stays. Already the case.
  3. The last admin can't remove themselves. Already covered, and more strictly than decided: self-actions are refused for any admin, not only the last. I'd keep that, since every competitor I know of blocks self-removal outright. It's your call, though.
  4. All three actions follow one rule. Already the case since v0.6.330.
  5. Docs: users-access.md and local-accounts.md describe the local floor as unconditional, and nowhere recommend one break-glass method. Needs a change.

First way of fixing (before the online research)

  • Break-glass definition: a name that is both in auth.users (config password) and in auth.admins (config admin role). The env admin (CAIRN_ADMIN_USERNAME + hash) counts, since it is added to both at startup. Config accounts can't be disabled from the dashboard, so no extra check is needed.
  • lastAdminCheck: apply the localAdmins <= 1 branch only when no break-glass account exists. The all-source floor and the self rules stay unchanged.
  • UI: the greyed-out "last enabled local administrator" state uses the same rule. The account list already marks config accounts and their role, so the client can mirror it, with a test pinning client and server to the same answer.
  • Docs:
    • Recommend one break-glass method: a config-file account (auth.users + auth.admins), which no dashboard session can touch.
    • Say that without one, Cairn keeps at least one enabled local-store admin next to the IdP admins, because an IdP misconfiguration can remove admin rights from every IdP admin at once. For example, the admin group is renamed or the group claim mapping changes, and nobody is an admin any more.
    • Show how to tell which situation an instance is in.
  • Tests:
    • with break-glass: deleting, demoting and disabling the only local admin succeeds;
    • without break-glass: all three are refused;
    • the env admin counts as break-glass;
    • auth.admins with a directory name only does not count.

Next: the deep online research (IdP misconfigurations that removed all admins, break-glass practice at Microsoft, Google, Okta, GitLab, Nextcloud, Keycloak, Grafana and others). After that I check back here with the findings and the final plan.

## Code research: how it works today (main 6422f547, v0.6.333) **Admin sources and how they count** (`internal/api/localusers.go`) | Source | Where | Counted by the all-source floor (`adminTotalOf`) | Counted by the local floor | |---|---|---|---| | Config file `auth.admins` (incl. `CAIRN_ADMIN_USERNAME`) | `LocalUsers.ConfigAdmins` | yes | no | | Dashboard grants for directory accounts | `admins.json` (`LocalUsers.Admins`) | yes | no | | Local-store admins, enabled only (#865) | `local-users.json` | yes | **yes** | | IdP admin group (`auth.adminGroups`) | resolved at sign-in | **no** (dynamic, not counted) | no | **Rules in force** - **Yourself:** delete, demote ("Remove admin") and disable of *your own* account are always refused, whether or not you are the last admin. Codes: `cannot-remove-self`, "you cannot remove your own administrator role", `cannot-disable-self`. Removing your own `admins.json` grant is refused too. - **All-source floor:** refuses demoting, deleting or disabling the last administrator in total. - **Local floor (`lastAdminCheck`, v0.6.330):** delete, demote and disable all refuse the last *enabled local-store* admin. It does **not** look at config-file accounts at all. So with a config break-glass admin present, the local admin is still protected. That is the double safety net this issue is about. - **Break-glass detection:** none. Nothing in the code combines "is in `auth.users`" (has a config password) with "is in `auth.admins`" (is an admin). A name in `auth.admins` alone can also be a directory account, which is *not* a break-glass account. **Compared with your decisions (comment above)** 1. **Config break-glass exists → the local floor should not apply.** Not the case today. **Needs a change.** 2. **No config break-glass → the local floor stays.** Already the case. 3. **The last admin can't remove themselves.** Already covered, and more strictly than decided: self-actions are refused for *any* admin, not only the last. I'd keep that, since every competitor I know of blocks self-removal outright. It's your call, though. 4. **All three actions follow one rule.** Already the case since v0.6.330. 5. **Docs:** users-access.md and local-accounts.md describe the local floor as unconditional, and nowhere recommend one break-glass method. **Needs a change.** ## First way of fixing (before the online research) - **Break-glass definition:** a name that is **both** in `auth.users` (config password) **and** in `auth.admins` (config admin role). The env admin (`CAIRN_ADMIN_USERNAME` + hash) counts, since it is added to both at startup. Config accounts can't be disabled from the dashboard, so no extra check is needed. - **`lastAdminCheck`:** apply the `localAdmins <= 1` branch only when no break-glass account exists. The all-source floor and the self rules stay unchanged. - **UI:** the greyed-out "last enabled local administrator" state uses the same rule. The account list already marks config accounts and their role, so the client can mirror it, with a test pinning client and server to the same answer. - **Docs:** - Recommend **one** break-glass method: a config-file account (`auth.users` + `auth.admins`), which no dashboard session can touch. - Say that **without** one, Cairn keeps at least one enabled local-store admin next to the IdP admins, because an IdP misconfiguration can remove admin rights from every IdP admin at once. For example, the admin group is renamed or the group claim mapping changes, and nobody is an admin any more. - Show how to tell which situation an instance is in. - **Tests:** - with break-glass: deleting, demoting and disabling the only local admin succeeds; - without break-glass: all three are refused; - the env admin counts as break-glass; - `auth.admins` with a directory name only does **not** count. Next: the deep online research (IdP misconfigurations that removed all admins, break-glass practice at Microsoft, Google, Okta, GitLab, Nextcloud, Keycloak, Grafana and others). After that I check back here with the findings and the final plan.
Author
Owner

Deep research (2026-10-12)

Full report with URLs and quotes: scratch/b7e/880-research.md. It covers IdP and directory lockout incidents, break-glass practice (Microsoft Entra, Google Workspace, Okta, AWS, NIST AC-2/AC-14, ISO 27001/27002), 8 self-hosted products, self-removal rules, recovery paths, and a line-by-line docs check.

Vital findings

  1. What counts as break-glass. It must be an auth.users entry (or the env admin) that is also in auth.admins. Neither of these may switch off the local floor, because both still depend on the IdP or the dashboard:

    • a directory account listed in auth.admins;
    • a stale admins.json grant on a config account.

    (2 external sources plus our code.)

  2. New gap, checked in our code: app-owned admin groups get around every rule. In internal/api/groups.go, groupRename (l.273), groupDelete (l.307) and groupMemberRemove (l.412) have no self check and no last-admin check. Today, from the dashboard:

    • an admin can remove themselves from the admin group;
    • renaming or deleting a group listed in auth.adminGroups strips every group admin with one click. The docs say a renamed admin group "simply stop[s] matching".

    The rule should cover these three actions too.

  3. Recommend two break-glass accounts, not "one to three" (local-accounts.md:49-53) or "one" (l.189-193). Microsoft Entra, CIS M365, Okta and Google all recommend two.

  4. Audit and alert on every break-glass sign-in. Today a successful sign-in writes no audit event, and the docs say "Cairn keeps no sign-in record for them". ISO 27002 8.2, NIST AC-14, Entra and AWS all expect emergency access to be recorded and monitored. Proposal: an audit event that is always written, plus an admin bell item.

  5. Warn when no break-glass account exists. The trigger is admin rights resting only on IdP groups or dashboard grants. Show it on the Overview (same pattern as #864) and in the startup log. Not one of the products we surveyed warns about this. It is exactly what turned these incidents into full lockouts:

    • Atlassian: expired SAML certificate;
    • Entra: Conditional Access;
    • Okta;
    • Nextcloud: LDAP group regex.
  6. Matching IdP admin groups is fragile.

    • Cairn compares group names exactly.
    • Cairn doesn't handle the Entra "overage" claim, sent instead of groups once a user is in more than 200 groups.
    • A Keycloak "Full group path" toggle, many groups, or a renamed group removes every IdP admin at the next sign-in.

    That is the strongest reason for the local floor. users-access.md:514-517 should warn about it.

  7. Keep "self-removal always refused" (your answer to Q3). Redmine, Nextcloud and GitLab do the same. Two small fixes:

    • self-demote answers 409 without a code, so add cannot-demote-self;
    • users-access.md:415-418 should say Remove admin is greyed out on your own row.
  8. Recovery: no new CLI needed for this issue, but the docs should lead with it. The recovery steps are:

    1. cairnd hash-password;
    2. add the env admin, or an auth.users entry plus auth.admins;
    3. restart.

    Atlassian, Mattermost, Keycloak and GitLab all lead with host-side recovery like this. Our env admin is added again at every start, so it avoids the Keycloak 26 trap where the bootstrap admin only exists on first start.

Proposed final plan

  1. Break-glass detection: an auth.users entry whose name is also in auth.admins; the env admin counts.
  2. The rule for local-store admins:
    • when a break-glass account exists, the "last enabled local admin" floor is off and only the all-source floor applies;
    • when none exists, the local floor stays;
    • self-removal is always refused;
    • delete, demote and disable share one message.
  3. App-owned admin groups: removing yourself from an admin group is refused. Renaming or deleting an admin group, or removing its last member, is refused when that would leave no admin.
  4. Codes: cannot-demote-self (and the same code on directory-admin self-removal).
  5. Visibility:
    • an Overview card and startup WARN when no break-glass account exists ("Admin rights rest only on …"), with the copyable recovery recipe;
    • an always-written audit event auth-breakglass-signin and an admin bell item whenever a break-glass account signs in.
  6. Docs:
    • lead with the recovery steps;
    • recommend two break-glass accounts;
    • explain the local floor and when it applies;
    • warn about IdP admin-group fragility;
    • fix the five passages that contradict the decision (the report lists them with line numbers).
  7. Mockup for the Overview card and the bell item, before any UI work.

Questions for you:

  • Items 3 to 5 go beyond the original scope. Should they all go into this issue, or should some be split out?
  • Item 4 of the findings, the break-glass sign-in alert. Should that bell item reach every admin, or only config-file admins?
## Deep research (2026-10-12) Full report with URLs and quotes: `scratch/b7e/880-research.md`. It covers IdP and directory lockout incidents, break-glass practice (Microsoft Entra, Google Workspace, Okta, AWS, NIST AC-2/AC-14, ISO 27001/27002), 8 self-hosted products, self-removal rules, recovery paths, and a line-by-line docs check. ### Vital findings 1. **What counts as break-glass.** It must be an `auth.users` entry (or the env admin) **that is also** in `auth.admins`. Neither of these may switch off the local floor, because both still depend on the IdP or the dashboard: - a directory account listed in `auth.admins`; - a stale `admins.json` grant on a config account. (2 external sources plus our code.) 2. **New gap, checked in our code: app-owned admin groups get around every rule.** In `internal/api/groups.go`, `groupRename` (l.273), `groupDelete` (l.307) and `groupMemberRemove` (l.412) have **no self check and no last-admin check**. Today, from the dashboard: - an admin can remove themselves from the admin group; - renaming or deleting a group listed in `auth.adminGroups` strips every group admin with one click. The docs say a renamed admin group "simply stop[s] matching". The rule should cover these three actions too. 3. **Recommend two break-glass accounts**, not "one to three" (local-accounts.md:49-53) or "one" (l.189-193). Microsoft Entra, CIS M365, Okta and Google all recommend two. 4. **Audit and alert on every break-glass sign-in.** Today a successful sign-in writes no audit event, and the docs say "Cairn keeps no sign-in record for them". ISO 27002 8.2, NIST AC-14, Entra and AWS all expect emergency access to be recorded and monitored. Proposal: an audit event that is always written, plus an admin bell item. 5. **Warn when no break-glass account exists.** The trigger is admin rights resting only on IdP groups or dashboard grants. Show it on the Overview (same pattern as #864) and in the startup log. Not one of the products we surveyed warns about this. It is exactly what turned these incidents into full lockouts: - Atlassian: expired SAML certificate; - Entra: Conditional Access; - Okta; - Nextcloud: LDAP group regex. 6. **Matching IdP admin groups is fragile.** - Cairn compares group names exactly. - Cairn doesn't handle the Entra "overage" claim, sent instead of `groups` once a user is in more than 200 groups. - A Keycloak "Full group path" toggle, many groups, or a renamed group removes every IdP admin at the next sign-in. That is the strongest reason for the local floor. users-access.md:514-517 should warn about it. 7. **Keep "self-removal always refused"** (your answer to Q3). Redmine, Nextcloud and GitLab do the same. Two small fixes: - self-demote answers 409 **without a code**, so add `cannot-demote-self`; - users-access.md:415-418 should say **Remove admin** is greyed out on your own row. 8. **Recovery: no new CLI needed for this issue, but the docs should lead with it.** The recovery steps are: 1. `cairnd hash-password`; 2. add the env admin, or an `auth.users` entry plus `auth.admins`; 3. restart. Atlassian, Mattermost, Keycloak and GitLab all lead with host-side recovery like this. Our env admin is added again at **every** start, so it avoids the Keycloak 26 trap where the bootstrap admin only exists on first start. ### Proposed final plan 1. **Break-glass detection:** an `auth.users` entry whose name is also in `auth.admins`; the env admin counts. 2. **The rule for local-store admins:** - when a break-glass account exists, the "last enabled local admin" floor is off and only the all-source floor applies; - when none exists, the local floor stays; - self-removal is always refused; - delete, demote and disable share one message. 3. **App-owned admin groups:** removing yourself from an admin group is refused. Renaming or deleting an admin group, or removing its last member, is refused when that would leave no admin. 4. **Codes:** `cannot-demote-self` (and the same code on directory-admin self-removal). 5. **Visibility:** - an Overview card and startup WARN when no break-glass account exists ("Admin rights rest only on …"), with the copyable recovery recipe; - an always-written audit event `auth-breakglass-signin` and an admin bell item whenever a break-glass account signs in. 6. **Docs:** - lead with the recovery steps; - recommend two break-glass accounts; - explain the local floor and when it applies; - warn about IdP admin-group fragility; - fix the five passages that contradict the decision (the report lists them with line numbers). 7. **Mockup** for the Overview card and the bell item, before any UI work. **Questions for you:** - **Items 3 to 5 go beyond the original scope.** Should they all go into this issue, or should some be split out? - **Item 4 of the findings, the break-glass sign-in alert.** Should that bell item reach every admin, or only config-file admins?
Author
Owner

Decisions (Nikola, 2026-10-12) and the split

  • Bell for a break-glass sign-in: goes to all admins, because the config-file account isn't used day to day.
  • Two emergency paths: one config-file break-glass account plus one local-store admin. The standards check below confirms this pairing.
  • Split (Claude's call, delegated by Nikola). This issue keeps the rules: server logic with tests and no new UI surface beyond the reason texts. The visibility part moves to #887: sign-in alert, Overview warnings, emergency-path notices. That part needs a mockup and its own review, so it goes better as a separate run.

Scope of #880 (final plan)

  1. What counts as break-glass: a name that is in both auth.users and auth.admins. The env admin counts too.

  2. Local floor: applies only when no break-glass account exists. The all-source floor and the self rules stay unchanged.

  3. App-owned admin groups:

    • removing yourself from an admin group is refused;
    • renaming or deleting an admin group, or removing its last member, is refused when it would leave no admin.

    Same atomic check and same message as delete/demote/disable.

  4. New code cannot-demote-self, for local-account and directory-admin self-removal.

  5. UI: the greyed-out reasons follow the new rule. "Remove admin" is greyed out on your own row.

  6. Docs:

    • recovery recipe first;
    • "two emergency paths" wording;
    • when the local floor applies;
    • IdP admin-group fragility (exact names, Keycloak full path, Entra group-overage claim);
    • the 5 MUST passages and the SHOULD passages listed in the research.

Standards check (full report: scratch/b7e/880-standards.md)

The strongest references for CH/DACH:

  • BK AR012 Beilage 2 (Swiss Federal Chancellery, PAM principles). It names break-glass accounts. Their use "muss … detektiert werden … alarmiert".
  • BSI ORP.4.A20: admins must still be able to work when the IdP fails.
  • BSI OPS.1.1.2.A2/A27: a deputy with admin rights, and an alternative admin path.
  • NIST SP 800-53 AC-2: a standing "account of last resort" that "remains available and is not subject to automatic disabling". This corrects the earlier note: AC-2(2) does not apply.
  • ISO/IEC 27001/27002:2022: A.5.15–5.18, A.8.2, A.8.15, A.8.16. These are paywalled; only the control titles are verified.
  • IKT-Minimalstandard: PR.AC-1/4. It is based on NIST CSF 1.1.
  • Entra + CIS: two emergency accounts.
  • NIS2 Art. 21(2)(c)(i): with the German BSIG §30 and the Austrian NISG 2026, in force since 1 Oct 2026.
  • HIPAA 164.312(a)(2)(ii): emergency access procedure.

Verdict on the two-path setup: the two paths are partly independent. Neither depends on the IdP, and they are stored differently. They do share the password sign-in path. A local admin that can be deleted from the dashboard is acceptable as the second path only if its removal is audited and alerted, which is #887 item 4. The docs say "two emergency paths".

Before claiming anything externally, verify the BSI wording against the official text; the report used a verbatim mirror.

## Decisions (Nikola, 2026-10-12) and the split - **Bell for a break-glass sign-in:** goes to all admins, because the config-file account isn't used day to day. - **Two emergency paths:** one config-file break-glass account plus one local-store admin. The standards check below confirms this pairing. - **Split** (Claude's call, delegated by Nikola). This issue keeps the **rules**: server logic with tests and no new UI surface beyond the reason texts. The **visibility** part moves to **#887**: sign-in alert, Overview warnings, emergency-path notices. That part needs a mockup and its own review, so it goes better as a separate run. ## Scope of #880 (final plan) 1. **What counts as break-glass:** a name that is in both `auth.users` and `auth.admins`. The env admin counts too. 2. **Local floor:** applies only when no break-glass account exists. The all-source floor and the self rules stay unchanged. 3. **App-owned admin groups:** - removing yourself from an admin group is refused; - renaming or deleting an admin group, or removing its last member, is refused when it would leave no admin. Same atomic check and same message as delete/demote/disable. 4. **New code `cannot-demote-self`**, for local-account and directory-admin self-removal. 5. **UI:** the greyed-out reasons follow the new rule. "Remove admin" is greyed out on your own row. 6. **Docs:** - recovery recipe first; - "two emergency paths" wording; - when the local floor applies; - IdP admin-group fragility (exact names, Keycloak full path, Entra group-overage claim); - the 5 MUST passages and the SHOULD passages listed in the research. ## Standards check (full report: `scratch/b7e/880-standards.md`) The strongest references for CH/DACH: - **BK AR012 Beilage 2** (Swiss Federal Chancellery, PAM principles). It names break-glass accounts. Their use "muss … detektiert werden … alarmiert". - **BSI ORP.4.A20:** admins must still be able to work when the IdP fails. - **BSI OPS.1.1.2.A2/A27:** a deputy with admin rights, and an alternative admin path. - **NIST SP 800-53 AC-2:** a standing "account of last resort" that "remains available and is not subject to automatic disabling". This corrects the earlier note: AC-2(2) does **not** apply. - **ISO/IEC 27001/27002:2022:** A.5.15–5.18, A.8.2, A.8.15, A.8.16. These are paywalled; only the control titles are verified. - **IKT-Minimalstandard:** PR.AC-1/4. It is based on NIST CSF 1.1. - **Entra + CIS:** two emergency accounts. - **NIS2 Art. 21(2)(c)(i):** with the German BSIG §30 and the Austrian NISG 2026, in force since 1 Oct 2026. - **HIPAA 164.312(a)(2)(ii):** emergency access procedure. Verdict on the two-path setup: the two paths are partly independent. Neither depends on the IdP, and they are stored differently. They do share the password sign-in path. A local admin that can be deleted from the dashboard is acceptable as the second path **only** if its removal is audited and alerted, which is #887 item 4. The docs say "two emergency paths". Before claiming anything externally, verify the BSI wording against the official text; the report used a verbatim mirror.
Author
Owner

BSI verification and what it adds (2026-10-12)

Report: scratch/b7e/880-bsi-verify.md.

Verification

  • Every cited BSI requirement is confirmed against IT-Grundschutz-Kompendium Edition 2023, which is the current and only certifiable edition. Each sentence was confirmed by an exact-phrase hit on bsi.bund.de pointing to the official PDF, combined with the mirror text.
  • None changed.
  • One gap remains: the official PDFs redirect to landing pages when fetched, so before any external use someone should open the 2023 PDF once.
  • Omissions the verification found:
    • ORP.4.A1 also says inactive accounts SHOULD be deactivated. That conflicts with standing break-glass accounts, so we document it as a deliberate deviation.
    • OPS.1.1.2.A5 also requires recording what, who and when for every admin change.
    • OPS.1.1.2.A20 is level H (elevated protection need). It is not sold as baseline.
  • BK AR012 correction: the break-glass MFA exception sits under "Nr. 12 Verbindung Zugang PAM: Administrator". New hooks: Prinzip 7 (all privileged use recorded), 10 (regular review) and 12 (misuse detectable).
  • Newly relevant: ORP.4.A3 (review admin rights regularly), OPS.1.1.2.A4 (change admin passwords a departing person knew), A21/A22 (admin-only roles, no daily work with admin rights).

Grundschutz++

  • BSI says the Grundschutz++ catalogue "löst das IT-Grundschutz-Kompendium ab". It is presented at it-sa on 27 Oct 2026; certification under it opens on 1 Jan 2027; old certifications end on 30 Nov 2031.
  • We cite "Kompendium Edition 2023, " plus a note naming the Grundschutz++ practices BER, NOT and DET.
  • Exact Grundschutz++ IDs need the BSI mapping repository. That is follow-up work for #847.

Added to this run (#880):

  1. An audit event at startup when the set of config-file break-glass accounts changes (OPS.1.1.2.A5, NIST AC-2(4), AR012 Prinzip 7).
  2. Recovery docs list the operator duties: sealed or split storage, rotation after use and when a custodian leaves (A4), a non-default name, a test every 90 days.
  3. Recovery docs list the deliberate deviations: no MFA, no lockout, no inactivity deactivation.
  4. New handbook page docs/handbook/security-standards.md.
    • It covers ISO 27001/27002, BSI IT-Grundschutz (with the Grundschutz++ note), BK AR012, IKT-Minimalstandard, NIST 800-53/CSF, CIS, NIS2, HIPAA, nDSG/DSV and the CRA.
    • Each gets a table: control → how Cairn supports it → feature/version → status (shipped, or planned with issue number) → operator responsibility.
    • Wording policy: "supports / helps meet", never "certified/compliant". It carries a "verify before external use" note.
    • It is built so #847 can extend it.

Moved to #887: audit of every successful admin sign-in (OPS.1.1.2.A5 MUST, same code path as the break-glass sign-in), audit and bell when privileged rights change, and "last sign-in" per admin.

New issue: an exportable admin-rights review list (ORP.4.A3, AR012 review).

## BSI verification and what it adds (2026-10-12) Report: `scratch/b7e/880-bsi-verify.md`. **Verification** - Every cited BSI requirement is confirmed against **IT-Grundschutz-Kompendium Edition 2023**, which is the current and only certifiable edition. Each sentence was confirmed by an exact-phrase hit on bsi.bund.de pointing to the official PDF, combined with the mirror text. - None changed. - **One gap remains:** the official PDFs redirect to landing pages when fetched, so before any external use someone should open the 2023 PDF once. - **Omissions the verification found:** - **ORP.4.A1** also says inactive accounts SHOULD be deactivated. That conflicts with standing break-glass accounts, so we document it as a deliberate deviation. - **OPS.1.1.2.A5** also requires recording what, who and when for every admin change. - **OPS.1.1.2.A20** is level H (elevated protection need). It is not sold as baseline. - **BK AR012 correction:** the break-glass MFA exception sits under "Nr. 12 Verbindung Zugang PAM: Administrator". New hooks: Prinzip 7 (all privileged use recorded), 10 (regular review) and 12 (misuse detectable). - **Newly relevant:** ORP.4.A3 (review admin rights regularly), OPS.1.1.2.A4 (change admin passwords a departing person knew), A21/A22 (admin-only roles, no daily work with admin rights). **Grundschutz++** - BSI says the Grundschutz++ catalogue "löst das IT-Grundschutz-Kompendium ab". It is presented at it-sa on 27 Oct 2026; certification under it opens on 1 Jan 2027; old certifications end on 30 Nov 2031. - We cite "Kompendium Edition 2023, <ID>" plus a note naming the Grundschutz++ practices BER, NOT and DET. - Exact Grundschutz++ IDs need the BSI mapping repository. That is follow-up work for #847. **Added to this run (#880):** 1. An audit event at startup when the set of config-file break-glass accounts changes (OPS.1.1.2.A5, NIST AC-2(4), AR012 Prinzip 7). 2. Recovery docs list the **operator duties**: sealed or split storage, rotation after use and when a custodian leaves (A4), a non-default name, a test every 90 days. 3. Recovery docs list the **deliberate deviations**: no MFA, no lockout, no inactivity deactivation. 4. **New handbook page `docs/handbook/security-standards.md`.** - It covers ISO 27001/27002, BSI IT-Grundschutz (with the Grundschutz++ note), BK AR012, IKT-Minimalstandard, NIST 800-53/CSF, CIS, NIS2, HIPAA, nDSG/DSV and the CRA. - Each gets a table: control → how Cairn supports it → feature/version → status (shipped, or planned with issue number) → operator responsibility. - Wording policy: "supports / helps meet", never "certified/compliant". It carries a "verify before external use" note. - It is built so #847 can extend it. **Moved to #887:** audit of every successful admin sign-in (OPS.1.1.2.A5 MUST, same code path as the break-glass sign-in), audit and bell when privileged rights change, and "last sign-in" per admin. **New issue:** an exportable admin-rights review list (ORP.4.A3, AR012 review).
Cordy closed this issue 2026-10-12 22:28:09 +00:00
Author
Owner

Shipped in v0.6.335 (PR #889). CI passed on the real modules, and both dogfoods report cairn_build_info{version="v0.6.335"}.

Still open: a live check in the dashboard. It needs an admin sign-in.

  1. On files-bao (no break-glass account): admin1's Disable, Delete and Remove admin stay greyed out, with "last enabled local administrator".
  2. Your own row shows "Remove admin" greyed out.
  3. The groups admin UI greys out actions on an admin group.

Follow-ups:

  • #887: sign-in alert, "no break-glass" warning, warning when the last break-glass account is removed, password-change fingerprint, audit of every admin sign-in, last sign-in.
  • #888: admin review list.
  • #847: extends docs/handbook/security-standards.md (the Grundschutz++ IDs need BSI's mapping repository).
Shipped in v0.6.335 (PR #889). CI passed on the real modules, and both dogfoods report `cairn_build_info{version="v0.6.335"}`. **Still open:** a live check in the dashboard. It needs an admin sign-in. 1. On files-bao (no break-glass account): admin1's Disable, Delete and Remove admin stay greyed out, with "last enabled local administrator". 2. Your own row shows "Remove admin" greyed out. 3. The groups admin UI greys out actions on an admin group. **Follow-ups:** - **#887:** sign-in alert, "no break-glass" warning, warning when the last break-glass account is removed, password-change fingerprint, audit of every admin sign-in, last sign-in. - **#888:** admin review list. - **#847:** extends `docs/handbook/security-standards.md` (the Grundschutz++ IDs need BSI's mapping repository).
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#880
No description provided.