Smaller compliance gaps from the #847 mapping: document approval (ISO 9001 7.5.2), version limits in Administration, optional second factor for local accounts #1046

Closed
opened 2026-10-28 23:37:41 +00:00 by Cordy · 7 comments
Owner

Found in the #847 customer compliance mapping (2026-10-29). Three smaller gaps, each to be researched and decided when worked on:

  1. Document approval (ISO 9001 7.5.2 "review and approval for suitability and adequacy"): no approval step or approval record for documents (e.g. "approved by X on DATE" on a version). Research how DMS/QMS tools do it; may be out of scope for a file server.
  2. Version limits in Administration: the version engine's caps (count/age) can only be set through the settings API; no admin UI fields. Also document that retention windows don't apply to version pruning.
  3. Second factor for local accounts (ISO 27001 A.8.5): local accounts rely on passwords only (IdP accounts get MFA from the IdP). Optional TOTP/WebAuthn for local accounts, especially break-glass.
Found in the #847 customer compliance mapping (2026-10-29). Three smaller gaps, each to be researched and decided when worked on: 1. **Document approval** (ISO 9001 7.5.2 "review and approval for suitability and adequacy"): no approval step or approval record for documents (e.g. "approved by X on DATE" on a version). Research how DMS/QMS tools do it; may be out of scope for a file server. 2. **Version limits in Administration:** the version engine's caps (count/age) can only be set through the settings API; no admin UI fields. Also document that retention windows don't apply to version pruning. 3. **Second factor for local accounts** (ISO 27001 A.8.5): local accounts rely on passwords only (IdP accounts get MFA from the IdP). Optional TOTP/WebAuthn for local accounts, especially break-glass.
Author
Owner

Priority raised (v0.7 feature-gap research, 2026-11-04). All four competitor reports name a built-in second factor for local accounts: Nextcloud bundles TOTP, backup codes and WebAuthn, enforceable per group; Seafile ships TOTP free; ownCloud 10 has a 2FA app. OpenCloud has none built in (MFA only through the external identity provider), so this is a differentiator. Cairn's own security-standards.md:284 lists the gap. The version-limits part also gains weight: OpenCloud's loudest file-server complaint is versions growing without limit, which Cairn already prevents; showing the limits in Administration makes that visible. Version naming/pinning and single-version delete are filed as #1110. Source: scratch/b7e/backlog/gap-v07/research-v07-gaps.md.

**Priority raised (v0.7 feature-gap research, 2026-11-04).** All four competitor reports name a built-in second factor for local accounts: Nextcloud bundles TOTP, backup codes and WebAuthn, enforceable per group; Seafile ships TOTP free; ownCloud 10 has a 2FA app. OpenCloud has none built in (MFA only through the external identity provider), so this is a differentiator. Cairn's own `security-standards.md:284` lists the gap. The version-limits part also gains weight: OpenCloud's loudest file-server complaint is versions growing without limit, which Cairn already prevents; showing the limits in Administration makes that visible. Version naming/pinning and single-version delete are filed as #1110. Source: `scratch/b7e/backlog/gap-v07/research-v07-gaps.md`.
Author
Owner

