Skip to content

open-cloud-mesh: receive shares from a real Nextcloud 35.0.1 (#138) - #256

Merged
michielbdejong merged 1 commit into
mainfrom
claude/ocm-nextcloud-peer
Oct 1, 2026
Merged

michielbdejong merged 1 commit into
mainfrom
claude/ocm-nextcloud-peer

Conversation

@michielbdejong

Copy link
Copy Markdown
Contributor

A spike and an opt-in e2e with the official nextcloud:35.0.1-apache image, on loopback and Docker only, with invented data.

What Nextcloud actually sends:

  • RFC 9421 tag="ocm" signatures with an ES256 key.
  • The legacy webdav/options share protocol, with no uri.
  • shareWith with a scheme (bob@https://host).
  • Folders as resourceType: file.
  • SHARE_UNSHARED without senderDomain.

Plugin changes:

  • Accepts the legacy protocol. It fetches <signer origin>/public.php/webdav/ with Basic auth, through a new fixed-path read operation, fetch-legacy-webdav.
  • Accepts user@https://host addresses.
  • senderDomain is optional, but when present it must still be the signer.
  • Refuses Nextcloud's folder page with 501.
  • Unit tests (26) use the recorded payload shapes.
  • Unsigned requests are still refused, and the shared secret is never stored.

e2e: e2e/nextcloud.spec.ts is skipped unless OCM_NEXTCLOUD_E2E=1. Shared helpers moved to e2e/helpers.ts, and peer.mjs shares its test CA between parallel workers.

Results:

Refs #138. The issue stays open until a pin includes the host fix and the opt-in e2e passes at the pin.

🤖 Generated with Claude Code

Spike against the official nextcloud:35.0.1-apache image: Nextcloud signs
RFC 9421 (tag="ocm") with an ES256 key, sends the legacy
`{name: webdav, options: {sharedSecret, permissions: "<prop>"}}` protocol
without a uri, puts the receiver's URL in `shareWith`, sends folders as
resourceType file, and leaves senderDomain out of SHARE_UNSHARED.

Plugin:
- accept the legacy protocol: fetch `<signer origin>/public.php/webdav/`
  with Basic `<secret>:`, through a new fixed-path read operation
  `fetch-legacy-webdav`, only on the origin the host verified;
- accept `bob@https://host` / `bob@http://host` addresses;
- senderDomain optional in notifications (must still be the signer);
- refuse an HTML answer for a non-HTML name (Nextcloud's folder page).

e2e:
- nextcloud.spec.ts (opt-in, OCM_NEXTCLOUD_E2E=1, Docker, loopback only):
  Nextcloud shares a file through its own OCS API; the File arrives,
  unsharing marks it unshared, a folder share is refused. Fails at the pin
  a12b74a (host refuses ES256); passes on atomic-server branch
  claude/plugin-ocm-es256 (4dd4f39be).
- shared install helpers (helpers.ts); peer.mjs shares its test CA across
  parallel workers, since the server trusts exactly one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant