Operating the CA
laissez-ca is the SSH certificate authority a team runs for itself. It
registers people's devices through your SSO (OIDC), checks each device's
posture answer, and issues short-lived OpenSSH user certificates. Stock
sshd trusts it through TrustedUserCAKeys. No sshd patches or plugins.
This guide covers setup, the config file, your identity provider, sshd, revocation and backups. For what the posture check proves and what it does not, read the threat model first.
Status: Phase 1 (v0). Every posture answer is agent-reported, and device keys are software keys until milestone M6. Wire formats may change before Phase 2.
Contents
- How it fits together
- Install
- Set up a CA
- Config file reference
- Phone attestation
- Requiring a hardware token key
- Identity provider setup
- Several sign-in providers
- The account page
- Inviting people
- sshd setup
- Admin commands
- Reinstating
- The admin console
- Hosted tenants
- Login checks and canaries on a server
- Canary tokens
- Certificate lifetime and revocation timing
- Logs
- Backups
- Running it
How it fits together
- A person runs
laissez enroll https://ssh-ca.example.comon their device. They sign in through your identity provider in a browser. The CA maps their identity to SSH principals, records the device's public key, and asks the device for a grant: a list of posture questions (predicates) the CA may ask. - When the person runs
ssh,laissez-ssh-agenton their device asks the CA for a challenge, gets the device's signed answer fromlaissezd, and posts it to the CA. - The CA checks the answer against the environment that governs the
principal asked for. If every required predicate is
true, it signs an OpenSSH certificate for the device key, valid forcert_ttl(10 minutes by default). sshdaccepts the certificate because it trusts the CA's public key.
The CA serves five HTTP endpoints, all POST with JSON bodies:
/v1/register/start, /v1/register/finish, /v1/register/grant,
/v1/challenge and /v1/cert.
Install
There are no published packages yet. Build from source with the Rust
toolchain pinned in rust-toolchain.toml. The build needs OpenSSL's
development files (for WebAuthn attestation); on Debian or Ubuntu:
sudo apt-get install build-essential pkg-config libssl-dev
cargo install --locked --path crates/lz-ca
This installs the laissez-ca binary. SQLite is compiled in. packaging/ca/
has systemd units for the CA and the console and a container image; see
Packaging.
Set up a CA
1. Generate the keys
sudo laissez-ca init --dir /etc/laissez-ca
--dir defaults to /etc/laissez-ca. The directory is created with mode
0700 if missing. init writes six files and refuses to overwrite any
that exist:
| File | What | Mode |
|---|---|---|
ssh_ca_ed25519 |
SSH CA private key (Ed25519, OpenSSH format). Signs certificates. | 0600 |
ssh_ca_ed25519.pub |
Its public key line, for TrustedUserCAKeys. |
0644 |
audience_ed25519 |
Audience private key (raw Ed25519 seed). Signs challenges. Every grant names its public half. | 0600 |
audience_ed25519.pub |
Audience public key, base64url. | 0644 |
event_ed25519 |
Event key (raw Ed25519 seed). Signs the event stream; set event_key to it. |
0600 |
event_ed25519.pub |
Event public key, base64url. Pin it wherever the stream is checked. | 0644 |
It prints the audience and event keys and, on stdout, the line to add to
sshd's TrustedUserCAKeys file.
Run as root, init leaves the files owned by root. Hand the directory to
the user that runs the CA before starting it:
sudo chown -R laissez-ca:laissez-ca /etc/laissez-ca
laissez-ca serve refuses to load a private key file that group or others
can read or write.
2. Write the config
Copy crates/lz-ca/laissez-ca.example.toml to /etc/laissez-ca/laissez-ca.toml
(the default --config path) and edit it. See the
reference below.
Put the OAuth client secret in the file named by
oidc.client_secret_file. Leading and trailing whitespace is trimmed.
Make it readable only by the user that runs laissez-ca.
Create the database's directory. serve creates and migrates the SQLite
file itself, but not its parent directory:
sudo mkdir -p /var/lib/laissez-ca
Migrations are applied in order by number, and the CA records each one's name. It refuses to start on a database whose recorded migrations, or the tables they create, do not match its own, rather than skip or re-run any.
This is expected only for a development database built from an unreleased branch, such as the admin passkey work before its migrations were renumbered (it applied them as 0025 to 0028, or later as 0027 to 0030; they are now 0028 to 0031). No release used those numbers, and such a database can be recreated.
For any other database, do not delete it: it holds the issued certificates, the revocations and the event history. Stop, keep the file, and either restore the backup that matches this build, or run the build that created the database, or ask for help.
3. Check it
laissez-ca check-config --config /etc/laissez-ca/laissez-ca.toml
It prints <path>: ok (N environment(s), N predicate(s) requested, cert_ttl 10m) or the first error. It checks the file only. It does not load keys or
contact the identity provider.
4. Serve
laissez-ca serve --config /etc/laissez-ca/laissez-ca.toml
At startup serve reads the client secret, loads both keys, opens (and
creates or migrates) the database, and fetches the identity provider's
discovery document. If any of these fails, it exits. It stops cleanly on
Ctrl-C or SIGTERM.
The service speaks plain HTTP. Put it behind a TLS terminator (nginx,
Caddy, a load balancer) that serves public_url. Devices refuse a CA URL
that is not https://, except http://127.0.0.1 and http://[::1] for
local testing.
Run one serve process per CA. Registration sessions and outstanding
challenges live in that process's memory. A second instance behind a load
balancer would not know about the first one's. A restart only means
in-flight enrollments start over and devices fetch a new challenge.
5. Tell your users
Users need the CA's public_url and the principal they should use. Their
side is in the README. The easiest
way to hand both over is a join link; see Inviting people.
Config file reference
TOML. Durations are a number and a unit, and terms add up (1h 30m): "90s", "10m", "24h", "180d".
Unknown keys are an error, so a typo cannot silently weaken policy.
Top level
| Key | Required | Default | Meaning |
|---|---|---|---|
listen |
no | "127.0.0.1:8443" |
Address and port the HTTP service binds. |
public_url |
yes | The CA's public base URL, as devices see it (e.g. "https://ssh-ca.example.com"). Devices sign it into their registration and challenge requests, and the CA refuses requests made for any other URL (trailing slashes aside). |
|
ssh_ca_key |
yes | Path of the SSH CA private key. | |
audience_key |
yes | Path of the audience private key. | |
database |
yes | Path of the SQLite file. | |
cert_ttl |
no | "10m" |
Lifetime of issued certificates. Must be more than zero. This is also the longest a revoked device keeps access; see revocation timing. |
login_freshness |
no | "30d" |
How recently a login must have been verified to grant principals, for a person with more than one login. See the freshness rule. |
[oidc]
This is the original provider. It stays the provider with id oidc, and
its principals stay in the top-level [principals] table. A config with
only [oidc] and [principals] works as it always has. For more providers,
see [[login_provider]].
| Key | Required | Default | Meaning |
|---|---|---|---|
issuer |
yes | Issuer URL. The CA fetches <issuer>/.well-known/openid-configuration. Must be https (plain http only on a loopback IP, for tests). |
|
client_id |
yes | OAuth client id. | |
client_secret_file |
yes | File holding the OAuth client secret. | |
principal_claim |
no | "email" |
ID token claim whose value is looked up in [principals]. Must be a string claim. |
callback |
no | "client" |
Where the provider returns to. "client": laissez and the desktop apps get the answer at their own loopback listener; the phone apps still go through the CA. "ca": every client goes through <public_url>/v1/login/callback/oidc, which is then the only redirect URI laissez and the apps need (for example on one Google "Web application" client); the account page and [oidc_broker] need their own, listed in callback URLs. Any other value is refused. Changing it on [oidc] needs a CA restart. |
[principals]
A table from the value of principal_claim to the SSH principals that
person may get certificates for:
[principals]
"alice@example.com" = ["alice", "deploy"]
"bob@example.com" = ["bob"]
A person whose claim value is not listed cannot register a device. The CA
reads this table on every challenge, so removing a person (and restarting
the CA) stops their certificates. Use laissez-ca people revoke for an
immediate, permanent block.
A principal must also be listed in an [[environment]] to be usable. A
principal no environment governs is refused.
[principals] belongs to the [oidc] provider only. Every
[[login_provider]] has its own principals table.
[[login_provider]]
Zero or more further sign-in providers, beside [oidc]. Each has a kind
(oidc, apple or github) and an id. The id is 1 to 32 characters of
a-z, 0-9 and -, unique, and not oidc (that is [oidc]'s). It
appears in the logs and events and on the account page, and it names the
provider's logins in the database, so pick it once and keep it. The config
is checked at start, and by laissez-ca check-config.
The CA holds each id to the provider it first started with successfully,
in its database (an oidc provider whose issuer fails discovery, say from a
typo or a trailing slash, binds nothing, so fixing the config is enough; an
apple id's team_id and services_id are not checked at start, so get
them right before the first start): an oidc id to its issuer ([oidc] included), an apple id to
its team_id and services_id, a github id to GitHub. serve refuses to
start if an id now names another provider, and says which id. Logins stored
under the id belong to the old provider, and the new one's users would
otherwise be matched against them. To move to another provider, give it a
new id; people link the new login on the account page. There is no command
to unbind an id: clearing it means deleting its row from the
provider_bindings table by hand, which hands every login stored under the
id to the new provider.
Common to all kinds:
| Key | Required | Default | Meaning |
|---|---|---|---|
kind |
yes | "oidc", "apple" or "github". |
|
id |
yes | The provider's id. | |
principals |
no | none | The provider's own table from the value of principal_claim to SSH principals, as [principals] is for [oidc]. Write it as a sub-table: [login_provider.principals] straight after the section's keys. A provider with no principals grants nothing. |
principal_claim |
no | "email" ("sub" for Apple, "id" for GitHub) |
What principals is keyed by. |
kind = "oidc" (Google, Okta or any other OIDC provider; the same flow as
[oidc]):
| Key | Required | Default | Meaning |
|---|---|---|---|
issuer |
yes | Issuer URL. | |
client_id |
yes | OAuth client id. | |
client_secret_file |
yes | File holding the client secret. | |
hosted_domain |
no | none | Required hd claim. A login from another domain is refused. |
callback |
no | "client" |
"client" or "ca", as for [oidc]; with "ca" every client returns through <public_url>/v1/login/callback/<id>. On a [[login_provider]] a change applies on reload; sign-ins already started keep their own callback. |
kind = "apple" (Sign in with Apple):
| Key | Required | Default | Meaning |
|---|---|---|---|
services_id |
yes | The Services ID, which is the OAuth client id. | |
team_id |
yes | Your Apple developer team id. | |
key_id |
yes | Id of the Sign in with Apple key. | |
private_key_file |
yes | File holding that key's P-256 private key (the .p8 PEM). The CA signs a short-lived client secret with it for each code exchange. |
|
principal_claim |
no | "sub" |
Apple's stable user id for your team (its sub), e.g. "001234.0123456789abcdef.1234". It is the login's subject: a person Apple signs in who is not yet mapped is refused with a message naming it, and the login_linked event carries it. |
kind = "github" (a GitHub OAuth app):
| Key | Required | Default | Meaning |
|---|---|---|---|
client_id |
yes | The OAuth app's client id. | |
client_secret_file |
yes | File holding the client secret. | |
principal_claim |
no | "id" |
"id", "email" or "org"; anything else is refused. |
organizations |
no | none | Organizations whose membership is read, for principal_claim = "org". |
A GitHub login is identified by GitHub's numeric user id, which survives a
rename. With principal_claim = "id" the principals keys are those ids
as strings ("583231" = ["alice"]), not user names. With "email" they are
the account's verified emails. With "org" they are organization names: a
person gets the principals of every organization in organizations they
belong to, combined.
login_freshness = "30d"
[[login_provider]]
kind = "oidc"
id = "google"
issuer = "https://accounts.google.com"
client_id = "1234.apps.googleusercontent.com"
client_secret_file = "/etc/laissez-ca/google_secret"
hosted_domain = "example.com"
[login_provider.principals]
"alice@example.com" = ["alice", "deploy"]
[[login_provider]]
kind = "github"
id = "github"
client_id = "Iv1.0123456789abcdef"
client_secret_file = "/etc/laissez-ca/github_secret"
[login_provider.principals]
"583231" = ["alice"]
[[login_provider]]
kind = "apple"
id = "apple"
services_id = "com.example.laissez"
team_id = "ABCDE12345"
key_id = "KEY1234567"
private_key_file = "/etc/laissez-ca/apple_key.p8"
[login_provider.principals]
"001234.0123456789abcdef.1234" = ["alice"]
Where principal_claim is email, the provider must vouch for the email
(email_verified: true) before the login counts. A principal key is looked
up only in its own provider's table: the same email at another provider
grants nothing there.
Key grants from a consumer provider (Apple, a personal Google account,
GitHub) by its stable user id, not by email. An email-keyed grant follows
whoever holds that address at the provider: a personal account keeps its
email when the person leaves your organization, so disabling them in your
corporate directory does not end it, and only revoking the person here
does. A generic oidc provider keeps email as the default because a
Google Workspace or Okta tenant you control is the usual case; use it with
email keys only for a directory your organization owns.
[grant_request]
What the CA asks each device to grant at enrollment. The user sees this on the consent screen.
| Key | Required | Default | Meaning |
|---|---|---|---|
org |
no | public_url |
Seeds the organization name when the CA first creates its organization record (unless [organization] name is set). After that the stored name is shown on the consent screen and written into new grants; see Organization name. |
predicates |
yes | Predicates the CA may ask about. Each must be in the registry, with a parameter from the registry's fixed buckets (for example os_patched_within:14d, screen_lock_within:5m). |
|
lifetime |
no | "180d" |
How long the grant lasts. After it expires the device must enroll again. |
rate_per_hour |
no | 120 |
Most questions per hour the device will answer under the grant. |
The CA also asks for a freshness bound of 60 seconds (the challenge lifetime). The device declines rather than answer with older facts.
Changing grant_request affects only enrollments made after the change.
If you add a predicate that an environment requires, devices enrolled
earlier do not have it in their grant. They are declined until the person
runs laissez enroll again.
[admin]
Rules for organization admin requests (/v1/admin/*).
| Key | Required | Default | Meaning |
|---|---|---|---|
device_presence |
no | "audit" |
What happens to an admin action authenticated only by a device signature, with no approved passkey proof: "off", "audit" or "require". |
A device signature on an admin request shows that the request came from an
admin's enrolled device, not that the admin approved it in person. laissezd
never signs admin requests on a computer, so device-signed admin requests
come from the phone apps (or an older laissezd). Phone apps that support
passkey approvals (below) send a proof of a person the CA checks; older
ones only prompt locally, which the CA cannot see.
"off"runs the action and records it withperson_proof = "none"."audit"(the default) also raises anadmin_without_person_proofintegrity alert (detaildevice_signature_only) naming the admin's device. Like other alerts it is limited to one per device per hour, and it never revokes anything."require"refuses the action with403 person_proof_requiredand raises the same alert. A refused attempt is also recorded as anadmin_requestaction ("Refused admin request" in the console; target: the request path without its query, at most 200 bytes; outcomerefused: person_proof_required), at most once per device per hour, like the alert. Later attempts in that hour are counted, and the next recorded row says how many were not recorded. Only a passkey approval from a passkey an owner has approved gets an action through. Turn"require"on only once every admin's phone runs an app version with passkey approvals and has an approved passkey; until then use the admin console, a bearer token orlaissez-ca.
The setting covers every /v1/admin request that is not a GET (today
POST /v1/admin/commands and POST /v1/admin/organization/members...).
Admin reads, the console, bearer tokens and the laissez-ca CLI are not
affected. Every recorded admin action carries person_proof: "none" for
a device-signed one, and empty when it was not device-signed.
Self-service revocation (POST /v1/me/devices/<id>/revoke, a person
revoking one of their own devices, typically a lost laptop from their
phone) is recorded with person_proof = "none" but is not an organization
admin action: it is never alerted or refused, even under "require".
Refusing it would take away the quickest way to cut off a lost device, and
misuse can only revoke the person's own devices. laissezd never signs it on
a computer.
admin_without_person_proof alerts count toward the compliance bundle's
integrity_alerts_count like every other integrity alert. Under the
default "audit", each admin using the phone app without an approved
passkey adds up to one a hour.
Passkey approvals
A phone app approves each admin request with a passkey, bound to that
exact request. It needs [mobile] (the passkey relying party).
Set up. In the Passport app, the admin chooses to set up a passkey for admin approvals. The app signs in again with
fresh_auth: the CA asks the provider for a new sign-in (prompt=login,max_age=0) and accepts it only if the ID token'sauth_timefalls inside the registration (403 stale_sign_inotherwise; some providers ignore both parameters and keep the oldauth_time). For 900 seconds after that, a device whose person holds theadminorownerrole may register one passkey. A plain re-registration through an OIDC provider does not open this window.GitHub and Apple cannot be made to sign the person in again, and report no
auth_time, so the CA cannot verify a fresh sign-in through them. Any registration through a GitHub or Apple provider therefore opens the same 900-second window, and the passkey is recorded as enrolled without a fresh sign-in (enrol_kind = "provider_cannot_reauth", against"fresh_auth"). The CA decides this from the configured kind of the provider the sign-in went through; the client cannot choose it. For these passkeys the owner's approval is the only gate. This path is open only to a person who has never had a login at a configured OIDC provider: once any OIDC login has been linked to the person, admin passkey enrolment needs that provider's forced fresh sign-in, whichever provider they sign in with. Unlinking the OIDC login does not change this; the CA keeps a record of unlinked logins for this purpose.An OIDC provider that is itself a Laissez CA acting as an OIDC broker does not pass
prompt=loginormax_ageupstream and issues noauth_time, so admins who sign in through one cannot enrol an admin passkey: their setup fails closed withstale_sign_in.The window is one-shot: registering an admin passkey closes it, and another needs a new sign-in.
Each registration by an admin raises an
admin_passkey_enrolledintegrity alert, recorded only, whose detail says how it was enrolled:passkey_enrolled_fresh_auth,passkey_enrolled_provider_cannot_reauthorpasskey_enrolled_step_up.Approve the passkey. An owner approves it in the console under Organization, Admin passkeys (
/console/passkeys), after confirming with its admin that they set it up. The CA cannot tell a phone from a computer: it has no attestation for phones, and the key kind is what the device reported. The page shows, labelled as such, what the CA does know: the App Attest app id it verified for the device's Secure Enclave key, if any (with a friendly name, such as "Passport Signer for Mac", only next to the id), the reported key kind, when the device was last registered (passkey setup re-registers it) and first registered (unknown for devices registered before this was recorded), the person's other active devices, how the passkey was enrolled, and how long after that sign-in. Confirm out of band that the person set it up on their phone.The same page withdraws an approval (the passkey stays) and removes a passkey, each with a reason and each in the admin log. Removal marks the passkey removed and keeps its public key, so the assertions stored with past approvals stay verifiable; it voids approvals made with it and not used yet. Approval is refused for a removed passkey and for one whose device or person is revoked.
Revoking a device leaves its passkey's approval in place: while the device is revoked it cannot sign anything, but reinstating it makes the approval count again, with no new owner decision. The device's reinstate page says when it has an approved admin passkey. If the device was revoked as compromised, withdraw the approval before reinstating it. A device-signed request can neither approve, withdraw nor remove a passkey. The page marks a passkey enrolled through GitHub or Apple "Enrolled without a fresh sign-in; confirm with the person before approving": confirm with them out of band (in person, or by a call you placed) before approving it. Only a passkey registered in the admin enrolment window can be approved; a step-up companion's passkey (registered under
step_up.devices) is listed as not eligible. To use that phone for admin approvals, an owner removes the passkey here and the admin sets up a new one from the Passport app.Approve each request. Before an admin command, the app sends the exact request to
POST /v1/admin/approvals/start. The CA parses it as the route would, checks the role, and returns a summary the app shows, then a passkey prompt with user verification.POST /v1/admin/approvals/finishchecks the assertion and returns a one-use approval valid for 60 seconds. The command then carriesLaissez-Person-Proof: passkey <approval>, which the CA spends only if the device, person, CA URL, method, exact path and query, and body hash all match. The two ceremony routes are not subject todevice_presence(they produce the proof) but need the device signature and the admin role like any admin route.
Each approval keeps the passkey's raw assertion and the challenge it
signed; the admin action's person_proof_ref points at it. person_proof
is "passkey" for a passkey an owner approved, and "passkey_unapproved"
for one no owner has approved yet, which counts as no proof (alerted
under "audit" with detail passkey_not_approved, refused under
"require"). A request that presents a proof that does not match is
refused with 403 invalid_person_proof in every mode, and a proof sent
with a read (GET) with 400 person_proof_unexpected. The signed
admin_action event names the approval's binding digest and passkey
credential as well as its row.
GET /v1/admin/organization reports person_proof (mode,
passkey_approvals, passkey_enrolled, passkey_eligible,
passkey_approved) so the app knows what to do. passkey_eligible is
false for a step-up companion's passkey, which an owner must remove
before the admin can set up one for admin approvals.
[[environment]]
Policy per group of principals. Repeat the table for each environment.
| Key | Required | Default | Meaning |
|---|---|---|---|
name |
yes | Name for logs and errors. Must be unique. | |
principals |
yes | SSH principals this environment governs. Must not be empty. A principal may appear in only one environment. | |
min_assurance |
no | "agent-reported" |
Minimum assurance of each required result. Only "agent-reported" is accepted in Phase 1; "hardware-backed" is a config error until hardware evidence is checked. |
require |
no | [] |
Predicates that must be true. Each must also be in grant_request.predicates, or the config is rejected. |
trusted_issuers |
no | [] |
Evidence issuer keys. Reserved for Phase 2; not used yet. |
A required predicate fails if the device reports false or unknown, or
leaves it out. Every failing predicate is reported back to the device and
logged, not just the first.
Platform matters. A predicate that does not exist on a platform is always
unknown there, so it always fails: sip_enabled and kexts_disallowed
on Linux, kernel_lockdown on macOS. Do not require them in an environment
that Linux (or macOS) devices use.
Do not require ssh_key_hardware_bound in Phase 1. Every Phase 1
device uses a software key, so it is always false. An environment that
requires it denies every certificate. (The example config requires it in
production. Remove it there until hardware keys ship in M6.)
[environment.step_up]
Second-device approval for an environment: each new certificate needs a
phone's approval (or, with device_passkey, a passkey on the computer
itself). Place it right after its own [[environment]]. Phones and wire
details are in mobile-passports.md.
| Key | Default | Meaning |
|---|---|---|
approval |
"device" |
What a phone's approval needs. "device": a signature from the phone's admitted device approval key (D). "device+passkey": that signature over a user-verified assertion of one of the person's passkeys. "device+passkey" needs [mobile]. |
legacy_approval_grace |
"30d" |
How long phones without an admitted D may still approve the old way, with their identity key, counted from the first load of this release for this environment. |
devices |
[] |
Deprecated for phones. When set, only these admitted phones may approve, and only these may approve the old way during the grace period. Required (and naming the computers) for device_passkey. At most 64, unique. |
require_user_verification |
false |
Deprecated. The same as approval = "device+passkey"; either one turns it on. Required with device_passkey. |
require |
[] |
The phone's own required predicates. |
min_assurance |
"agent-reported" |
Minimum assurance of the phone's results. |
require_attested |
false |
Also require the phone's latest registration attestation to still count (see Phone attestation). D's approvals always need it. |
device_passkey |
false |
Approve with a platform passkey on the accessing computer instead of a phone (Windows Hello). Unchanged by the approval modes. |
A phone approves with its D once D is admitted (see
Admitting approvers). D needs [phone_attest]: without
it no phone can have one.
The grace period. The clock starts the first time a CA running this
release loads the environment, so deploying the CA before the apps ship
starts each environment's timer; use a longer legacy_approval_grace if the
apps are late. Until it ends, a listed phone that has never had an admitted D
approves as released phones always have, including the passkey ticket in
device+passkey, and can still add a passkey. After it ends, only admitted
Ds approve. An environment without [phone_attest] still loads after the end:
the CA logs step_up_without_phone_attest at load and refuses every approval
with step_up_attestation_required.
- The clock is kept per environment name (
step_up_grace.environment). Renaming an environment, or adding one, starts a new grace period for it. - A phone that has had an admitted D never returns to the old way, whatever the clock says, even if a later D waits, is refused or stops counting.
- The console's device cards say "Approves through the old app until
{date}" for a phone on the old way, and "Update the app and get approval to
approve sign-ins" once that has ended. A phone that has had an admitted D
but no longer approves says "Waiting for approval before it can approve
sign-ins" while a newer D waits, "Can no longer approve sign-ins. Update
the app on this phone." when the newest D is reported because of the app
(an iOS development or ad-hoc build, or an Android key made with the wrong
authentication policy), "Can no longer approve sign-ins. This phone's new
approval key could not be checked." when it is reported for another
reason (for example a chain the CA refuses, an unlocked bootloader or a
key outside secure hardware), with the CA's recorded reason under
Details, and "Can no longer approve sign-ins until it is approved again"
otherwise. A reported D can never be admitted. The admin API's device
list carries the same, per environment, as
approval(path,legacy_until,reasonwaiting,needs_app_update,approval_key_uncheckedorlapsedfor those phones). The recorded reason is shown only in the console, never over the API.
Moving lz-test. lz-test lists the owner's iPhone in devices with
require_user_verification = true and [phone_attest]:
- Deploy the CA. Its first load starts the 30-day clock for each step-up environment; the listed iPhone keeps approving the old way meanwhile.
- Keep
devicesas it is during the move. - Update the iPhone app. It sets up its D, which waits.
- Admit it on the CA host with
laissez-ca approvers admit <device-id> --code "<code the phone shows>": the console refuses the owner's own phone. From then on the iPhone approves only with its D. Withrequire_user_verification = true(device+passkey), it also sets up a passkey again after admission (a fresh sign-in, then setup signed by D): its old passkey stays the phone's own and does not count for approvals with D. Until then the CA answers the phone's approval with403 passkey_needed, and the app offers setup. - Once every phone that approves has an admitted D,
devicescan go.
A config that works in Phase 1
listen = "127.0.0.1:8443"
public_url = "https://ssh-ca.example.com"
ssh_ca_key = "/etc/laissez-ca/ssh_ca_ed25519"
audience_key = "/etc/laissez-ca/audience_ed25519"
database = "/var/lib/laissez-ca/ca.sqlite"
cert_ttl = "10m"
[oidc]
issuer = "https://accounts.google.com"
client_id = "1234-abc.apps.googleusercontent.com"
client_secret_file = "/etc/laissez-ca/oidc_secret"
[principals]
"alice@example.com" = ["alice"]
"bob@example.com" = ["bob", "deploy"]
[grant_request]
org = "Example Corp"
predicates = ["disk_encrypted", "os_patched_within:14d", "firewall_enabled",
"screen_lock_within:5m"]
[[environment]]
name = "production"
principals = ["alice", "bob", "deploy"]
require = ["disk_encrypted", "os_patched_within:14d", "firewall_enabled"]
Phone attestation ([phone_attest])
With this section the CA asks enrolling phones for hardware attestation
(design: docs/superpowers/specs/2026-11-25-phone-attestation-design.md).
Without it, no phone is asked and every device is reported.
[phone_attest]
ios_app_ids = ["KXSWJN7WY8.io.iqlusion.laissez"]
[[phone_attest.android]]
package = "io.iqlusion.laissez"
signer_sha256 = ["537082d23cb8c0f70131df0b324290d9aee6298eed6c2d782913125155bc48de"]
| Key | Default | Meaning |
|---|---|---|
ios_app_ids |
none | iOS apps, <team id>.<bundle id>, whose App Attest attestations count. Empty: iOS attestations are refused. |
ios_allow_development |
false |
Also accept App Attest development-environment keys (Xcode builds). TestFlight and App Store builds always use production. |
[[phone_attest.android]] |
none | package and signer_sha256 (the SHA-256 of the release signing certificate, hex, colons allowed; several only across a key rotation). Empty: Android attestations are refused. |
android_allow_self_signed_boot |
false |
Accept a locked bootloader running an OS signed by a user-installed key (for example GrapheneOS). Unlocked bootloaders are never accepted. |
android_require_remote_provisioning |
false |
Accept only Android chains whose attestation keys Google issued online (Remote Key Provisioning): issued under Key Attestation CA1, or through a Google-named (O=Google LLC) intermediate. Factory-provisioned attestation keys ("keyboxes") have leaked from many devices and let anyone forge an Android attestation until Google revokes them, so turn this on before relying on require_attested for Android. Phones without RKP then stay reported. |
ios_require_validation_category |
false |
Refuse iOS attestations that carry no launch validation category (older iOS versions). With a category, only TestFlight (2) and App Store (4) builds count, plus development-signed (3) and ad hoc or enterprise (5) builds when ios_allow_development is set. |
max_age |
none | How long a recorded attestation counts for require_attested, for example "90d"; the phone must enroll again after it. |
android_status_file |
none | A download of https://android.googleapis.com/attestation/status, used in addition to the copy built into the CA. Read at load; refresh it and reload regularly. |
test_apple_roots, test_google_roots |
none | DER roots replacing Apple's or Google's. Tests only. |
At least one iOS app or Android entry is required. A phone whose
attestation does not verify (including an App Attest leaf carrying Apple's
macOS aclBlob, which is a Mac app's key), or that sends none (old app,
Simulator, App Attest unavailable), still enrolls, as reported; the CA logs the reason as
phone_attestation_rejected. The admin API's device list carries
attestation, attestation_detail and attested_at, and console device
cards show it. Each registration replaces the record: re-enrolling without
an attestation makes the device reported again.
To require an attested companion for step-up:
[environment.step_up]
devices = ["<phone device id>"]
require_attested = true
Certificates are then refused with step_up_attestation_required until the
companion's latest registration was attested and what was attested still
meets the current [phone_attest]. The app, signing digests, environment,
validation category, boot state, remote provisioning and max_age are
re-checked, and every Android chain certificate is looked up in the status
list in use now: refreshing android_status_file and reloading the CA
withdraws attestations made with a key Google has since revoked. The admin
API's attestation_accepted and the console show the same judgement. At
load the CA logs android_status_list with the list's source and age
(stale after 7 days); schedule the download, for example daily. require_attested needs
[phone_attest] and cannot be combined with device_passkey.
Requiring a hardware token key
By default a certificate is issued to the device key. An environment can instead require that the certificate go to a separate key whose hardware vouches for how it is used: a Secure Enclave key (App Attest), or a YubiKey PIV key. The user-facing setup is in yubikey-piv.md.
[key_attest]
Opt in to each token source:
[key_attest]
piv = true # accept YubiKey PIV attestations
| Key | Default | Meaning |
|---|---|---|
piv |
false |
Accept YubiKey PIV attestations at /v1/key/enroll. The chain must end at one of Yubico's two pinned roots ("Yubico PIV Root CA Serial 263751" and "Yubico Attestation Root 1"), through intermediates Yubico publishes. Preview-device CAs are refused, and so is a chain that is expired at the CA's clock. |
extra_roots |
none | A PEM file of further roots to trust. For tests only: it replaces nothing, but anything it names can vouch for any key. |
Without piv = true, POST /v1/key/nonce and POST /v1/key/enroll answer
disabled. Only P-256 keys are accepted in v0 (unsupported_key_type).
[app_attest]
Secure Enclave keys made by the Mac Signer are vouched for by Apple App
Attest. [app_attest] names the allowed apps:
[app_attest]
app_ids = ["KXSWJN7WY8.io.iqlusion.laissez.signer"]
required_flags = ["biometry-current-set"]
| Key | Default | Meaning |
|---|---|---|
app_ids |
required | Allowed apps, <team id>.<bundle id>. |
allow_development |
false |
Also accept development keys (aaguid appattestdevelop, or appattestsandbox, which one Apple page gives for sandbox keys). Production keys (appattest and seven zero bytes) are always accepted. |
required_flags |
none | Access-control flags every key must declare, on top of private-key-usage. |
required_confirm |
none | Confirmation screens every key must declare. |
max_age |
30d |
How long an enrollment counts before the Signer must enroll again. |
test_roots |
none | DER roots to trust instead of Apple's App Attestation Root CA. Testing only. |
Every attestation under [app_attest] comes from a Mac app, so the CA also
applies Apple's macOS check: the leaf certificate's aclBlob extension (OID
1.2.840.113635.100.8.6) must hold exactly the access policy Apple
documents for a Mac with System Integrity Protection and full security mode
enabled. An attestation without it, or with any other value, is refused
with attestation_rejected (on /v1/se-key/enroll and
/v1/ioc-consent/enroll). The check runs at enrollment. max_age limits
both kinds of enrollment: a Secure Enclave key stops counting and an IOC
consent key's receipts are refused (consent_key_expired), so keys enrolled
before the check last at most max_age. iPhone attestations carry a
different aclBlob and are not verified under [app_attest]; the
[phone_attest] path in turn refuses a leaf with the macOS value.
[environment.<name>.key]
A key table on an [[environment]] says what the key behind each
certificate must prove. Write it inline:
[[environment]]
name = "production"
principals = ["alice", "bob"]
require = ["disk_encrypted", "os_patched_within:14d"]
key = { sources = ["yubikey-piv"], presence = "every", consent = ["pin-always", "pin-session"] }
| Key | Meaning |
|---|---|
sources |
Allowed sources: app-attest, yubikey-piv. Empty: any. |
presence |
Least physical presence per signature: none, cached (a touch covers about 15 s) or every. Orders every > cached > none. |
consent |
Accepted consent values: pin-always, pin-session, biometry-current, biometry-any, biometry-session, user-presence, passcode, none. A stricter value satisfies a looser one. Empty: any. |
vouched_by |
Accepted vouched-by values: hardware, vendor, app. A YubiKey is vendor. Empty: any. |
require_se_key = true still works and means key = { sources = ["app-attest"] }. Setting both is a config error.
With a key table, a request for the device key is denied key_required.
A token key the person has not enrolled (or that another person enrolled)
is denied key_not_enrolled; one revoked with laissez-ca keys revoke is
denied key_revoked; one whose attested policy falls short is denied
key_policy_unmet, naming the field (presence, consent, sources or
vouched_by). The same table applies at login.
A YubiKey PIV key maps to a policy like this:
| Key's PIN policy | consent |
Key's touch policy | presence |
|---|---|---|---|
| never | none |
never | none |
| once per session | pin-session |
cached (15 s) | cached |
| always | pin-always |
always | every |
Any other policy byte is never guessed at: the enrollment is refused
(bad_attestation). That includes the YubiKey Bio values, until Yubico
documents how they appear in an attestation.
What the certificate says
A certificate issued to a token key carries three extensions, which sshd
can match with AuthorizedPrincipalsCommand or log:
key-attest@iqlusion.io: the source,yubikey-piv.key-policy@iqlusion.io: the normalized policy, for exampleconsent=pin-always;location=token;per-signature=none;presence=every;vouched-by=vendor.key-policy-native@iqlusion.io: the token's own words, for examplepin=always,touch=always.
The token's serial number is kept for admins and is never put in a certificate, an event or an API response.
Enrollment is per person
A token key is enrolled by a person's device (laissez keys enroll-piv) and
then works from any of that person's devices. A key enrolled by one person
is refused for another (key_enrolled_elsewhere), and a key that is a
device's own Secure Enclave key is refused (key_is_device_key).
Enrolling again replaces the old enrollment. Revoking a person revokes
their token keys.
Identity provider setup
These sections describe the [oidc] provider and generic OIDC
[[login_provider]] sections. Other kinds and extra providers are in
Several sign-in providers.
What the CA needs from any provider
Flow. Authorization code with PKCE (S256), plus a per-login
nonce. The CA sends its client secret in the code exchange.Scopes.
openid,emailandprofile.ID token signature. An asymmetric algorithm (RS*, PS*, ES* or EdDSA). HMAC-signed ID tokens are refused. If a token fails signature checks, the CA re-fetches the provider's keys (at most once a minute), so key rotation needs no restart.
email_verified. Whenprincipal_claimisemail(the default), the ID token must carryemail_verified: true. A missing claim, or any other value, refuses the login (email_unverified). Some providers omit it; with those, map a different claim.Redirect URI. With the default
callback = "client", the redirect forlaissezgoes to the user's own device, not to the CA. (The phone apps, and every client withcallback = "ca", return through the CA instead: see callback URLs.)laissez enrolllistens on a port the OS picks and uses:http://127.0.0.1:<port>/cbThe port changes on every run. The CA accepts only
httpredirects to a loopback IP literal (127.0.0.1or[::1]), neverlocalhost, with no credentials or fragment. Your provider must accept a loopback redirect on any port, as RFC 8252 section 7.3 describes for native apps.laissez enrollhas no option to fix the port.
Google Workspace
- In the Google Cloud console, open APIs & Services → OAuth consent screen. Choose Internal, so only accounts in your Workspace can sign in.
- Open Credentials → Create credentials → OAuth client ID. Choose application type Desktop app. Google accepts loopback redirects on any port for this type, and you do not register a redirect URI.
- Copy the client ID into
oidc.client_id. Save the client secret in theclient_secret_file. - Set
oidc.issuer = "https://accounts.google.com". - Keep
principal_claim = "email". Google setsemail_verified.
The CA does not check the Workspace domain (hd claim) itself. Only the
emails you list in [principals] can register, and an Internal consent
screen keeps other Google accounts out.
A Desktop app client has no list of https redirect URIs, and a Web
application client refuses an app's custom scheme, so the phone apps can
use neither with their own callback. If
people enroll phones, use an application type Web application client
instead: add the authorized redirect URI
<public_url>/v1/login/callback/oidc (the provider's id in place of oidc
for a [[login_provider]]), and set callback = "ca" so that laissez returns
through the same URI. One client then serves laissez, the desktop apps and the
phone apps.
Okta
- In the Okta admin console, create an app integration: OIDC - OpenID Connect, application type Native Application.
- Grant type: Authorization Code. Turn on Require PKCE.
- Client authentication: Client secret. The CA always sends one.
- Sign-in redirect URI:
http://127.0.0.1/cb. See the warning below. - Assign the app to the people or groups who may enroll devices.
- Set
oidc.issuerto your authorization server. For the org server that ishttps://<your-org>.okta.com; for a custom one, for examplehttps://<your-org>.okta.com/oauth2/default. The CA appends/.well-known/openid-configuration. - Keep
principal_claim = "email". With theemailscope Okta includesemail_verified. Check that your users' emails are verified in Okta, or their logins are refused.
Warning: dynamic ports. laissez enroll uses a different loopback port on
every run. Okta's developer forum has said Okta does not follow RFC 8252's
"any port" rule for loopback redirects, which would make the redirect fail
with a mismatch. We have not yet tested enrollment against a live Okta
tenant. Test one enrollment before rolling out. If it fails on the
redirect URI, Okta cannot be used with this version of laissez enroll.
Several sign-in providers
A CA can accept sign-ins from one or several providers at once. The legacy
[oidc] section is optional (id oidc) as long as at least one
[[login_provider]] is configured, so Apple-only, GitHub-only, or
multi-provider CAs and hosted tenants need no [oidc] section. A person is
one record with one or more logins, each a provider and that provider's
stable user id (OIDC sub, GitHub's numeric id, Apple's sub). Email never
joins two logins and never grants anything across providers. A login is looked
up in its own provider's principals only.
Clients pick a provider with laissez enroll <ca-url> --provider <id> or
laissez setup <ca-url> --provider <id>. Without the flag, a CA with one
provider uses it and a CA with several asks. The ids come from the CA's
GET /v1/providers.
The OIDC broker ([oidc_broker]) works with every configured sign-in
provider. When one provider is configured (or the caller passes
?provider=<id> to /oauth/authorize), the broker redirects straight to it;
when several are configured, /oauth/authorize renders a provider chooser
that posts to POST /oauth/authorize/choose.
Existing CAs need no change. Migrations 0020_logins.sql,
0021_reinstate.sql and 0022_provider_bindings.sql run when serve
starts; the first successful start after them binds every configured id,
oidc included, to its provider. They turn every existing
person into a person with one login of provider oidc, so a config with
only [oidc] behaves as before: one login never lapses, and the account
page lets that person link more.
Callback URLs to register
What you register depends on who the provider returns the browser to.
| Provider | Register at the provider |
|---|---|
oidc (and any kind = "oidc" provider), for laissez enroll and laissez setup |
With the default callback = "client", nothing new: OIDC providers return to the loopback listener laissez opens (see what the CA needs). With callback = "ca", <public_url>/v1/login/callback/<id>, and no loopback redirect. |
| Any provider, for the mobile apps | <public_url>/v1/login/callback/<id>. The app's native app callback (an exact [mobile] redirect_uris entry: a custom scheme or an https app link) is never given to the provider, because Google and others refuse a custom scheme for a web client. The provider returns to the CA, which finishes the login and redirects to the app with a one-time code bound to the enrollment session. |
apple and github, for laissez enroll and laissez setup |
<public_url>/v1/login/callback/<id>. Neither Apple nor GitHub OAuth Apps accept dynamic loopback ports or custom app schemes. The CA receives the provider's answer there, finishes the login itself and redirects the browser on to the client with a one-time code. |
| Any provider people use on the account page | <public_url>/account/callback/<id>. |
Any provider used with [oidc_broker] |
<public_url>/oauth/upstream/callback for [oidc], and <public_url>/oauth/upstream/callback/<id> for any [[login_provider]]. |
| Any provider the console uses | <console public_url>/console/callback, on a client of its own. See the console. |
Replace <id> with the provider's id (oidc for [oidc]).
Upgrade note. Ship the apps first. App builds from before this change refuse every OIDC sign-in from an upgraded CA, and the CA cannot tell old apps from new ones. Release the updated iPhone and Android apps, and wait until phone users run them, before upgrading any CA whose phones sign in through OIDC. The updated apps work with older CAs too.
Earlier versions gave an OIDC provider the app's own
callback (io.iqlusion.laissez:/oauth/callback) when a phone enrolled.
This version sends every phone sign-in through the CA. If phones enroll
through [oidc] or a kind = "oidc" [[login_provider]], register
<public_url>/v1/login/callback/<id> with that provider before
upgrading the CA, or phone enrollment fails with a redirect URI mismatch at
the provider. Update the iPhone and Android apps too: app builds from before
this change accept only their own callback for an OIDC sign-in and refuse
the new sign-in URL. laissez and the desktop apps are unaffected unless you set
callback = "ca", which needs a laissez from this version or later.
A pending hand-off (Apple, GitHub, any phone sign-in, and any provider set to
callback = "ca") is kept in the CA's memory for ten minutes.
If the CA restarts between the provider's callback and the client's finish
call, that sign-in is lost and the person runs laissez enroll again. The same
holds for any sign-in in progress.
Setting up Apple
- In the Apple developer account, create an App ID with Sign in with
Apple on, then a Services ID; this is
services_id. - In the Services ID's Sign in with Apple configuration, add your CA's
domain and the return URL
<public_url>/v1/login/callback/<id>(and<public_url>/account/callback/<id>if people will use it on the account page, plus<public_url>/oauth/upstream/callback/<id>if used with[oidc_broker]). - Create a Key with Sign in with Apple enabled. Download the
.p8file once (setprivate_key_fileto it) and note the key id (key_id). Your team id isteam_id.
These portal steps are as understood when this was written. Confirm them in Apple's current documentation: Apple may also require you to verify ownership of the domain, and may ask for other steps not listed here.
The CA checks Apple's ID token itself: RS256 only, against Apple's
published keys (refetched at most once a minute when a kid is unknown),
and the issuer, audience, expiry and the login's nonce.
Setting up GitHub
- In GitHub, Settings, Developer settings, OAuth Apps, New OAuth App (an organization's own settings for an organization-owned app).
- Authorization callback URL: GitHub OAuth Apps take one callback URL and
accept subpaths under it. Set
<public_url>to share one OAuth App across enrollment (<public_url>/v1/login/callback/<id>), the account page (<public_url>/account/callback/<id>), and the OIDC broker (<public_url>/oauth/upstream/callback/<id>), or register the exact callback path on dedicated OAuth Apps.laissez enrolland the mobile apps route through the CA callback, so no loopback or custom-scheme redirect is needed at GitHub. - Copy the client id into
client_idand save a client secret inclient_secret_file. - Choose
principal_claim. Useidunless you manage access by organization (org, which requires a non-emptyorganizationslist and matching keys in[login_provider.principals]). The CA asks GitHub forread:user user:email, and alsoread:orgwhenorganizationsis set. An organization can restrict which OAuth apps see its membership; approve the app there, or its members' logins grant nothing.
These portal steps are as understood when this was written. Confirm them in GitHub's current documentation, in particular the menu path, callback subpath behavior and organization restrictions.
Commits receipted under an earlier display rule
The signer and the CA share one set of display rules. Since 2026-11 they
refuse commits holding code points that draw nothing (format characters,
variation selectors, private use and the like, except in a message a joiner
or non-joiner between two visible non-ASCII characters and an emoji's
presentation selector), blank
characters other than a space in a name, and an author or committer with
more than one email or a shape git fsck --strict rejects (for example no
space before the <, or a zero-padded time). A commit that an earlier signer showed and receipted,
but that holds one of these, fails the commit check with:
commit has characters the current display rules refuse; it was receipted under an earlier rule, so rewrite it without them and sign again
A committer line of such a shape fails earlier, with committer is not the person who signed, because the CA names no committer from it. In a repository with
require_receipt = false, an author line of such a shape fails with author line is not one the signer shows (git fsck refuses it, or it has two emails). This is not a
tampering signal and raises no integrity alert. The receipt
matches what that signer showed; the fix is to rewrite the commit (for
example remove the character from user.name or the message) and sign it
again. A receipt that shows something else still fails with receipt does not match what was shown. POST /v1/se-key/verify-signature keeps its
purpose_mismatch answer for such objects, and laissez verify-commit refuses
such tags. Deploy the CA and the signer together, or the signer first.
Text that the signer now sends to its warning window, which today's keys
cannot sign, includes: an emoji with a presentation selector (U+FE0F) or a
non-breaking space in user.name; in a message, text-presentation selectors
(U+FE0E), Mongolian variation selectors, subdivision flags built from tag
characters, and private-use glyphs. Tell users to remove them and commit
again.
The freshness rule
A person with one login is judged on it alone, and it never lapses. That is how a CA works with a single provider.
A person with several logins keeps only the principals that logins
verified within login_freshness (default 30d) grant. A login is
verified each time its person signs in with it: through laissez enroll, or on
the account page. The OIDC broker also advances verified_at when a
sign-in's verified email and authorization claims (principal_key, orgs,
hd) still match the stored login. A login that has gone past the window grants nothing
until its person signs in with it again, so a forgotten login at a
provider you no longer trust the person's account at stops granting
access without anyone removing it.
When a request is refused for this, the CA answers 403 login_lapsed,
and the message names the login to sign in with again and the account page
URL (<public_url>/account), for example sign in again with github (alice@example.com) at https://ssh-ca.example.com/account. laissez shows that
message with a link to the page; ssh through laissez-ssh-agent fails to get
a certificate until the person does. It is not a revocation: nothing is
recorded against the person.
The account page
<public_url>/account is a small page on the CA, served by serve. A
person signs in there with a login already linked to them, and can:
- see their email and linked logins, and which have lapsed;
- link another login: they pick a provider and sign in at it;
- unlink a login;
- sign out.
Rules:
- Linking needs two sign-ins: one with a login that is already theirs
(that opens the session) and one with the login being added, in the same
browser. The page sets a short-lived
__Host-dpa_flowcookie when it sends the browser to a provider and refuses a callback that does not carry it (and onGETlink callbacks also requires the matching__Host-dpa_sessioncookie), so a sign-in started by someone else cannot be finished in another browser. - A login that belongs to another person is never linked. The page never
creates a person; only
laissez enrolldoes. - A person's last login cannot be unlinked.
- An unlink may not leave a person with only lapsed logins. They sign in with one of them again first. This keeps a stale login from outliving the rest.
- An unlink that leaves one login needs that login verified at its provider since the session opened: in practice, sign in with it on the account page, then unlink the other. A lone login never lapses, so one its provider has disabled (say a work account after the person left) must not be left granting on the strength of an earlier sign-in.
- A revoked person can neither link nor unlink. A revoked identity a new login carries stays revoked.
- Where the provider's
principal_claimisemail, the provider must vouch for the email before the login can be linked. - A sign-in on the page counts as a fresh verification of that login.
- A session lasts 15 minutes and is held in memory, so a restart signs everyone out. Every form carries a CSRF token.
Each link and unlink is a signed event, login_linked or login_unlinked,
with the person, provider, subject and actor self. See the
event stream.
Register <public_url>/account/callback/<id> at every provider people will
use there.
Inviting people
Send new people a join link: <public_url>/join, or
<public_url>/join?provider=<id> to pre-select one sign-in provider (an id
from GET /v1/providers). The console's Connect page lists one plain link
and one per configured provider, ready to copy. GET /v1/admin/services
serves the same list as join_links for the phone admin screens; the
current apps do not show it yet. The Connect page reads the providers the
console was started with, so after a reload that adds a provider, restart
the console to see its link there (/join itself uses the reloaded config).
The page shows the organization name and the server address. The name is
[grant_request] org, the one the app's consent screen shows, not
[organization] name; set [grant_request] org or the page names the
public_url. The page offers:
- Open in Passport for iPhone and Android
(
io.iqlusion.laissez:/setup?ca=...&provider=...). It needs Passport v0.1.0-rc.10 or later; older phone builds refuse the link. The apps accept only an httpspublic_urlwith no path, so the page leaves the button out for any otherpublic_url; - Open in Laissez for Mac and Windows (the
laissez://setuplink, withorgandprovider). The desktop app usesproviderwhen the server lists it, and otherwise lets people choose; builds before v0.1.0-rc.11 ignore it; - a download link for the apps (
[join] install_url); - the terminal fallback,
laissez enroll <public_url> --provider <id>.
A join link grants nothing. It has no token and no expiry and the CA keeps
no record of it, so it can be posted where new people will find it. It only
fills in setup: the app asks before it adds the server, and access still
depends on the organization's sign-in rules and [principals]. Every
address on the page is the configured public_url, never the host a
request arrived on, and an unknown or repeated provider gets a plain 404.
The page has no script and is served no-store and no-referrer.
The page needs no sign-in, so it never shows the environments' hosts
patterns: its desktop link leaves hosts out. The desktop app's first-time
setup gets them from the server at registration, but its separate SSH setup
step then asks the person to enter them. The console's Connect page, which
needs an admin sign-in, still offers the desktop link with hosts.
[join]
# Where the page sends people to download the apps. https only.
# Defaults to the latest GitHub release.
install_url = "https://github.com/iqlusioninc/laissez/releases/latest"
sshd setup
Do this on every server that should accept laissez certificates.
Trust the CA
Copy ssh_ca_ed25519.pub (or the line laissez-ca init printed) to the
server, then in sshd_config:
TrustedUserCAKeys /etc/ssh/laissez_ca.pub
The file may hold several CA lines, one per line.
Say which principals may log in as which user
Every certificate carries exactly one principal: the one the device asked for, if the person has it and an environment governs it.
Without AuthorizedPrincipalsFile, sshd accepts a certificate only if one
of its principals equals the target user name. So a certificate for
principal alice logs in as user alice.
To map principals to accounts yourself, use AuthorizedPrincipalsFile:
AuthorizedPrincipalsFile /etc/ssh/auth_principals/%u
# Let principals "alice" and "deploy" log in as user "deploy".
printf 'alice\ndeploy\n' | sudo tee /etc/ssh/auth_principals/deploy
Two things we verified in the OpenSSH spike:
- sshd reads
AuthorizedPrincipalsFileas the target user. The file and every directory above it must be readable by that user. If they are not, the log only says "Certificate does not contain an authorized principal". The real cause shows withLogLevel VERBOSE. - To accept certificates only, and no plain keys, also set
AuthorizedKeysFile none.
Reload sshd after changing its config.
To have sshd ask the CA again at every login, not only when the
certificate was issued, see Login checks and canaries on a
server. Note that those checks require the account to be
one of the certificate's principals, so they do not follow an
AuthorizedPrincipalsFile mapping.
What a certificate looks like to sshd
| Field | Value |
|---|---|
| Key | the device's ecdsa-sha2-nistp256 key |
| Type | user |
| Key ID | lz:<device_id>:<email> (shows in sshd's log) |
| Serial | from the CA's database; matches laissez-ca certs list |
| Principals | the one principal asked for |
| Valid | from 30 seconds before issue until cert_ttl after |
| Extensions | permit-pty, permit-port-forwarding |
Agent forwarding, X11 forwarding and ~/.ssh/rc are not permitted. There
are no critical options (no force-command, no source-address).
Admin commands
Every command reads the config (--config, default
/etc/laissez-ca/laissez-ca.toml) to find the database. They are safe to run
while serve is running. They fail if the database does not exist yet, so
start serve once first. Add --json to the list commands for JSON output.
laissez-ca devices list [--json]
laissez-ca devices revoke <device_id>
laissez-ca devices reinstate <device_id> --reason <text> [--confirm-canary-trip]
laissez-ca devices allow-key-replace <device_id> --se-key <key_id> --reason <text> [--allow-several-keys]
laissez-ca people list [--json]
laissez-ca people revoke <'#id'|provider:subject|email>
laissez-ca people reinstate <'#id'|provider:subject|email> --reason <text>
laissez-ca people add-email <person-email> <commit-email>
laissez-ca people remove-email <commit-email>
laissez-ca people emails <person-email>
laissez-ca keys list [--json]
laissez-ca keys revoke <key_id>
laissez-ca keys reinstate <key_id> --reason <text>
laissez-ca revocations lift <principal_key|email|login> <value> --reason <text>
laissez-ca providers list [--json]
laissez-ca providers unbind <provider_id> --reason <text> [--force]
laissez-ca certs list [--since 24h] [--json]
devices listshows each device's id, owner email, key kind, registration time, revocation time, grant expiry and last certificate.devices revoke <device_id>stops new challenges and certificates for that device. Revoking twice changes nothing.people listshows each person's id (#12), email, subject, principal key (theprincipal_claimvalue at their latest sign-in) and device count;--jsongives the id asperson_id.people revoke <person>revokes a person and all their devices. Name them by id ('#12', quoted for the shell), by a login (github:583231,oidc:<sub>), or by email, which revokes every person stored under it. Emails are not unique (a recreated SSO account, or GitHub organization-mode people, who have none), so an empty email is refused: use the id or a login. It also records their identities: their email and principal key, each of their logins (provider:subject), each login's principal key qualified by its provider (provider:key; a[oidc]login's also unqualified, as before), and every verified email of their logins, including each verified email of a GitHub account, not only its primary. A new SSO account with any of them (say a recreated directory account with a new subject and the same employee id), or a login of theirs linked to someone new, is refused too.people add-email <person-email> <commit-email>adds a commit email (for example a GitHub noreply address) to a person, for the git commit check, which requires a commit's committer email to be one of the signing person's emails: their sign-in email or an added one, ignoring case. An email belongs to one person: it is refused if it is already anyone's commit email or another person's sign-in email. A sign-in email stored for more than one person (a recreated SSO account), or added for one person and later used to sign in by another, matches no one, and these commands refuse to name a person whose sign-in email is ambiguous.people remove-email <commit-email>removes an added commit email.people emails <person-email>lists a person's sign-in email and added commit emails. Each add and remove, refused or not, is recorded as anadmin_actionevent.keys listshows each enrolled token key: key id, owner email, source, normalized policy, enrollment and revocation times. It never shows the token's serial.keys revoke <key_id>stops new certificates for that token key (key ids can start with-, so pass it as is). Existing certificates expire normally. The revocation is logged as anadmin_actionevent withaction = "revoke_key".providers listlists every provider id bound in the database, its kind, bound issuer/team, bind time and how many logins currently belong to it.providers unbind <provider_id> --reason <text> [--force]removes a provider binding so the id can be bound to another provider on the next start. Refused if logins still exist for that provider unless--forceis passed. Recorded as an auditedadmin_actionevent.certs list --since <duration>lists certificates issued in that window (default24h): serial, issue and expiry times, device, email, principals.
The commands that undo a revocation are in Reinstating.
Reinstating
A revocation can be undone, with a reason, by an administrator running
the CA's own commands (or the console). Every reinstate command requires
--reason <text>; a blank reason is refused. The reason is recorded with
the action, which is an admin_action event, plus a typed event below.
laissez-ca people reinstate alice@example.com --reason "left, came back; HR ticket 123"
laissez-ca devices reinstate <device_id> --reason "laptop recovered"
laissez-ca devices reinstate <device_id> --reason "false alarm, checked" --confirm-canary-trip
laissez-ca keys reinstate <key_id> --reason "token found"
laissez-ca revocations lift login github:583231 --reason "wrongly revoked"
people reinstate <person>reinstates a revoked person, named as forpeople revoke, and the devices and token keys revoked together with them. An email that more than one revoked person is stored under is refused, with each one's id and logins listed, so reinstating one person never brings back another: pick one by id. A device or token key that was revoked on its own stays revoked: reinstate it with its own command. It removes the revocation records that person's revocation stored (the identities listed underpeople revoke), so they can sign in and register again. Event:person_reinstated, one per person, withactor(clior the console admin),reason, andkept.A record shared with another revoked person is kept. If another person who is still revoked has the same email, principal key or login, removing it would un-revoke them too.
people reinstateleaves it, lists it in the output and in the event'skept, and says the person stays refused while it stands. To remove it anyway, runrevocations lift.devices reinstate <device_id>clears the device's own revocation. If its owner is revoked it stays refused untilpeople reinstate. A device revoked because a canary token on it was used (see Canary tokens) is refused unless you add--confirm-canary-trip: a trip means someone read a decoy key on that machine, so a reinstate there needs a person who has looked at it. Event:device_reinstated.devices allow-key-replace <device_id> --se-key <key_id>lets the device enroll the named new Secure Enclave signing key in place of the one it has enrolled, once, within one hour. Use it when a person lost their signing key (fingers changed in Touch ID, keychain wiped) andlaissez keys enroll-sereportskey_replace_not_authorized; it also prints the new key's id. Get that id from the person on a call or another channel you trust, not from a message that could come from their machine, and pass it as--se-key. The command prints the device, the signing key it has enrolled now and the key you are allowing; check both. It also lists the distinct signing keys the CA refused for that device in the last 24 hours (it keeps at most 32 per device, dropping the oldest). If none was refused, or exactly one was and it is the key you are allowing, the allowance is granted. Otherwise it is refused until you add--allow-several-keys: more than one key tried, or a different key from the one the person reads out, can mean someone else is enrolling a key for that Mac, so check with the person before you override. The override is recorded in the alert. The CA refuses a replacement without this because the device's co-signature alone does not show that the new key is on that Mac. An enrollment of any other key is refused and does not use the allowance. Every replacement records ase_key_replacementalert (detailse_key_replaced_by_adminorse_key_replaced_with_old_key) whoseindicator_idsname the old key (old_se_key:), the new key (new_se_key:) and, for an allowance, who granted it (allowed_by:), how they authenticated (allowed_via:cli,console_session,device_reqsig,bearer_tokenorforwarded_command) and, when they overrode the several-keys check,override:several_keys. An allowance works the same whichever way it was granted. Refused attempts recordse_key_replacement_refused, at most once an hour per device; one you did not expect means someone else tried to enroll a key for that device. After you allow it, the person runslaissez keys enroll-seagain (without--ca, so every CA is enrolled). The CA protocol also accepts a replacement signed by the old key with Touch ID, but the Signer does not produce that signature yet (it makes a new key only when the old one is gone), so today the allowance is the only way to recover. A device that once had a key enrolled needs the allowance even if its enrollment row is gone. While a device has a key enrolled, an attestation-service token for a different key does not count for certificates either. Event:admin_action(allow_se_key_replace, target<device_id> <key_id>).If the CA cannot store a refused key for this review (event
se_key_refusal_record_failed), it answers 503try_againwith aRetry-Afterhint instead of the refusal. The Signer tries that CA once more within the same setup, andlaissez keys enroll-seruns the Signer once more for it; each try asks for Touch ID, and after that the person is told to run the command again later.Without shell access. The same allowance, with the same rules, can be granted from the admin console's device page (New signing key; see the admin console), and by an organization admin through the admin API with the same authentication as
revoke_device:POST /v1/admin/commandswith{"command": "allow_se_key_replace", "device_id": ..., "se_key": ..., "reason": ..., "allow_several_keys": false}. Before sending it,GET /v1/admin/key-replace-preview?device_id=<id>&se_key=<key_id>(admin role) returns the device, its enrolled or previous key, the key you typed, the refused keys and whether the override is needed; it changes nothing. A client must show the refused ids only as text to compare against, never pre-fill or suggest a key id from them. A device cannot approve a new signing key for itself: a request signed by the target device is refused (403 forbidden), for the preview and the command; use another admin device, the console or the CLI. Like every admin mutation, a device-signed command goes through[admin] device_presence: underauditit runs and raises anadmin_without_person_proofalert, and underrequireit is refused (403 person_proof_required), so grant it from the console or the CLI. The preview is a read and is not affected. Hosted tenants grant it this way. The admin API refuses the override case with409 several_keys_refused. The iOS and Android admin apps have this review (New key / New signing key on a device in the Devices list): the admin types the key id, reviews the CA's answer, gives a reason and, when other keys were tried, turns on a separate override before confirming on the phone. The apps sign the grant with the phone's device key, so underrequireit is refused like any device-signed admin command. A review screen in the hosted console is a follow-up; until then, use the preview call and check its answer against what the person reads out. Customer-run CAs managed from a hosted console accept it as a forwarded command only if[forward].allowed_actionslistsallow_se_key_replace(andpreview_se_key_replacefor the review, which answers in the command's acknowledgement). Meanwhile that person's certificates that require the signing key are refused; certificates that need only the device key are unaffected.keys reinstate <key_id>clears a token key's revocation, direct or through its person. Event:key_reinstated.revocations lift <kind> <value>removes one revocation record.kindisprincipal_key,emailorlogin; a login is given asprovider:subject(github:583231; for[oidc]it isoidc:<sub>). A principal key is matched asprovider:key(work:emp-1001, the formkeptshows it in) first, and failing that as typed (unqualified legacy key). People already stored as revoked stay revoked; this only allows a new account to match the value. Event:revocation_lifted.
Every reinstate command prints what it did. When there is nothing to
undo, it changes nothing and records no event, and says so: people reinstate prints "devices reinstate "device
keys reinstate "token key revocations lift "there is no
Certificates issued before a revocation stay revoked. The KRL
(GET /v1/krl) lists the serials of certificates revoked with a person,
device or token key, and reinstating never takes one out. Those serials
stay in the KRL for good. Reinstating lets the device get new
certificates, with new serials. A host that cached the KRL keeps refusing
the reinstated key until it fetches the list again; the commands say so.
Reinstating never revives a certificate.
The console has reinstate pages for people and devices (see the admin console). Token keys and revocation records are reinstated or lifted from the command line only.
The admin console
laissez-ca console --config /etc/laissez-ca/laissez-console.toml runs the admin
web console, a separate process that reads the CA's config for the policy
and database path and never reads its signing keys. See
crates/lz-ca/laissez-console.example.toml. It is not on serve's port:
give it its own public_url.
Who may sign in is the admins list. An entry is either:
provider:subject, for examplegithub:583231orgoogle:110169484474386276334: that provider's stable user id. It matches only that provider; or- an email, the old form (anything with an
@and no colon). It matches a verified email only from provideroidc(the console's[oidc]section), never a GitHub or Apple login with the same email. When one matches, the console logs theoidc:<subject>entry to use instead. Replace the email with it.
The console's own sign-in providers are set in its file as optional [oidc]
and [[login_provider]] sections of the same shape as the CA's, without
principals (at least one provider is required; email entries in admins
require [oidc]). Use clients (apps) of their own, not the CA's, and
register <console public_url>/console/callback at each. With more than
one provider the sign-in page offers a choice. Sessions last session_ttl
(default 8h, at most 7d) and are lost on restart.
The console can reinstate a person or a device from their pages. The
pages ask for a reason, and a canary-tripped device needs the same
confirmation as --confirm-canary-trip. The change is recorded under the
signed-in admin as actor.
A device's New signing key page (organization admins only) allows it
to replace its signing key, as devices allow-key-replace does. It shows the device, its
enrolled (or previously enrolled) signing key and the keys refused for
it in the last 24 hours, and has an empty field for the new key id:
type the id the person reads from their own Signer or from laissez keys enroll-se. The console never fills it in. The next page shows the
device, both keys and the reason to confirm, and asks you to tick a box
when the override is needed. The allowance is recorded under the
signed-in admin, with allowed_via:console_session in the alert.
The people list revokes and reinstates one
person at a time, by id; the admin API's revoke_person and
reinstate_person commands take the same targets as the CLI in their
email field.
Admitting approvers
/console/approvers (admins only) lists phones whose device approval key
(D) is waiting: the person, the device, its platform, app, build and the
key's security level from its attestation, D's fingerprint, and when the
phone registered. The phone shows a short code. Ask the person to read it to
you over another channel, such as a call, and type it in: a code that does not
match is refused with "The code does not match this phone. Check it with the
person again." Refuse takes a reason. The code is never shown in the
console.
- A person's first approver needs an admin. After that, any of their admitted phones can admit another of their phones from the app, signing with its own D. A phone never admits itself.
- An admin cannot admit a phone of their own in the console: "You can't
approve a phone of your own here. Approve it from another phone of yours
that already approves sign-ins, or on the CA host with laissez-ca." Someone
holding an admin's unlocked phone could otherwise sign in as the admin and
admit it (threat model R26). An organization token cannot admit a phone at
all. On the CA host,
laissez-ca approvers admit <device-id> --code "123 456" [--reason ...]admits any phone, your own included; check the code with the phone in hand. - A waiting D expires after 7 days; the phone then offers to ask again with a new key.
- Setting up, admitting, refusing and expiry raise an
approver_admissionalert, and the key's record names who decided (approverand its device, oradminand the admin). - A phone whose registration attestation no longer counts, or whose D's
evidence the current
[phone_attest]no longer accepts, is not listed and cannot be admitted. The console uses the[phone_attest]it loaded at start: restart it after changing that section. - Passkeys added from a revoked phone are listed on its device card, with Remove for owners: a step-up passkey belongs to the person, so it keeps working from their other phones until it is removed. (Only one registered with the phone's approval key belongs to the person; a phone's legacy or admin passkey stops with the phone.)
Organizations and mobile administration
A CA maintains an organization record (organizations) and multi-admin
memberships (org_members) with three roles:
viewer— read-only access to overview, people, devices, keys, certs, denials, activity, services, and organization members.admin— allvieweraccess plus operational commands (revoke/reinstate devices, people, and keys; lift revocations; retire canaries; allow a signing key replacement).owner— alladminaccess plus managing organization members and roles (the last active owner cannot be removed or demoted).
Optional [organization] config in laissez-ca.toml bootstraps members
(source = "config") and hot-reloads without restarting laissez-ca serve.
Dynamic members (source = "db") can be managed from the CLI, web console
(/console/organization), or an owner's enrolled mobile device:
laissez-ca org show [--json]
laissez-ca org set-name "Acme Corp" [--reason <text>]
laissez-ca org members list [--include-revoked] [--json]
laissez-ca org members add <'#id'|provider:subject|email> --role <owner|admin|viewer> [--reason <text>]
laissez-ca org members set-role <member_id> --role <owner|admin|viewer> [--reason <text>]
laissez-ca org members remove <member_id> --reason <text>
Organization name
The organization's name is stored in the CA database, and that stored name is
what people see: the consent screen and new grants at enrollment
(grant_request.org in /v1/register/finish), organization in
/v1/mobile/config, the account page, GET /v1/admin/organization, and the
console's Organization and Connect pages.
The config only seeds it. When the CA first creates its organization record it
uses [organization] name, else [grant_request] org, else public_url. A
later change to [grant_request] org does not rename an existing record: if
you edit [grant_request] org after the record was created, consent screens
show the stored name, not the edited one, until you rename it.
Upgrading. Before stored names, consent screens and new grants used
[grant_request] org whatever the stored record said. On the first start after
upgrading, if nobody ever renamed the organization (no org_update_name admin
action), the CA sets the stored name to [grant_request] org again, so new
enrollments keep showing what they showed before; this is recorded as an
org_update_name action by actor config. A name an admin chose with
laissez-ca org set-name is kept, and the CA logs org_name_differs.
Rename it with any of these. Each is recorded in admin_actions, with the
previous name, and so are refusals:
laissez-ca org set-name "Acme Corp" [--reason <text>](anyone who can runlaissez-caagainst the database)- the console's Organization page (owners only; a reason and a confirmation are required)
POST /v1/admin/commandswith{"command": "update_organization", "name": "...", "reason": "..."}from an owner's enrolled device
Renaming to the current name changes nothing. A new name is trimmed and must be
1 to 100 characters with no control or invisible (format or bidirectional)
characters. A name that came from the config is not held to these rules, so an
existing config keeps loading; the CA logs org_name_unusual for it, and every
page escapes it.
Pinning. If [organization] name is set in laissez-ca.toml, the config owns
the name: it overwrites the stored name (trimmed) on every start and reload,
recording the change as actor config, and every rename above is refused with
a message saying the name is set in laissez-ca.toml. The console shows the name
with "Set in laissez-ca.toml" and no rename form. To rename such an organization,
change the line; to manage the name from the CLI, console or phone instead,
remove it. laissez-ca console reads the config when it starts, so restart it
after adding or removing the line.
Devices enrolled before a rename keep the old name. A grant is signed by the device and names the organization it was granted to; renaming does not rewrite it. Those devices show the old name until they enroll again, and a companion phone's approval request names the organization of that phone's own grant.
IoC queries. A device accepts a query whose ca is the CA's URL or the
organization its grant names. Once grants may name more than one organization,
new queries name the CA's URL instead, which every device accepts: leave ca
empty in query files (or use public_url without a trailing slash). This
happens, permanently, the first time any of these is true: an organization is
renamed (not to its current name); a pinned [organization] name changes or
differs from [grant_request] org; [grant_request] org changes; or, on the
first start after upgrading, a live grant names something other than
[grant_request] org. A reload alone can therefore trigger it. It is recorded
as a query_ca_by_url admin action. Queries keep naming the URL even if the
names match again later. Devices that show a query's ca (some confirmation
screens and their audit log) then show the URL.
Queries created before the switch keep the organization they name: devices
enrolled after the rename refuse them until they expire (up to a year), and log
each refusal. laissez-ca org set-name lists them after a rename, and the
console's Organization page lists them while they are active. Create them again
with an empty ca to reach every device.
Hosted tenants are pinned to their [grant_request] org: laissez-hosted
renders [organization] name_from_grant_request = true into each tenant's
config, so editing [grant_request] org in the tenant's policy renames the
organization (and switches its IoC queries to the CA URL, as above), and the
hosted admin API refuses update_organization. An existing tenant name outside
the rename rules (too long, or with control characters) still loads, as a
pinned legacy name shown escaped. A self-hosted CA can do the same with
name_from_grant_request = true instead of name; setting both is an error.
Personal device activity and mobile admin endpoints
Enrolled mobile apps (iOS and Android) authenticate to the CA with their
hardware-bound ES256 Laissez-Signature v2 header — no static bearer tokens are
stored on mobile devices:
- Personal account (
/v1/me/*): every enrolled user can readGET /v1/me, list all devices on their account (GET /v1/me/devices), inspect a unified cross-device activity feed (GET /v1/me/activity?since=7d&limit=100), and self-revoke any of their own devices (POST /v1/me/devices/{device_id}/revoke). - Organization administration (
/v1/admin/*): when the calling device's owner holds an active organization role (viewer,admin, orowner), the sameLaissez-SignatureauthenticatesGET /v1/admin/{overview,services,activity,people,devices,keys,actions,organization}and role-gated mutations (POST /v1/admin/commands,POST /v1/admin/organization/members{,/{id}/role,/{id}/remove}). Every destructive or admin action requires fresh local biometric/passcode confirmation on the mobile device and is recorded inadmin_actionswithactor_person_id,actor_device_id,actor_role,auth_method, andorg_id.
Hosted tenants
laissez-hosted runs a CA per organization. Tenants may be created with [oidc]
or with [[login_provider]] providers only (removing the last remaining
provider is refused). Sign-in providers are managed for a tenant by the hosted
operator, not by the tenant:
Hosted tenants use callback = "client" for their sign-in providers;
lz-hosted add-provider has no way to set "ca" yet. Phones still sign in
through the CA either way.
laissez-hosted tenants add-provider <tenant> --kind oidc --id google \
--issuer https://accounts.google.com --client-id <id> \
--secret-file <path|-> [--hosted-domain example.com]
laissez-hosted tenants add-provider <tenant> --kind github --id github \
--client-id <id> --secret-file <path|-> [--organization acme ...]
laissez-hosted tenants add-provider <tenant> --kind apple --id apple \
--services-id <id> --team-id <id> --key-id <id> --secret-file <path|->
laissez-hosted tenants remove-provider <tenant> <provider_id>
laissez-hosted tenants unbind-provider <tenant> <provider_id> --reason <text> [--force]
--secret-file is the client secret, or for Apple the .p8 key; - reads
stdin. --principal-claim sets what the provider's principals are keyed by
(default email, sub for Apple, id for GitHub). The secret is stored in the tenant's
directory as providers/<id>.secret with mode 0600, and
remove-provider deletes it. An id the tenant's CA has loaded stays bound
to that provider after remove-provider, so add-provider with the same
id and a different provider (another issuer, Apple team or kind) is
refused until unbind-provider explicitly removes the binding. The tenant's
CA reloads providers on its next request. The callback URLs to register are
the ones above, with the tenant's own public_url.
Who gets which SSH principals from each provider is the tenant's policy
(tenants set-policy), in a [login_provider_principals.<id>] table per
provider, the counterpart of [principals] for [oidc]:
[login_provider_principals.github]
"583231" = ["alice"]
Naming a provider the tenant does not have is refused. Policy-only changes
(including [login_provider_principals.<id>]) hot-reload into the running
tenant CA without dropping in-flight sessions.
Tenant admin endpoints and operator revoke/reinstate
Tenant admins authenticate with an org/tenant bearer token (Authorization: Bearer <token>) or a hardware-bound Laissez-Signature from an enrolled device
against their tenant host:
GET /v1/admin/overview,GET /v1/admin/people,GET /v1/admin/devices,GET /v1/admin/keys,GET /v1/admin/actions?since=24h&limit=100,GET /v1/admin/activity?since=24h&limit=100,GET /v1/admin/services,GET /v1/admin/organizationPOST /v1/admin/commands: executesrevoke_person,revoke_device,revoke_key,reinstate_person,reinstate_device,reinstate_key,lift_revocation, orretire_canary, audited under the admin's identity.
Multi-service hosted organizations
In laissez-hosted, a parent organization can own multiple tenant services so
multiple admins share role-based access (owner / admin / viewer) across
services:
laissez-hosted orgs create <org_id> --name "Acme Corp" --admin alice@example.com
laissez-hosted orgs members add <org_id> --email bob@example.com --role admin [--login github:42] [--issue-token]
laissez-hosted orgs members set-role <org_id> <member_id> --role owner
laissez-hosted orgs members remove <org_id> <member_id> --reason "left team"
laissez-hosted tenants create <tenant_id> --org <org_id> --service-label prod-ssh ...
laissez-hosted orgs services <org_id>
laissez-hosted orgs audit <org_id>
On the vendor host (<base_domain>), organization bearer tokens also access
GET /v1/orgs/{org_id}, GET /v1/orgs/{org_id}/services,
GET|POST /v1/orgs/{org_id}/members, POST /v1/orgs/{org_id}/members/{id}/{role,remove},
and GET /v1/orgs/{org_id}/audit.
The hosted operator can also run revoke, reinstate and revocation-lift commands directly against a tenant's CA database:
laissez-hosted tenants revoke <tenant> <person|device|key> <target>
laissez-hosted tenants reinstate <tenant> <person|device|key> <target> --reason <text> [--confirm-canary-trip]
laissez-hosted tenants lift-revocation <tenant> <principal_key|email|login> <value> --reason <text>
Customer-run CAs forwarding events to a hosted console ([forward]) accept
revoke_device and revoke_person by default, and may opt into
reinstate_device, reinstate_person, allow_se_key_replace and
preview_se_key_replace via [forward].allowed_actions.
Canary tokens
A canary is a decoy SSH key that opens nothing. The CA offers it to
enrolled laptops, and laissez canaries place puts it in ~/.ssh with a
matching ~/.ssh/config entry after the owner agrees. If anyone ever
offers that key to one of your servers, someone has read that laptop's
files: the CA records a canary_tripped security alert and, by default,
revokes the laptop. Design: docs/superpowers/specs/2026-11-15-canary-tokens-design.md.
1. Offer canaries in laissez-ca.toml:
[canaries]
on_trip = "revoke_device" # default; "record" only alerts
[[canaries.ssh_key]]
id = "deploy" # stable offer id
file = "id_ed25519_deploy" # written under ~/.ssh (never a .pub)
host_alias = "deploy-prod" # Host alias in ~/.ssh/config
hostname = "deploy.internal.example.com" # a real server running the hook
user = "deploy"
Point hostname at a server that has the hook below, so a thief who
tries the key is seen. Every field is a single token of letters, digits,
., _ or -.
2. Add the hook to your servers. On each server already set up for
login checks (laissez-login init, registered with laissez-ca hosts add;
the full steps, file permissions and pitfalls are in
Login checks and canaries on a server),
add to sshd_config, before any Match block:
AuthorizedKeysCommand /usr/libexec/laissez-login-check --canary-key %u %t %f
AuthorizedKeysCommandUser laissez-login
sshd runs the command for public keys it is offered. The command never prints a key, so it never lets anyone in. It reports the key's fingerprint to the CA in the background, signed with the host key, and returns at once, so logins do not wait on the CA. The CA keeps nothing about keys that are not canaries. A server without the hook simply rejects the canary without reporting it.
3. Laptops place them. Owners run laissez canaries to see what is
offered, laissez canaries place to review and place each one, and
laissez canaries remove to take them off again (the CA is told).
Watching them:
laissez-ca canaries list [--json] # placed canaries, live and retired
laissez-ca canaries trips [<id>] [--json] # every trip: host, login tried, time
laissez-ca canaries retire <id> # it never trips again
laissez-ca alerts list # trips show as "Canary token used"
The admin console has the same view on its Canaries tab: each canary's
status (watching, tripped, retired), the device and owner, every trip with
the server and login name tried, and a Retire button. Retiring from the
console is logged under the admin who did it. The JSON forms are
GET /admin/v1/canaries and GET /admin/v1/canary_trips.
laissez enroll offers the CA's canaries right after a device enrolls, with a
separate yes for each one. laissez enroll --yes never places a canary; it only
says that laissez canaries place is available.
Only a report signed by a registered host counts as a trip, so nobody
outside can fake one to get a laptop revoked. Canary keys and ids never
appear in the public KRL, log or ca.pub. The signed event is an
integrity_alert with kind: canary_tripped, the canary id in
indicator_ids and no key material; a revocation is a device_revoked
with actor canary_tripped.
Revocation timing
Revocation takes effect at the device's next request. The server reads the revocation state on every challenge and again when it issues a certificate.
It does not recall certificates already issued. OpenSSH does not ask
the CA whether a certificate is still good, so a certificate stays valid
until it expires. That is at most cert_ttl after it was issued, and the
reason the default is 10 minutes. laissez-ssh-agent keeps a certificate in
memory and reuses it while it has more than 60 seconds left.
The same timing applies when a device stops passing posture, or when the
user revokes the CA's grant with laissez grants revoke: the next certificate is
refused; the current one runs out.
Two more things outlive a revocation:
- Open sessions. sshd checks the certificate only at login. A session that is already open stays open after the certificate expires.
- Shared connections. With
ControlMaster, new sessions reuse an open connection without authenticating again.
If you need to cut someone off sooner, end their sessions on the servers
and use OpenSSH's own revocation list (RevokedKeys in sshd_config,
built with ssh-keygen -k). You can revoke by certificate serial (from
laissez-ca certs list) or by the device's public key, which is the
ssh_pubkey column of the devices table in the database. This is plain
OpenSSH; laissez-ca does not build the list for you.
Logs
laissez-ca writes one line per event to stderr, as key=value pairs:
laissez-ca: event=issued serial=7 device=Xy.. key_id=lz:Xy..:alice@example.com principals=alice valid_before=1800000600 results=disk_encrypted/true/agent-reported,...
laissez-ca: event=denied error=denied reason="..." failed=disk_encrypted
laissez-ca: event=device_revoked device=Xy.. email=alice@example.com
Events include issued, denied, declined_unauthenticated,
challenge_refused, device_revoked, person_revoked,
device_reinstated, person_reinstated, key_reinstated,
revocation_lifted and error. Signed events also include login_linked
and login_unlinked; see the event stream. Logs
show predicate outcomes only. The CA never receives raw device facts.
A declined_unauthenticated line is an unsigned "no" from whoever posted
it. It changes nothing on the CA and does not use up the challenge.
Backups
Back up three things:
| What | Path (from the config) | If you lose it |
|---|---|---|
| SSH CA key | ssh_ca_key |
Generate a new one and replace TrustedUserCAKeys on every server. |
| Audience key | audience_key |
Every grant names the old key. Every person must run laissez enroll again. |
| Database | database |
All registrations, grants and revocations are gone. Everyone must enroll again. |
Also keep the config file and the OAuth client secret.
The key files are secrets. Store backups encrypted, with the same care as the live files.
The database runs in WAL mode, so a plain copy of the main file can miss recent writes. Use SQLite's online backup while the CA runs:
sqlite3 /var/lib/laissez-ca/ca.sqlite ".backup '/backup/ca-$(date +%F).sqlite'"
Or stop serve and copy the file together with any -wal and -shm files
beside it.
Restoring an old database undoes later revocations, and later
reinstatements. A device or person revoked after the backup was taken is
live again, and one reinstated after it is revoked again. Logins people
linked or unlinked after the backup are back as they were then. After a
restore, run the revocations and reinstatements again. Check
laissez-ca devices list, laissez-ca people list and laissez-ca keys list
against your records and the event stream.
Running it
- Run
laissez-ca serveunder a process supervisor, as an unprivileged user that can read the keys, the secret and the config, and write the database directory. - Keep
listenon127.0.0.1with the TLS terminator on the same host, or firewall it so only the terminator can reach it. - Registration start is unauthenticated. The CA caps registration sessions in progress at 10,000 and evicts the oldest unfinished one when full. Put per-client rate limits in the reverse proxy; the CA cannot see client addresses behind it.
- The account page's sign-in start (
/account/signin/<id>) is unauthenticated too. It holds at most 10,000 sign-ins in progress and, like registration, evicts the one expiring soonest when full, so a flood cannot lock people out, but it can push out a real sign-in. Rate limit the CA's public routes (/v1/register/*,/v1/login/*,/account/*and the broker's/oauth/*) per client at the reverse proxy. - Config changes need a restart of
serve.