The version-limits part shipped in v0.6.405 (#1110/#924): Administration › Retention & holds › File versions shows every limit (minimum keep period, versions per file, age, ceiling, kept per file, merge window, nightly sweep with its last run) and alerts administrators when a limit is lowered. Named/kept versions are stored so a later "approved version" (part 1) can split Name and Keep without a migration.

The version-limits part shipped in v0.6.405 (#1110/#924): Administration › Retention & holds › File versions shows every limit (minimum keep period, versions per file, age, ceiling, kept per file, merge window, nightly sweep with its last run) and alerts administrators when a limit is lowered. Named/kept versions are stored so a later "approved version" (part 1) can split Name and Keep without a migration.
Author
Owner

Research on the second-factor part done (scratch/b7e/backlog/research-1046-2fa.md). Competitors except OpenCloud ship TOTP + recovery codes + an admin requirement + admin reset (GitLab adds a grace period). NIST SP 800-63B-4: each code once, at most 100 failed attempts, recovery codes ≥64 bits hashed and single-use, a notice on adding or using a factor; AAL2 also needs a phishing-resistant option offered (WebAuthn). The failures elsewhere were bypasses (Nextcloud 2026 CVEs replaying the half-signed-in state over Basic/WebDAV). Cairn gaps: the sign-in form and the new-password step must ask for the code; the account password works over WebDAV unless "Sync apps need app passwords" is on, so it must be refused for anyone with a second factor. Recommended for v0.7: TOTP, recovery codes, a requirement setting (nobody / administrators / everyone with a Cairn or LDAP password) with a per-person grace period, admin reset, LDAP accounts included; WebAuthn as a second wave or v0.8; document approval (part 1) to v0.8 or later with a handbook section for ISO 9001 7.5.2 now. Decisions follow.

Research on the second-factor part done (`scratch/b7e/backlog/research-1046-2fa.md`). Competitors except OpenCloud ship TOTP + recovery codes + an admin requirement + admin reset (GitLab adds a grace period). NIST SP 800-63B-4: each code once, at most 100 failed attempts, recovery codes ≥64 bits hashed and single-use, a notice on adding or using a factor; AAL2 also needs a phishing-resistant option offered (WebAuthn). The failures elsewhere were bypasses (Nextcloud 2026 CVEs replaying the half-signed-in state over Basic/WebDAV). Cairn gaps: the sign-in form and the new-password step must ask for the code; the account password works over WebDAV unless "Sync apps need app passwords" is on, so it must be refused for anyone with a second factor. Recommended for v0.7: TOTP, recovery codes, a requirement setting (nobody / administrators / everyone with a Cairn or LDAP password) with a per-person grace period, admin reset, LDAP accounts included; WebAuthn as a second wave or v0.8; document approval (part 1) to v0.8 or later with a handbook section for ISO 9001 7.5.2 now. Decisions follow.
Author
Owner

Decided by Nikola 2026-11-10: "Two-step sign-in" for Cairn-managed and LDAP accounts with TOTP, recovery codes and WebAuthn (security keys and passkeys as a second factor; go-webauthn/webauthn v0.18.2) in this batch. Requirement Nobody (default) / Administrators / Everyone with a Cairn or LDAP password, 14-day per-person grace then setup at sign-in; account password refused over WebDAV for anyone with a second factor; break-glass config accounts exempt; admin reset of another person's factors (never one's own) with bell + e-mail; no "remember this browser"; TOTP ±1 step, never reused; alerts at 10 failed codes, authenticator off at 100. WebAuthn: second factor only (passkey sign-in a v0.8 issue), RP ID from config, HTTPS only, up to 10 keys, clone warning (not refused by default), optional "only keys that cannot be copied". Document approval (part 1) moves to v0.8 with a handbook section on ISO 9001 7.5.2 now. Follow-up to file: "reset every second factor" in the incident restore. Next: mockup.

**Decided by Nikola 2026-11-10:** "Two-step sign-in" for Cairn-managed and LDAP accounts with TOTP, recovery codes **and WebAuthn** (security keys and passkeys as a second factor; go-webauthn/webauthn v0.18.2) in this batch. Requirement Nobody (default) / Administrators / Everyone with a Cairn or LDAP password, 14-day per-person grace then setup at sign-in; account password refused over WebDAV for anyone with a second factor; break-glass config accounts exempt; admin reset of another person's factors (never one's own) with bell + e-mail; no "remember this browser"; TOTP ±1 step, never reused; alerts at 10 failed codes, authenticator off at 100. WebAuthn: second factor only (passkey sign-in a v0.8 issue), RP ID from config, HTTPS only, up to 10 keys, clone warning (not refused by default), optional "only keys that cannot be copied". Document approval (part 1) moves to v0.8 with a handbook section on ISO 9001 7.5.2 now. Follow-up to file: "reset every second factor" in the incident restore. Next: mockup.
Author
Owner

