Repository navigation
M5b: calendar sharing and public links - #38
Merged
Merged
Conversation
Sharing between users ([sharing] enabled = true by default):
- Owner shares a collection read or read-write; pending until the sharee
accepts (REST, web UI, Apple CS:invite-reply). Accepted shares live in
the sharee's own home (/dav/calendars/<sharee>/<owner>-<slug>/); the
owner's paths never resolve for anybody else.
- Owner keeps collection settings, sharing and deletion; sharee may set
their own name/colour/order, DELETE of the collection unsubscribes.
- Sharee writes count against the owner's quota, deletions go to the
owner's trash, every write re-checks the share in its transaction,
never scheduled; owner's scheduling objects are read-only for sharees.
- No MOVE/COPY between owners. Attachments readable by sharees while
shared, uploads by sharees owned by the owner.
- Apple CalendarServer sharing: CS:share POST, CS:invite,
CS:allowed-sharing-modes, notification collection, CS:invite-reply.
- REST: /v1/collections/{kind}/{slug}/shares, /v1/shared,
/v1/admin/shares; web UI share panel and "Shared with me".
Public links ([publish], off by default, needs base_url):
- /public/<token>.ics, 256-bit token stored hashed, uniform 404,
per-client miss limit, ETag/304, sandbox CSP, Cache-Control private.
- Busy-only option, private events busy/hidden/shown, never ATTACH,
VALARM, original UIDs; ORGANIZER/ATTENDEE only on request.
Migration 0013_sharing. Tests: tests/sharing.rs, tests/publish.rs,
authorization matrix (shared read/rw, pending, revoked, new routes),
log_secrets, store tests, fuzz target dav_xml, python-caldav job.
Docs: docs/sharing.md, README, PLAN, produktionsreife, angriffshistorie.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Read-only sharees see events with CLASS other than PUBLIC (overrides inherit the master's) as whitelisted busy stubs with an ETag of the stub, in GET, PROPFIND, multiget, query and sync; attachments of private objects are not readable through read-only shares (items.private, computed by a trigger). - Sharees cannot MOVE/COPY over, or move away, scheduling objects; all sharee writes check for a Schedule-Tag inside the transaction. - Public links: raw path parsing (no 400 for malformed escapes, counted as misses), valid links served before the miss limit, property whitelist, inherited CLASS, left-out overrides become EXDATEs. - Invitation limits: 5 pending per owner and sharee, 24 h block after a decline or leave; CS:share requests are all or nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
M5b: sharing calendars and address books between users, and public read-only links. Design:
docs/sharing.md.[sharing] enabled = trueby default): owner shares a collection with a local user,readorread-write; the sharee must accept (web UI, REST, AppleCS:invite-reply), can decline or leave. Accepted shares appear in the sharee's home as/dav/calendars/<sharee>/<owner>-<slug>/; the owner's path never resolves for anyone else. Owner only: delete/rename, description, time zone, dead properties, shares, links. Sharees: own display name/colour/order per share. Read-write: PUT/DELETE (owner's trash and quota), MOVE/COPY within the share; never between different owners. Every sharee write re-checks the share and refuses scheduling objects (Schedule-Tag) inside the write transaction; revoked = byte-identical to nonexistent everywhere (incl. sync-collection, attachments).calendarserver-sharing,CS:sharePOST (atomic),CS:invite,CS:shared-owner,CS:allowed-sharing-modes, notification collection,CS:invite-reply. Limits: 100 shares/collection, 100 pending per sharee, 5 pending per owner→sharee, 24 h re-invite block after decline.[publish], off by default, needsbase_url):<base_url>/public/<token>.ics+webcal://; 256-bit token stored as BLAKE3 hash, constant-time compare, shown once, revocable; uniform 404 (also malformed paths and feature off); only misses count towards the rate limit. VEVENTs only, property whitelist, no alarms/ATTACH/RELATED-TO/URL/X-*, UIDs hashed per link, ORGANIZER/ATTENDEE only on opt-in, busy-only mode, private events busy/hidden/shown per link, left-out overrides become EXDATEs. Token never logged.0013_sharing.tests/sharing.rs,tests/publish.rs, store/parser tests, authz matrix (read share, rw share, pending, revoked, notifications, new routes), log_secrets,dav_xmlfuzz seeds, config, python-caldav sharing session in the compat job.Reviewed by a Sonnet agent; fixed: sharee MOVE/COPY over the owner's meetings, publish feature detectable via malformed paths, invitation spam, publish blacklist leaks (RELATED-TO, URL, CONFERENCE, X-*), private overrides, rate limit hitting valid links, Schedule-Tag race, non-atomic CS:share.
Not included: group shares, CLI,
CS:shared-url, reply notifications to the owner, IETFDAV:share-resource; restoring a collection from the trash doesn't restore its shares. Not tried with Apple Calendar or other real clients; web UI not seen in a browser.🤖 Generated with Claude Code