A re-created account with the same username unfreezes the departed person's shares and links #1054

Closed
opened 2026-10-31 07:48:10 +00:00 by Cordy · 4 comments
Owner

Problem. When a share's creator no longer resolves (a local account deleted, a directory account removed at the identity provider), Cairn freezes their grants and public links: nothing is revoked, and "a deliberately re-created account unfreezes everything as it was" (docs/handbook/sharing.md, When an owner departs). Cairn cannot tell a deliberate re-creation from a different person who later gets the same username (a new employee "a.meier" after the old one left). That person then becomes the owner of the old person's frozen links and grants: the links serve again, the grants reach their recipients again, and the new person sees them under Shares.

Today. #981 (v0.6.366) gives every account a start (epoch): a local account's creation, or a directory account's first sign-in with a new identity provider subject under a known username (first-signins.json, internal/auth/firstsignin.go). Activity and locks from before the epoch are hidden from the new account. Share records do not look at the epoch. #835 did not change this (decision 9: separate issue).

Proposal.

  • A personal record (grant or link) created before its creator's current epoch stays frozen when the epoch belongs to a new subject (not the first record of a name), as if the creator were still departed.
  • Users & access › Departed users keeps listing the old person's records (they are the old person's estate), so an administrator can transfer them (to the new account if that is right), revoke them, or release them to the new account explicitly (one audited action, for example share-epoch-released).
  • Local accounts: deleting and creating a local account of the same name is a new epoch too; the create dialog could say that the old person's shares stay frozen.
  • Space records are unaffected (they belong to the space).

Acceptance. A test: alice (subject S1) makes a link and a grant; alice departs (records frozen); a new alice (subject S2) signs in; the link answers 404, the grant does not serve, and the admin list shows them under the departed alice; after the explicit release (or a transfer) they serve as the new alice's. A re-sign-in of the same subject S1 unfreezes as today.

Refs. #835 decision 9, research-835.md §4 and Q9, #981, #597, #857, #654.

Follow-up of #835 (v0.6.376).

**Problem.** When a share's creator no longer resolves (a local account deleted, a directory account removed at the identity provider), Cairn freezes their grants and public links: nothing is revoked, and "a deliberately re-created account unfreezes everything as it was" (`docs/handbook/sharing.md`, When an owner departs). Cairn cannot tell a deliberate re-creation from a different person who later gets the same username (a new employee "a.meier" after the old one left). That person then becomes the owner of the old person's frozen links and grants: the links serve again, the grants reach their recipients again, and the new person sees them under Shares. **Today.** #981 (v0.6.366) gives every account a start (epoch): a local account's creation, or a directory account's first sign-in with a new identity provider subject under a known username (`first-signins.json`, `internal/auth/firstsignin.go`). Activity and locks from before the epoch are hidden from the new account. Share records do not look at the epoch. #835 did not change this (decision 9: separate issue). **Proposal.** - A personal record (grant or link) created before its creator's current epoch stays frozen when the epoch belongs to a new subject (not the first record of a name), as if the creator were still departed. - **Users & access › Departed users** keeps listing the old person's records (they are the old person's estate), so an administrator can transfer them (to the new account if that is right), revoke them, or release them to the new account explicitly (one audited action, for example `share-epoch-released`). - Local accounts: deleting and creating a local account of the same name is a new epoch too; the create dialog could say that the old person's shares stay frozen. - Space records are unaffected (they belong to the space). **Acceptance.** A test: alice (subject S1) makes a link and a grant; alice departs (records frozen); a new alice (subject S2) signs in; the link answers 404, the grant does not serve, and the admin list shows them under the departed alice; after the explicit release (or a transfer) they serve as the new alice's. A re-sign-in of the same subject S1 unfreezes as today. **Refs.** #835 decision 9, research-835.md §4 and Q9, #981, #597, #857, #654. Follow-up of #835 (v0.6.376).
Author
Owner