Mockup 1046-two-step-sign-in-mockup.html approved by Nikola 2026-11-10 with its open points as recommended: a new Account settings › Security entry replacing Change password (old link works); after an admin password reset: one-time password, second step, then new password; the config-file emergency account may confirm an admin reset with its password; "apps that will stop" warning at setup end and on the off card; lowering the requirement confirms and rings every admin; "Built into a device" label; re-enabling the requirement starts a fresh setup time; "key first" remembered per browser (method only); recovery codes as .txt and a print view; "Remind them" once per person per 24 h plus an automatic reminder 3 days before each person's date. Next: spec and plan (b6v07, v0.6.406).

Mockup `1046-two-step-sign-in-mockup.html` approved by Nikola 2026-11-10 with its open points as recommended: a new Account settings › Security entry replacing Change password (old link works); after an admin password reset: one-time password, second step, then new password; the config-file emergency account may confirm an admin reset with its password; "apps that will stop" warning at setup end and on the off card; lowering the requirement confirms and rings every admin; "Built into a device" label; re-enabling the requirement starts a fresh setup time; "key first" remembered per browser (method only); recovery codes as .txt and a print view; "Remind them" once per person per 24 h plus an automatic reminder 3 days before each person's date. Next: spec and plan (b6v07, v0.6.406).
Author
Owner

Spec decisions (2026-11-10), after research on the spec's open points:

  • Reminder e-mail: sent only when an administrator presses "Remind them", and automatically 3 days before the date. It has its own subject ("Set up two-step sign-in for your Cairn account by {date}").
  • "Sign in again" after a session expires: the server says up front that a window is needed. The window opens straight on the click, the password is typed once, and the second step follows. This avoids Safari's popup block (WebKit 302803).
  • OIDC administrators may reset someone's factors after a fresh sign-in at the identity provider. It is recorded as confirmed by the IdP.
  • Lowering the requirement: texts approved, including an Everyone → Nobody row.
  • QR code: a small encoder in the repo, with no new dependency. Always black on white with a 4-module margin.
  • German strings: "Administration" and "Audit-Protokoll". In a check of competitors' German interfaces (Microsoft "Überwachungsprotokoll", Google "Audit und Prüfung", Nextcloud "Protokoll"), none was found using "Audit-Log".
  • Code findings: the session dialog accepts only 204 as signed in, and the data export ignores a password in the body for people with a second factor.

Next: spec and plan updated, then build (b6v07).

Spec decisions (2026-11-10), after research on the spec's open points: - **Reminder e-mail:** sent only when an administrator presses "Remind them", and automatically 3 days before the date. It has its own subject ("Set up two-step sign-in for your Cairn account by {date}"). - **"Sign in again"** after a session expires: the server says up front that a window is needed. The window opens straight on the click, the password is typed once, and the second step follows. This avoids Safari's popup block (WebKit 302803). - **OIDC administrators** may reset someone's factors after a fresh sign-in at the identity provider. It is recorded as confirmed by the IdP. - **Lowering the requirement:** texts approved, including an Everyone → Nobody row. - **QR code:** a small encoder in the repo, with no new dependency. Always black on white with a 4-module margin. - **German strings:** "Administration" and "Audit-Protokoll". In a check of competitors' German interfaces (Microsoft "Überwachungsprotokoll", Google "Audit und Prüfung", Nextcloud "Protokoll"), none was found using "Audit-Log". - **Code findings:** the session dialog accepts only 204 as signed in, and the data export ignores a password in the body for people with a second factor. Next: spec and plan updated, then build (b6v07).
Author
Owner

