Subscribed calendars
A subscribed calendar is a calendar that someone publishes as an iCalendar feed
(an .ics address, often given as webcal://...) and that you follow in Kantoor.
It is what other products call a webcal or ICS subscription. Kantoor knows nothing
about the system that publishes the feed: any feed that follows the iCalendar
standard (RFC 5545) works, for example a booking system, a school or club
calendar, or a public holiday calendar.
Subscribing
- Open Settings, Calendars.
- Under Subscribe to a calendar, paste the address of the feed. It may start
with
webcal://orhttps://; Kantoor always useshttps. - Choose a name (the website's name if you leave it empty), a colour and how often Kantoor should look for changes, then press Subscribe.
The first refresh starts at once. The events appear in the calendar page next to your own calendars, in the colour you chose and with a small subscribed marker, and in your calendar apps (see below).
The address is a secret: many feeds are protected by nothing else than an address
nobody can guess. Kantoor stores it encrypted (with the vault key
KANTOOR_VAULT_KEY; without that key subscribing is not possible), never writes it to
a log, an error message or the audit log, and after you saved it shows only the name
of the website. To use another address, choose Change and enter the new one.
What it does
- Refreshing. Every subscription is refreshed on its own interval: every 15
minutes unless you chose otherwise, never more often than every 5 minutes. Kantoor
asks the server whether the feed changed (
ETagandLast-Modified), so an unchanged feed costs almost nothing. Refresh now asks for a refresh at once; Pause stops the automatic refreshes until you Resume. - Read-only. You cannot add, change or delete events of a subscribed calendar, in Kantoor or in a calendar app. Change them where the calendar is published. It is also not offered when you share a calendar with someone else.
- The events are replaced as a whole. A refresh that succeeds makes the calendar match the feed exactly, in one step: events that are new or changed appear, events that left the feed disappear, and nothing is ever half way.
- When something goes wrong. If the feed cannot be fetched or is not an iCalendar
feed, the events you already had stay as they were, the subscription shows
not refreshing with the reason and the time of the events you are looking at,
and Kantoor tries again later: each failure in a row doubles the wait, up to six
hours (a server that says when to come back, with
Retry-After, is obeyed). It recovers by itself when the feed works again. - Recurring events, exceptions and time zones. Repeating events, occurrences that
were moved, occurrences that were cancelled, events in other time zones (the
feed's own
VTIMEZONEdefinitions, and zone names such asEurope/Amsterdam), all-day events and floating times are shown correctly, in your own time zone (Settings, Profile). An event markedCANCELLEDis not shown. - Free/busy. By default the events of a subscribed calendar make you busy when others on this server look for a time (Settings, Sharing decides whether they may look at all). Untick Its events make me busy for a calendar that only informs you, such as public holidays.
In your calendar apps
A subscribed calendar is also a CalDAV calendar in your account, so phones and
desktop programs that sync with Kantoor show it, with its name and colour. It is
read-only there too, and says so: its DAV:current-user-privilege-set (and that of
each event) lists only the read privileges, so a calendar app greys it out. A request
to change it is refused with 403 and a DAV:need-privileges answer: PUT or
DELETE of an event, PROPPATCH of the calendar, deleting, renaming or moving it,
and copying or moving events into or out of it. The refreshes arrive as ordinary
changes (sync-collection reports events that are new, changed or gone), and it
counts for free/busy (schedule-calendar-transp) as you chose. Remove the
subscription in Settings, Calendars instead. In a calendar app the events keep
what the feed said, a cancelled event included (STATUS:CANCELLED); it is only the
calendar page of Kantoor that leaves cancelled events out.
Limits
- Only
httpsaddresses on the standard port, without a user name or password in them. The feed may be at most 5 MB, must answer within 20 seconds, and may redirect at most 5 times (only to otherhttpsaddresses). - Kantoor only fetches from servers on the public internet. An address that leads to a private, loopback or link-local address (also through a redirect or a host name that resolves to one) is refused, so a subscription cannot be used to reach other machines on the network of the server.
- At most 25 subscriptions per user, 5000 events per feed. Tasks and journal entries in a feed are ignored, as are events without a start.
- A feed that needs a login (HTTP authentication or cookies) cannot be followed.
- The refresh is done by the server, not by your calendar app, so a calendar app that is not connected to Kantoor is not refreshed.
For a provisioning system
A system that sets users up through the provisioning API can subscribe a user to a feed, check its state (never its address) and remove it.
For administrators
Refreshing is done by every replica of Kantoor (see
Running several replicas): each looks every 30 seconds
for subscriptions that are due, and a claim in Postgres lets exactly one of them
fetch each subscription. A replica that stops in the middle of a fetch is not waited
for longer than five minutes. The addresses are encrypted with the vault key, so the
key must be the same on every replica, Kantoor.Vault.reencrypt/0 moves them to a new
key after a rotation, and the application refuses to start if the key is missing or
wrong while subscriptions exist.