A declared storage restore does not pause federated shares out #1072

Closed
opened 2026-11-02 12:11:02 +00:00 by Cordy · 7 comments
Owner

Problem. After an administrator declares a storage restore (#904), public links pause until the owner resumes them, because a restored folder may hold older or different content at the same paths. Federated shares out over Open Cloud Mesh are not paused: the other server keeps reading whatever the restore put at the shared path.

Today.

  • Restore pause: internal/restores, the public link pause, and the restore checklist (Resume public links).
  • Since #1057 (v0.6.385), federated shares out carry an item id, so a restored item with a different id is already refused as replaced. A restore that brings back the same item at an older version still serves.

Proposal (research first, then a mockup).

  • Should a declared restore pause federated shares out like links? This would need a checklist row "Resume federated shares" and the owner's Turn on.
  • Alternatively, rely on the item id alone and document that the other server sees the restored version.
  • Compare how links behave, and what Nextcloud does with federated shares after a restore.

Refs. #1057 spec §14 (left undecided, separate issue), #904.

**Problem.** After an administrator declares a storage restore (#904), public links pause until the owner resumes them, because a restored folder may hold older or different content at the same paths. Federated shares out over Open Cloud Mesh are not paused: the other server keeps reading whatever the restore put at the shared path. **Today.** - Restore pause: `internal/restores`, the public link pause, and the restore checklist (Resume public links). - Since #1057 (v0.6.385), federated shares out carry an item id, so a restored item with a different id is already refused as replaced. A restore that brings back the same item at an older version still serves. **Proposal (research first, then a mockup).** - Should a declared restore pause federated shares out like links? This would need a checklist row "Resume federated shares" and the owner's Turn on. - Alternatively, rely on the item id alone and document that the other server sees the restored version. - Compare how links behave, and what Nextcloud does with federated shares after a restore. **Refs.** #1057 spec §14 (left undecided, separate issue), #904.
Author
Owner

Research done (research-1072.md).

Correction to the issue text: pausing public links at a restore is an opt-in box, off by default, and only an administrator resumes them.

How the restore type affects federated shares

  • Whole restore (data and state): the ledger and the item ids come back together. Older content is served, shares ended after the backup come back live, and shares made after it disappear.
  • Data-only restore: older versions of the same item are still served.

What the other server sees: the older files, with no restore signal. A Nextcloud desktop client syncs them down and deletes the newer files.

Market: nobody pauses external shares after a restore. Microsoft 365 Backup restores the old permissions; Google restores files without their sharing.

Side finding: this one depends on the shareinfo problem found in #1070. Any 404 pause can make Nextcloud delete the share for good.

Recommendation

  • Add a separate opt-in box at the declaration.
  • Shares made before the declaration answer 503 while paused.
  • The owner turns each share on again, and the admin has a "Resume all" checklist row with an "End again" option for shares ended after the backup.
  • The shareinfo fix ships first, and the box starts unticked until it is live-tested.
  • 9 mockup frames. Decisions follow.
**Research done** (`research-1072.md`). **Correction to the issue text:** pausing public links at a restore is an opt-in box, off by default, and only an administrator resumes them. **How the restore type affects federated shares** - **Whole restore (data and state):** the ledger and the item ids come back together. Older content is served, shares ended after the backup come back live, and shares made after it disappear. - **Data-only restore:** older versions of the same item are still served. **What the other server sees:** the older files, with no restore signal. A Nextcloud desktop client syncs them down and deletes the newer files. **Market:** nobody pauses external shares after a restore. Microsoft 365 Backup restores the old permissions; Google restores files without their sharing. **Side finding:** this one depends on the `shareinfo` problem found in #1070. Any 404 pause can make Nextcloud delete the share for good. **Recommendation** - Add a separate opt-in box at the declaration. - Shares made before the declaration answer 503 while paused. - The owner turns each share on again, and the admin has a "Resume all" checklist row with an "End again" option for shares ended after the backup. - The `shareinfo` fix ships first, and the box starts unticked until it is live-tested. - 9 mockup frames. Decisions follow.
Author
Owner

Decisions (Nikola, 2026-11-02): all recommendations approved.

  • The box: "Pause federated shares" is a separate opt-in box on the restore declaration.
    • It starts unticked until the #1070 shareinfo fix has been live-tested, then becomes ticked by default.
    • The security-incident box preselects it.
  • While paused: shares created before the declaration answer 503.
  • Resuming: the owner turns each share back on. The admin gets a new checklist row with "Resume all", plus "End again" for shares ended after the backup.
  • Notification: the owner gets a bell.
  • Audit: the OCM audit notes carry the share id and the recipient. This part ships now.

Next is a mockup with 9 frames. The build follows the shareinfo fix.

**Decisions (Nikola, 2026-11-02): all recommendations approved.** - **The box:** "Pause federated shares" is a separate opt-in box on the restore declaration. - It starts unticked until the #1070 shareinfo fix has been live-tested, then becomes ticked by default. - The security-incident box preselects it. - **While paused:** shares created before the declaration answer 503. - **Resuming:** the owner turns each share back on. The admin gets a new checklist row with "Resume all", plus "End again" for shares ended after the backup. - **Notification:** the owner gets a bell. - **Audit:** the OCM audit notes carry the share id and the recipient. This part ships now. Next is a mockup with 9 frames. The build follows the shareinfo fix.
Author
Owner

Mockup approved (Nikola, 2026-11-02): 1072-restore-federated-mockup.html, all 12 frames, the strings and every open point.

The open points as approved:

  1. The box's default switches to ticked through a code change in the release after the live check passes.
  2. End again reuses the #1071 admin revoke. If #1071 slips, the list ships without the button.
  3. Shares made after the backup appear in a collapsed list with no action (2 more strings).
  4. Old audit entries without a share id show the "audit log incomplete" fallback.
  5. Shares the owner ended after the backup can't be turned back on (409 share-ended-after-backup), and Resume all skips them.
  6. Shares received from other servers get one sentence and are not paused.
**Mockup approved** (Nikola, 2026-11-02): `1072-restore-federated-mockup.html`, all 12 frames, the strings and every open point. The open points as approved: 1. The box's default switches to ticked through a code change in the release after the live check passes. 2. End again reuses the #1071 admin revoke. If #1071 slips, the list ships without the button. 3. Shares made after the backup appear in a collapsed list with no action (2 more strings). 4. Old audit entries without a share id show the "audit log incomplete" fallback. 5. Shares the owner ended after the backup can't be turned back on (409 `share-ended-after-backup`), and Resume all skips them. 6. Shares received from other servers get one sentence and are not paused.
Author
Owner

Research on the spec's 14 unsettled points (research-1072-unsettled.md), checked against M365, Google Workspace, Nextcloud admin_audit, NIST 800-53 (AU-2, AU-12, PM-21, CP-10, SA-8(24)), CSF 2.0 RC.RP, ISO 27001 A.8.15, GDPR Art. 30/33, WCAG 2.2 and the i18n guide.

Confirmed (9): U5 shareinfo log stays DEBUG; U6 string drafts follow the style guide; U8 Made list as an array; U9 admin Shares list as a follow-up; U11 unknown owner state counts as frozen; U12 keep the code's names; U13 check mark with the original text (the Accounts row already works this way); U14 narrow End again route. U7 (fail closed) is confirmed too, but has a gap; see below.

Confirmed with fixes:

  • U1: the "audit log incomplete" fallback is right. But the access-logging check reads settings.json, and a whole restore puts that file back too. Read the always-recorded settings-change entries for auditEnabled in the backup-to-declaration range instead. This also closes the listed "switched off and on" residual.
    • Recommend deciding now to move ocm-share-send and ocm-share-end to the admin tier. M365 and Google always record external sharing, and Cairn already records system ends of federated shares at the admin tier.
  • U2: also add ocm-server-remove. Before v0.6.390 it ended shares with no per-share record, so a range that holds one gives "audit log incomplete".
  • U7: the dialog hides the box when the ledger can't be read, so a UI declaration can't ask for the pause then. Show the box with a "cannot be counted right now" line (1 key).
  • U8: cap the Made list stored in storage-restores.json at 200 entries plus a total.
  • U11: the confirm calls owners whose state is unknown "departed or disabled". Add a variant for an outage (1 key).

Changed:

  • U3: rows ended by an administrator or by Cairn show no Turn on and no reason. Add a neutral sub-line (1 key).
  • U4: use PauseBefore, the device rule. The spec's own reason argues for it, and it equals the declaration time unless a suspicion was confirmed.
  • U10: the decision said the audit notes ship now, so fold T1 into the next batch built (ab1071, v0.6.390).

New open points:

  • N1: OCM servers removed after the backup are allowed again, because ocm-servers.json is restored too.
  • N4: the Ended and Made lists only work on s3; on posix the audit log always counts as gone back.
  • N5: the access-toggle text says it stops "file-access events only", but OCM share events stop too.
  • N6: follow-up 1 cites GDPR Art. 30, which needs only categories of recipients; Art. 19 and PM-21 fit better.

New strings proposed: 4 keys, plus 2 generic ticked/not-ticked keys for the Frame 1 announcement.

**Research on the spec's 14 unsettled points** (`research-1072-unsettled.md`), checked against M365, Google Workspace, Nextcloud admin_audit, NIST 800-53 (AU-2, AU-12, PM-21, CP-10, SA-8(24)), CSF 2.0 RC.RP, ISO 27001 A.8.15, GDPR Art. 30/33, WCAG 2.2 and the i18n guide. **Confirmed (9):** U5 shareinfo log stays DEBUG; U6 string drafts follow the style guide; U8 Made list as an array; U9 admin Shares list as a follow-up; U11 unknown owner state counts as frozen; U12 keep the code's names; U13 check mark with the original text (the Accounts row already works this way); U14 narrow End again route. U7 (fail closed) is confirmed too, but has a gap; see below. **Confirmed with fixes:** - **U1:** the "audit log incomplete" fallback is right. But the access-logging check reads `settings.json`, and a whole restore puts that file back too. Read the always-recorded `settings-change` entries for `auditEnabled` in the backup-to-declaration range instead. This also closes the listed "switched off and on" residual. - Recommend deciding now to move `ocm-share-send` and `ocm-share-end` to the admin tier. M365 and Google always record external sharing, and Cairn already records system ends of federated shares at the admin tier. - **U2:** also add `ocm-server-remove`. Before v0.6.390 it ended shares with no per-share record, so a range that holds one gives "audit log incomplete". - **U7:** the dialog hides the box when the ledger can't be read, so a UI declaration can't ask for the pause then. Show the box with a "cannot be counted right now" line (1 key). - **U8:** cap the Made list stored in `storage-restores.json` at 200 entries plus a total. - **U11:** the confirm calls owners whose state is unknown "departed or disabled". Add a variant for an outage (1 key). **Changed:** - **U3:** rows ended by an administrator or by Cairn show no Turn on and no reason. Add a neutral sub-line (1 key). - **U4:** use `PauseBefore`, the device rule. The spec's own reason argues for it, and it equals the declaration time unless a suspicion was confirmed. - **U10:** the decision said the audit notes ship now, so fold T1 into the next batch built (ab1071, v0.6.390). **New open points:** - **N1:** OCM servers removed after the backup are allowed again, because `ocm-servers.json` is restored too. - **N4:** the Ended and Made lists only work on s3; on posix the audit log always counts as gone back. - **N5:** the access-toggle text says it stops "file-access events only", but OCM share events stop too. - **N6:** follow-up 1 cites GDPR Art. 30, which needs only categories of recipients; Art. 19 and PM-21 fit better. New strings proposed: 4 keys, plus 2 generic ticked/not-ticked keys for the Frame 1 announcement.
Author
Owner

Decisions on the spec's unsettled points (2026-11-02)

Nikola decided these on 2026-11-02. Spec section 17 ("Decisions (2026-11-02)"), the plan and followup-issues.md are updated to match. Research: research-1072-unsettled.md.

  • U1: ocm-share-send and ocm-share-end move to the admin tier, so they are always recorded. That change and the old plan Task T1 (NoteFields, the two new verbs, the OCM share notes) move to the #1071 batch (v0.6.390). rp1072 uses them from there. The gap check reads the settings-change entries in the range instead of trusting the restored settings.json. The rule is gap = !since390 && !floor && (!switchNow || auditEnabled flipped in range), where since390 means an audit-tiers entry exists at or before the backup.
  • U2 (extended): share-admin-revoke and ocm-server-remove count too. If the range holds an old-form removal (no out=), the result is "audit log incomplete".
  • U3 (changed): Rows ended by an administrator or by Cairn get one neutral sub-line (fedRstEndedBackOther). "You ended it" stays for the owner's own ends. Deleted files still comes first.
  • U4 (changed): The pause boundary is PauseBefore, the same rule as for devices.
  • U5: confirmed (DEBUG, plus reason).
  • U6: confirmed. Two generic keys chkNowOn / chkNowOff are added for the Frame 1 announcement.
  • U7 + N2: Fail closed. When the ledger can't be read, the dialog still shows the box with a "cannot be counted right now" line (rstFedMetaUnread).
  • U8 + N3: The Made list is capped at 200 entries, plus madeTotal.
  • U9: follow-up issue (the admin Shares list shows restore-paused shares as active).
  • U10: see U1.
  • U11: An owner whose state is unknown during Resume all counts as frozen. A new key, rstFedResumeKeepUnknown, keeps the confirm from calling such owners "departed or disabled".
  • U12, U13: confirmed. The mockup drift is recorded, and ✓ is named stDone.
  • U14: confirmed as narrow. A pid that is not on the list gets 404 restore-share-not-listed.
  • N1 (in this batch): The Federated shares row lists servers removed after the backup that are allowed again, with a link to Open Cloud Mesh › Servers. The Peering row does the same for peers, using peering-peer-remove.
  • N4: The handbook and CHANGELOG say the ended and made lists only work on s3.
  • N5: The toggle text is changed in ab1071. This batch only checks that its docs agree.
  • N6: The follow-up cites GDPR Art. 19 and NIST PM-21 instead of Art. 30.

Open for the #1071 batch: audit-tiers (written at every start) is not in the ab1071 plan yet. If it isn't added there, rp1072 T5 writes it itself, and the evidence then starts at v0.6.392.

## Decisions on the spec's unsettled points (2026-11-02) Nikola decided these on 2026-11-02. Spec section 17 ("Decisions (2026-11-02)"), the plan and followup-issues.md are updated to match. Research: `research-1072-unsettled.md`. - **U1:** `ocm-share-send` and `ocm-share-end` move to the admin tier, so they are always recorded. That change and the old plan Task T1 (`NoteFields`, the two new verbs, the OCM share notes) move to the #1071 batch (v0.6.390). rp1072 uses them from there. The gap check reads the `settings-change` entries in the range instead of trusting the restored `settings.json`. The rule is `gap = !since390 && !floor && (!switchNow || auditEnabled flipped in range)`, where `since390` means an `audit-tiers` entry exists at or before the backup. - **U2 (extended):** `share-admin-revoke` and `ocm-server-remove` count too. If the range holds an old-form removal (no `out=`), the result is "audit log incomplete". - **U3 (changed):** Rows ended by an administrator or by Cairn get one neutral sub-line (`fedRstEndedBackOther`). "You ended it" stays for the owner's own ends. Deleted files still comes first. - **U4 (changed):** The pause boundary is `PauseBefore`, the same rule as for devices. - **U5:** confirmed (DEBUG, plus `reason`). - **U6:** confirmed. Two generic keys `chkNowOn` / `chkNowOff` are added for the Frame 1 announcement. - **U7 + N2:** Fail closed. When the ledger can't be read, the dialog still shows the box with a "cannot be counted right now" line (`rstFedMetaUnread`). - **U8 + N3:** The Made list is capped at 200 entries, plus `madeTotal`. - **U9:** follow-up issue (the admin Shares list shows restore-paused shares as active). - **U10:** see U1. - **U11:** An owner whose state is unknown during Resume all counts as frozen. A new key, `rstFedResumeKeepUnknown`, keeps the confirm from calling such owners "departed or disabled". - **U12, U13:** confirmed. The mockup drift is recorded, and ✓ is named `stDone`. - **U14:** confirmed as narrow. A pid that is not on the list gets 404 `restore-share-not-listed`. - **N1 (in this batch):** The Federated shares row lists servers removed after the backup that are allowed again, with a link to Open Cloud Mesh › Servers. The Peering row does the same for peers, using `peering-peer-remove`. - **N4:** The handbook and CHANGELOG say the ended and made lists only work on s3. - **N5:** The toggle text is changed in ab1071. This batch only checks that its docs agree. - **N6:** The follow-up cites GDPR Art. 19 and NIST PM-21 instead of Art. 30. Open for the #1071 batch: `audit-tiers` (written at every start) is not in the ab1071 plan yet. If it isn't added there, rp1072 T5 writes it itself, and the evidence then starts at v0.6.392.
Author
Owner

Strings approved (Nikola, 2026-11-03): the keys beyond the approved mockup, in DE/FR/IT as built:

  • the 17 keys from the decisions;
  • the 4 keys from the W3 fix round (rstFedEndedDoneOff, rstFedResumeQ1, rstFedResumeGo1, rstFedEndAgainOther);
  • the API texts "Nothing is left to resume." and "The restore is not set up yet; try again in a few minutes."
**Strings approved (Nikola, 2026-11-03):** the keys beyond the approved mockup, in DE/FR/IT as built: - the 17 keys from the decisions; - the 4 keys from the W3 fix round (`rstFedEndedDoneOff`, `rstFedResumeQ1`, `rstFedResumeGo1`, `rstFedEndAgainOther`); - the API texts "Nothing is left to resume." and "The restore is not set up yet; try again in a few minutes."
Cordy closed this issue 2026-11-03 20:12:03 +00:00
Author
Owner

Shipped in v0.6.392 (merge 6f12503d). Both dogfoods run it: cairn-enc (posix) and cairn-openbao (s3) report version=v0.6.392, 0 restarts, no ERROR lines since the rollout.

The hands-on check with the lab Nextcloud is on #1005 ("v0.6.392 (#1072 …)"). The pause box stays unticked by default until that check passes; the tick-by-default question is #1087. Follow-ups: #1083, #1084, #1085, #1086, #1088.

Closing.

Shipped in **v0.6.392** (merge 6f12503d). Both dogfoods run it: cairn-enc (posix) and cairn-openbao (s3) report `version=v0.6.392`, 0 restarts, no ERROR lines since the rollout. The hands-on check with the lab Nextcloud is on #1005 ("v0.6.392 (#1072 …)"). The pause box stays unticked by default until that check passes; the tick-by-default question is #1087. Follow-ups: #1083, #1084, #1085, #1086, #1088. Closing.
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#1072
No description provided.