Shipped in v0.6.406 (PR #1157, merge bee68e7c). Live on both dogfoods since 2026-11-11 15:34 UTC: pods ready with no restarts and no new warnings. Startup logs webauthn: on rpId=files.c0rdyceps.ch / files-bao.c0rdyceps.ch.

What shipped

  • Methods: two-step sign-in for local and LDAP accounts with an authenticator app (TOTP, ±1 step, no code reused), 10 recovery codes, and security keys and passkeys (WebAuthn, go-webauthn v0.18.2, second factor only, RP from config, https only, up to 10 keys, clone warning, two optional switches).
  • Requirement: Nobody / Administrators / Everyone, with time to set it up. Reminders go out on "Remind them" and 3 days before the date. LDAP directory-group admins are covered.
  • Once someone has a factor:
    • Their account password is refused over WebDAV/Basic. Break-glass is exempt.
    • Confirm it's you everywhere (devices, connect, data export, API key creation) needs the second step.
  • Admin reset: never your own (any name form), OIDC admins need a fresh sign-in at the identity provider, break-glass uses its password.
  • Abuse limits: alerts at 10 failed codes, app off at 100, argon2 work bounded to 2 per process.
  • Addresses in the record follow audit.ip and age out with audit.retainMonths.
  • Deletion and export: the record is removed on every deletion path. The LDAP purge waits on mass-miss until the #904 acknowledge. It is in the data export.
  • Pages: sign-in page steps, Account › Security, Administration, Overview, bell items and mails.
  • Docs: handbook (account, users-access, local-accounts, deployment, data protection, security standards) and the ISO 9001 7.5.2 section in compliance-support.md.

Follow-ups filed separately: passwordless passkey sign-in (v0.8), document approval (v0.8), "reset every second factor" in the incident restore, OIDC acr/amr step-up. The live checks (phone QR in light and dark, hardware key, synced passkey, password-manager passkey, Safari) are posted to #1005.

Shipped in **v0.6.406** (PR #1157, merge bee68e7c). Live on both dogfoods since 2026-11-11 15:34 UTC: pods ready with no restarts and no new warnings. Startup logs `webauthn: on rpId=files.c0rdyceps.ch` / `files-bao.c0rdyceps.ch`. **What shipped** - **Methods:** two-step sign-in for local and LDAP accounts with an authenticator app (TOTP, ±1 step, no code reused), 10 recovery codes, and security keys and passkeys (WebAuthn, go-webauthn v0.18.2, second factor only, RP from config, https only, up to 10 keys, clone warning, two optional switches). - **Requirement:** Nobody / Administrators / Everyone, with time to set it up. Reminders go out on "Remind them" and 3 days before the date. LDAP directory-group admins are covered. - **Once someone has a factor:** - Their account password is refused over WebDAV/Basic. Break-glass is exempt. - Confirm it's you everywhere (devices, connect, data export, API key creation) needs the second step. - **Admin reset:** never your own (any name form), OIDC admins need a fresh sign-in at the identity provider, break-glass uses its password. - **Abuse limits:** alerts at 10 failed codes, app off at 100, argon2 work bounded to 2 per process. - **Addresses** in the record follow `audit.ip` and age out with `audit.retainMonths`. - **Deletion and export:** the record is removed on every deletion path. The LDAP purge waits on mass-miss until the #904 acknowledge. It is in the data export. - **Pages:** sign-in page steps, Account › Security, Administration, Overview, bell items and mails. - **Docs:** handbook (account, users-access, local-accounts, deployment, data protection, security standards) and the ISO 9001 7.5.2 section in compliance-support.md. **Follow-ups filed separately:** passwordless passkey sign-in (v0.8), document approval (v0.8), "reset every second factor" in the incident restore, OIDC acr/amr step-up. The live checks (phone QR in light and dark, hardware key, synced passkey, password-manager passkey, Safari) are posted to #1005.
Cordy closed this issue 2026-11-11 15:37:34 +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#1046
No description provided.