Security policies
Security policies are the rules your organisation sets for its members: two-factor sign-in, how long sessions last, sharing, watermarks, the audit of reads, how long deleted files are kept, the Copilot and encryption. They live under Administration, Security.
Nothing is enforced until you save a policy. A new Hearth has none.
How policies combine
A policy is for Everyone or for one group. A person can be covered by everyone's policy and by the policies of several of their groups. Their rules are the strictest of all of them:
- a switch that restricts (two-factor required, no public links, Copilot off) applies if any policy turns it on;
- a number that limits (sign out after, longest session, link days) is the smallest one set;
- Keep deleted files (days) is the longest one set;
- two lists (allowed mail domains, allowed models) allow only what both allow.
Guests are not covered by policies. They sign in only with a mailed code and see only what was shared with them.
Changes reach people who are already signed in within a few seconds, at their next request. Every save is recorded in the audit log with the values before and after.
Adding a policy
- Go to Administration, Security, and select Add policy.
- Under For, choose Everyone or a group. Each group can have one policy.
- Set the rules described below.
- Select Save.
Select a policy in the list to change it, or select Remove in its dialog to delete it. Its people are then covered by the other policies only. Each row in the list sums up what the policy sets, and counts the links and plain folders that the policy now stops or would leave plain.
The regulated preset
Regulated preset fills everyone's policy with strict values in one step. Its dialog lists what it sets; select Apply to everyone to save it:
- two-factor required, by authenticator app or passkey, with 3 sign-ins or 14 days to set it up;
- sign out after 15 minutes unused, and a longest session of 12 hours;
- new folders end-to-end encrypted by default;
- links need a password and end within 30 days;
- no guests, and no sharing with other servers;
- reads audited, and audit entries kept for six years;
- no web search for the Copilot.
A value that is already stricter stays. What the preset does not cover (the mail policy, sign-in through the provider, retention, the models) is left as it was. It is not a mode: every value can be changed in the policy afterwards, like any other.
Two-factor required
Turn on Two-factor required to make people set up a second factor.
- Sign-ins allowed and Days allowed are the grace period: how many sign-ins, and how many days from their first sign-in under the policy, people have to set it up. Whichever ends first ends the grace period. 0 and 0 means at the next sign-in.
- During the grace period people sign in as usual and see a "Two-factor required" dialog with how many sign-ins they have left, Later and Set up.
- After it, sign-in stops at a "Set up two-factor" step that opens nothing else until one of the allowed ways is set up. People see their backup codes once, then continue.
- New accounts made from an invitation get no grace period.
Ways that count, at the top of the page, is one setting for the whole server: Authenticator app, Passkey and Emailed code. The first two are on by default. Emailed code can be ticked only when outgoing mail is set up, and proves only that someone can read the mailbox.
A passkey counts on its own, since it is both steps at once. When people sign in through your organisation's provider and you turned on Count the provider's two-factor, the provider's second factor counts too (Sign-in).
App passwords and sync devices keep working under the policy. They can only be made from a signed-in browser, so a stolen password alone cannot make one, and someone stopped at the setup step cannot make new ones.
Recovery is an admin's Reset in the person's dialog under Administration, Users. After a reset, the person's grace period is over.
Signing out
- Sign out after (minutes): a browser that is not used for this long is signed out, from 5 to 1440 minutes. A minute before, a "Signing out" dialog counts down with Stay signed in. Use in any tab of the same browser counts for all its tabs, and the server also ends a session whose tab was closed.
- Longest session (hours): every browser session ends this long after
sign-in, from 1 hour up to
SESSION_MAX_DAYS.
Leave a field empty for no limit.
The phone apps are never signed out by these limits. With Sign out after, the app locks after that long unused and asks for the device's own unlock (Face ID, a fingerprint or the device code) before it shows anything; mail, files and notifications keep arriving meanwhile. The longest session does not apply to apps.
Organisation sign-in only
Turn on Organisation sign-in only to make your identity provider the only way in for the people covered. Their Hearth passwords and passkeys no longer sign them in. It applies only while a provider is switched on under Administration, Sign-in, and Hearth's admins are never held to it.
Other mailboxes
Other mailboxes limits which mailboxes people may add to Mail beside the Hearth Mail mailbox Hearth made for them:
- Any: no limit.
- Allowed domains only: only addresses on the domains you list under Allowed domains (comma-separated).
- Organisation mail only: none besides their own Hearth Mail mailbox.
A mailbox the policy does not allow is refused when someone adds it. One added before is switched off: it reads "Switched off by your organisation", the person is told once, and nothing is deleted on its server. It works again if the policy changes. See Mailboxes and mail.
Sharing
- Public links: turn off to stop public links altogether. Links made before stop working while the policy forbids them, and work again if it changes.
- Links need a password: every new or changed link must have one.
- Links end within (days): every link ends at most this many days after it was made. A link without an end gets this one.
- Guests: turn off to stop sharing with outside addresses and guests.
- Other servers: turn off to stop sharing with, and accepting shares from, other Hearth or Nextcloud servers.
Links are judged by the policy of the person who made them, when they are made and every time they are opened. The share dialog follows the policy too: it hides what is not allowed and asks for a password when one is needed.
Watermarks
- Watermark links: PDFs and pictures seen through the covered people's public links carry the link and the time, in UTC to the minute.
- Watermark view-only files: PDFs and pictures that the covered people open without the right to change them (shared read-only, a space's library they only read) carry their name, address and the time.
- Watermark in Office: with either of the above, Office documents opened view only open in Office's secure view with the same line. Shown only when one of the two switches above is on.
The mark is drawn into the file by Hearth's PDF and picture engines, in previews and zips too. Some files are never marked:
- end-to-end encrypted files, because the server cannot read them;
- other kinds of file (only PDFs, pictures and, with Watermark in Office, Office documents are);
- files fetched over WebDAV and by the sync apps, which receive the stored file;
- shares with guests (not done yet).
Audit reads
Turn on Audit reads to record who opened or downloaded which file, mail message, contact or event. It is off by default, because it is personal data about your staff; check what your rules and staff agreements allow before you turn it on.
What counts as a read:
- a file opened in a viewer (Office, PDF, the reader, Notes), shown or downloaded in the browser, downloaded in a zip, over WebDAV or by a sync app;
- a mail message opened through Hearth, or one of its attachments;
- a contact or an event looked at.
Previews, thumbnails and lists are not reads. Reads appear under Administration, Audit log, Reads (Audit log).
Keep deleted files
Keep deleted files (days) holds back the covered people's deleted files and old versions for at least this many days. Neither they nor the daily clean-up can remove them for good earlier. Leave it empty to use the server's usual rules. See Retention and legal holds.
Copilot
- Copilot: turn off to take the Copilot away from the covered people: its chat, its panel and the Office assistant.
- Models: tick the models they may use, from those you offer under Administration, Copilot. None ticked means any of them. This list is shown only when you offer more than one.
- Web search: turn off to stop the Copilot searching the web.
- Copilot may reach: untick Mail, Files, Calendar or Notes to keep the Copilot out of that area, as people's own switches in Settings do.
The rules are enforced on the server, not only by hiding buttons.
A model provider that sees health data, or other data under your rules, needs its own agreement with you: a business associate agreement under HIPAA, a data processing agreement under GDPR. Point LiteLLM at a provider that signs one, or at a model on your own hardware (Copilot and LiteLLM).
New folders
New folders sets the encryption of the folders people make at the top of their own files:
- As each person chooses: the default.
- End-to-end by default: the End-to-end encrypted switch in the New folder dialog starts on, and people may turn it off.
- End-to-end required: it is on and cannot be turned off. The server refuses a plain folder at the top of their files from the web, WebDAV and the sync apps alike.
The dialog reminds you that end-to-end folders have no previews, search, Copilot or Office: the server cannot read what is in them. Folders inside other folders, and the folders Hearth's own apps make (Notes, Photos, mail attachments), are not covered. Folders made before the policy stay as they are, and the list counts them; their owners move the contents into an encrypted folder if needed. Hearth never encrypts existing folders by itself.
Hearth does not force encryption at rest on everyone. See Encryption for what each kind of encryption protects.
Remote wipe
Remote wipe is not a policy but an action, for an admin (Administration, Users, a person's dialog, Wipe) or the person (Settings, Sessions, "Wipe all my devices"). It ends every session, removes every sync device and app password, and the apps delete Hearth's data when they next connect. See Users and groups.