Research (2026-10-31, code at v0.6.380). Wider than the title.

  • The account start (#981, first-signins.json) is recorded but no share code reads it; shares to the old "alice" reach the new alice too (internal/share/grant.go:44-60).
  • Biggest leak: /home/<name> passes to the new account untouched, and once the name is taken again transfer, revoke-all and Delete unread refuse with account-resolves (owners.go:147-164), so an admin has no tool for the earlier person's files.
  • With Keycloak/LDAP the re-created directory account makes the name "present" at once, so old links serve before the new person ever signs in.
  • Transfers keep the record's creation date (handover835.go:106), so any epoch rule must stamp a takeover date.
  • Handbook contradicts itself (sharing.md "unfreezes everything" vs users-access.md "inherits nothing").
  • Market: Windows/M365/Google never reuse identities; Nextcloud LDAP/OIDC key users by the directory's unique id. Microsoft's own support pages show the opposite failure (rehires lose access), so a one-step "same person" release is needed too.

Recommended: a record works only if made or handed over after its owner's current account began (2 min grace); applies to creators and user recipients on every surface; Keycloak/LDAP compare the directory user id; Departed users gets an "Earlier account of {name}" row with Give to current / Transfer / Revoke (links arrive paused unless ticked); home folder held until an admin decides (setting to turn the hold off). Open questions are being asked now. Full file: research-1054.md.

**Research (2026-10-31, code at v0.6.380).** Wider than the title. - The account start (#981, `first-signins.json`) is recorded but no share code reads it; shares *to* the old "alice" reach the new alice too (`internal/share/grant.go:44-60`). - Biggest leak: `/home/<name>` passes to the new account untouched, and once the name is taken again transfer, revoke-all and Delete unread refuse with `account-resolves` (`owners.go:147-164`), so an admin has no tool for the earlier person's files. - With Keycloak/LDAP the re-created directory account makes the name "present" at once, so old links serve before the new person ever signs in. - Transfers keep the record's creation date (`handover835.go:106`), so any epoch rule must stamp a takeover date. - Handbook contradicts itself (sharing.md "unfreezes everything" vs users-access.md "inherits nothing"). - Market: Windows/M365/Google never reuse identities; Nextcloud LDAP/OIDC key users by the directory's unique id. Microsoft's own support pages show the opposite failure (rehires lose access), so a one-step "same person" release is needed too. **Recommended:** a record works only if made or handed over after its owner's current account began (2 min grace); applies to creators and user recipients on every surface; Keycloak/LDAP compare the directory user id; Departed users gets an "Earlier account of {name}" row with Give to current / Transfer / Revoke (links arrive paused unless ticked); home folder held until an admin decides (setting to turn the hold off). Open questions are being asked now. Full file: research-1054.md.
Author
Owner

Decisions (Nikola, 2026-10-31): all research recommendations approved. Records work only if made or handed over after the owner's current account began (2 min grace), for creators and user recipients, on every surface; Keycloak/LDAP compare the directory user id in this batch; per-record release from an "Earlier account of {name}" row (Give to the current {name}, Transfer, Revoke; links arrive paused unless ticked); home folder held until an admin decides, with a setting to turn the hold off; shares sent to the old person included; local account creation shows a notice; manual "Treat as a different person" action; name-keyed spaces, admin lists and notices become a separate follow-up. Next: whole-page mockups, then spec and build.

**Decisions (Nikola, 2026-10-31): all research recommendations approved.** Records work only if made or handed over after the owner's current account began (2 min grace), for creators and user recipients, on every surface; Keycloak/LDAP compare the directory user id in this batch; per-record release from an "Earlier account of {name}" row (Give to the current {name}, Transfer, Revoke; links arrive paused unless ticked); home folder held until an admin decides, with a setting to turn the hold off; shares sent to the old person included; local account creation shows a notice; manual "Treat as a different person" action; name-keyed spaces, admin lists and notices become a separate follow-up. Next: whole-page mockups, then spec and build.
Author
Owner

Mockup approved (Nikola, 2026-11-01): 1054-earlier-account-mockup.html, all frames, 96 strings (EN/DE; "zurückgehalten", "Eingefroren, früheres Konto") and the open points as recommended: keep the last display name per account start; "Treat as a different person" acts from now; Give also covers shares others made for the earlier account; peering/OCM deliveries into a kept-apart home are refused as recipient-unavailable; two IdP accounts flipping one name fail closed (account-name-flap); test the earlier directory account's app passwords and fix here if they still work. Next: spec and build.

**Mockup approved (Nikola, 2026-11-01):** `1054-earlier-account-mockup.html`, all frames, 96 strings (EN/DE; "zurückgehalten", "Eingefroren, früheres Konto") and the open points as recommended: keep the last display name per account start; "Treat as a different person" acts from now; Give also covers shares others made for the earlier account; peering/OCM deliveries into a kept-apart home are refused as recipient-unavailable; two IdP accounts flipping one name fail closed (`account-name-flap`); test the earlier directory account's app passwords and fix here if they still work. Next: spec and build.
Cordy closed this issue 2026-11-02 17:26:17 +00:00
Author
Owner

Shipped in v0.6.387 (PR #1075, merge 088dfb1f, tag v0.6.387). Both dogfoods (cairn-enc, cairn-openbao) run v0.6.387: pods ready, no restarts, only the usual start WARNs (power mode, no break-glass account).

What shipped: the earlier-account rule on every serving surface, the Personal folder kept apart (accounts.nameReuse, default hold), Departed users › Earlier account of {name} with Give / Transfer / Revoke all / Delete unread files, Treat as a different person, credentials from before a start refused, account start records fail closed (S4), the start brake with Same people / Different people (S5), and the #1058 residual closed. Full notes: CHANGELOG v0.6.387.

Live checks for Nikola are on #1005. Follow-ups filed separately: name-keyed state for a reused name, and re-encrypting at Give under keycloak-profile custody. Smaller items (Give dialog does not count federated shares, needs a string; era Delete unread during an open brake batch) are in the backlog file.

Shipped in **v0.6.387** (PR #1075, merge 088dfb1f, tag v0.6.387). Both dogfoods (cairn-enc, cairn-openbao) run v0.6.387: pods ready, no restarts, only the usual start WARNs (power mode, no break-glass account). What shipped: the earlier-account rule on every serving surface, the Personal folder kept apart (`accounts.nameReuse`, default hold), Departed users › Earlier account of {name} with Give / Transfer / Revoke all / Delete unread files, Treat as a different person, credentials from before a start refused, account start records fail closed (S4), the start brake with Same people / Different people (S5), and the #1058 residual closed. Full notes: CHANGELOG v0.6.387. Live checks for Nikola are on #1005. Follow-ups filed separately: name-keyed state for a reused name, and re-encrypting at Give under keycloak-profile custody. Smaller items (Give dialog does not count federated shares, needs a string; era Delete unread during an open brake batch) are in the backlog file.
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#1054
No description provided.