10. Security
OSM is built to be safe by default: the web desktop asks for an account first, the part of OSM that faces the network has no privileges, and every change goes through a small, checked core. The Security overview explains the design. This chapter covers what you control.
A checklist
- Turn on two-step sign-in or a passkey for every Administrator (My Account).
- Leave automatic security updates on (Settings > Updates and Recovery).
- Keep the firewall on, and open nothing on your router that you do not need. To reach the server from outside, prefer the VPN or remote access to forwarding the web desktop's port.
- Use a trusted certificate if the server is reached by name from outside (Let's Encrypt).
- Back up to a place other than the server's own disks, and keep immutable snapshots of what matters most.
- Run Security Check now and on a schedule, with its report by email.
- Give people only the access they need: Standard users rather than Administrators, shared folder permissions, App Permissions.
The firewall
Settings > Security > Firewall. The firewall is on by default: only the ports of the services and apps you run answer, and its page lists them. It also lets you:
- Always let in (every port), or Never let in, addresses and networks;
- block countries, or let in only the countries you choose (Who may connect, from the Internet registries' lists). Your local network is never blocked. The lists are renewed every month; when they are missing (on the second server of a High Availability pair, say), OSM fetches them within the hour and says so meanwhile, since blocking countries without them blocks nothing, and letting in only some lets in only your local network.
These lists apply to the server's own services and to the ports that container apps publish. OSM refuses a change that would shut out the browser you are using; change the countries first rather than adding your address to Always let in, which lets it in on every port. Through OSM Connect the lists never shut you out: Connect reaches the desktop from the server itself.
While the firewall is on, the services meant for your network alone (the monitoring exporters, SNMP, the syslog server, the domain controller, a UPS shared with your other servers) answer only to your local network. Each app can also have network rules of its own. An app with an address of its own on your network, like a virtual machine on the bridge, is a separate device: the firewall does not stand in front of it, and it has no network rules, so set its rules on your router.
Security Check
Security Check looks at the settings that matter most: updates, SSH, the firewall, two-step sign-in, the certificate and more. Red comes first; Fix does it for you where it can, Open shows the setting.
- On its own: every day, week or month, with a report by email if you want, and a notification when it finds a problem.
- Vulnerabilities: the known vulnerabilities (CVEs) of the installed software, from Debian's security tracker, and which ones an available update fixes.
Antivirus
Install Antivirus from the App Catalog (ClamAV). It scans the shared folders you choose, now or every night or week, at low priority so the server stays responsive. What it finds goes into the volume's quarantine (or is only reported, as you choose), where nobody can open it: put a file back only when you are sure, or delete it. Its signatures update every day by themselves.
Scan now and Update the signatures run in the background. The app shows the scan or the update running, with how far it is; go on working, or close the app: opened again, it still shows it running. When one you started has finished, the bell says so (and what a scan found, or why it did not finish). With quarantine chosen, it says apart what was moved into quarantine and what was not (a file not found again when it was scanned alone stays where it was: the scan's log says why).
Sign-in protection
- Addresses are paused after repeated failed sign-ins, an account waits a few seconds after 3 failures in a row (from any address), and sign-ins end when idle. If you turn on Lock an account that keeps failing in Settings > Security > Account, accounts are locked after repeated failures too (Accounts).
- Password reset by email, in the same tab, lets people reset a forgotten password from the sign-in page with a link sent to their email address. It works once email is set up in Settings > Notifications.
- Settings > Security > Signed in lists the current sign-ins and ends any of them.
- Logs, source Administrator actions, records every change made in the web desktop, with an API token or with the
osmcommand. Changes made in a shell withsudoare not in it: the source Sign-ins and sudo shows the commands run withsudo. - Settings > Desktop Access > More host names: the desktop answers to an IP address, to the server's name (alone or followed by
.local), tolocalhost,osm.localandosm-installer.local, and to the names you add here. It refuses other names, which stops DNS rebinding.
Encryption
- The system: OSM and its settings, encrypted at installation if you choose, unlocked by the TPM or a passphrase (Installation). The volumes are not part of it: encrypted shared folders protect files.
- Shared folders: encrypted folders, locked and unlocked with their password (Shared folders). Unlock at start-up keeps a folder's password on the server, so that the folder unlocks by itself.
- Backups: always encrypted with the task's password (Backup).
- On the network: the web desktop is HTTPS only; SSH and the VPN are encrypted; SMB is signed and encrypted when the computer asks for it. NFS and Media Streaming are not encrypted, and FTP is encrypted only with FTPS: keep those on your local network.
Compliance
Settings > Compliance shows what an audit asks of the server, as it is now: the security of processing under the GDPR (article 32), or the controls of Cyber Essentials. For each control (Firewall and ways in, Secure settings, Who has access, Protection from malware, Security updates, Backups, Encryption) it says what is so, whether it is In place or something to Look at, and which file of the pack shows it. Looking is free.
Make the pack (OSM Business) downloads one zip to hand to the auditor or keep with your records:
index.html: every control in one page;accounts.csv: every account, who is an Administrator, two-step sign-in, turned off, last use; with a directory joined, also the members of its Administrators' groups (an Administrator without the second step is something to look at, and a group that could not be read is named);who-can-see-what.csv: every account against every shared folder (Shared folders);backups.csv: each backup task, its last run and its last test restore;updates.csv: the updates applied, and how each ended;encryption.csv,firewall.txt,settings.txt,antivirus.txt;admin-actions.txt: the Administrators' actions of the last 90 days, oldest first, as OSM wrote them (a line another program or account put in the system log is not one); never what a Standard account did with its own files.
Protection from malware is In place only with proof that it works: signatures of the last 3 days, a scheduled scan (Antivirus, Schedule), and a scan within its period. The antivirus installed alone is something to look at. A computer UrBackup has known for more than 3 days without a backup counts as late in Backups.
manifest.txt: each file's SHA-256, so a file changed afterwards no longer matches.
Packs made lists when each pack was made, by whom, and its own SHA-256. The pack shows what is so; it is not a certificate, and the auditor decides.
Whoever has the server in hand
Someone at the server's keyboard and screen can give an Administrator a new password (key R on its screen), and start the server in recovery mode, a root shell that asks for no password. That is by design, as on any computer, so that you can always get back in: keep the server where strangers cannot reach it.
Encrypting the system protects OSM and its settings on disks taken out of the server, not your volumes. With the TPM, the server starts by itself, so a stolen server starts too, reset menu included. If the whole server could be stolen, keep what matters in encrypted shared folders, and either unlock the system with a passphrase typed at every start, or do not use Unlock at start-up for those folders.
Reporting a vulnerability
To report a vulnerability in OSM, write privately to security@osm-os.com, in English, German or French: the Security page of OSM's website says how (Security overview). The server publishes the same contact at https://<server>:5001/.well-known/security.txt.