Joining computers to your organization
A computer that joins your organization follows your policy and fetches newer policy from your web server every few hours. Joining needs nothing but a signed file: put it on a USB stick, or give people a short code. Install Luft offers to join when it finds either, and so does Settings under System › About.
Your organization’s folder
Section titled “Your organization’s folder”On any Luft computer:
luft org new Acme --address acme.example/k7q4m2This makes a folder named acme with:
| File | Holds |
|---|---|
signing.key |
Your private key. Whoever has it decides for every computer that joined, so keep it as safe as your other keys and out of Git. |
organization.toml |
The address computers fetch newer policy from |
policy.toml |
Your policy, with your organization’s name in [organization] |
--address takes a full https:// address or a code, below. Write your policy in policy.toml with the policy keys, then sign it:
cd acmeluft org signenrollment.toml is now your policy, your public key and your address, signed with your key. Put it on your web server at the address.
A code is your web address with a name after a slash, and stands for a file under /.well-known/luft on that site:
| Code | Address |
|---|---|
acme.example/k7q4m2 |
https://acme.example/.well-known/luft/k7q4m2 |
acme.example |
https://acme.example/.well-known/luft/enrollment |
Codes ignore capital letters, so name the file in lowercase. Anyone who knows the code can read the file, so when your policy holds secrets, such as Wi-Fi passwords, pick a name nobody can guess, and serve it over HTTPS only, as Luft requires.
On a USB stick
Section titled “On a USB stick”luft org stickputs enrollment.toml on the USB stick that’s plugged in, as luft-enrollment.toml; name the stick’s folder when several are plugged in. Plug it in before Install Luft asks who the computer is for, and after that question it says This computer will join Acme, with what you decide in plain words, and the computer joins. When the file on the stick can’t be used, such as one changed after you signed it, Install Luft says why and installs without joining. The same works in Settings under System › About › Join an organization, as an administrator.
With a code
Section titled “With a code”On Who’s this computer for?, Install Luft has Join an organization, which asks for the code. In Settings, Join an organization takes a code too. From a terminal, as an administrator:
luft org join acme.example/k7q4m2luft org join enrollment.tomlWhen Luft was installed for someone else, its owner sees at the first start that the computer belongs to your organization.
Built into your own Luft
Section titled “Built into your own Luft”When you build your own Luft, put enrollment.toml in your repository as files/usr/share/luft/enrollment.toml. Every computer on your image joins at its first start, without asking, before anyone signs in.
Changing the policy
Section titled “Changing the policy”Edit policy.toml, run luft org sign again and put the new enrollment.toml at your address. Computers fetch it every three hours or so and whenever they connect to a network, and take it only when your key signed it and it’s newer than theirs: every file has a serial, the time it was signed, and a computer never goes back to an older one. A file that isn’t signed, was changed after signing or was signed by another key is refused, so whoever controls your web server, or the network in between, can’t change your policy.
Letting a computer go
Section titled “Letting a computer go”Computers leave only with a release file you signed, or when everything is erased, if your policy lets anyone erase. On the computer, luft org shows its id:
luft org # on the computerluft org sign --release 3f9a-c210-77de-0b41luft org sign --release all # every computerThe file lands in releases. Give it to an administrator of that computer, who chooses Leave Acme in System › About › Managed by Acme, or runs luft org leave 3f9a-c210-77de-0b41.toml. To let every computer go, put the release for all at your address: each one leaves at its next fetch. A release only counts while it’s newer than the computer’s policy, so sign it after your last policy change.
Your key
Section titled “Your key”Computers trust the key that signed the file they joined with, and only that key. Keep signing.key somewhere safe and keep a copy offline: without it you can’t change the policy or let computers go, and computers can only leave by erasing. A computer belongs to one organization at a time, and has to leave before it can join another.
Changing your key
Section titled “Changing your key”When someone who shouldn’t may have seen signing.key, or simply from time to time, replace it:
luft org rotateThis makes a new key in signing.key, keeps the old one in previous.key, and signs enrollment.toml with both. Put it at your address as usual. Each computer takes the new key at its next fetch, and from then on refuses files signed only with the old one, so whoever has the old key can’t change their policy anymore. New computers join with the new key.
Until you delete previous.key, luft org sign keeps signing with both keys, so computers that were off or away still find their way. Once luft org shows the new key on every computer, delete previous.key; only then can you rotate again.
How the files and the checks work is in How policy is enforced.