fleetlayer-signin gives people one sign-in, with a passkey, for every web service your fleet runs: the Claude
sign-in hub, pages, and anything else that can sign people in with OpenID Connect (most self-hosted apps can). Who
may use which service comes from the same access policy as your agents, so adding someone, or taking their access
away, happens in one place.
Everything a company needs is built on the same service: single sign-on, teams, separate organisations, audit. How it fits together, and why, is in Sign-in and SSO.
Status: experimental. Passkeys, invites, signing in to services, the admin pages, and signing in with Google Workspace or another OpenID Connect provider work. Signing out of every service at once, and Workspace groups as teams, come next.
Set it up
Section titled “Set it up”-
Make its token on the control plane, and put it where the sign-in service can read it, readable by that user only:
fleetlayer-control signin token > ~/.config/fleetlayer/signin-tokenchmod 600 ~/.config/fleetlayer/signin-tokenIt may look up who belongs where, use invites, ask access checks and record sign-ins, and nothing else.
fleetlayer-control signin revoke signinstops it at once. -
Add the plugin to the node on an always-on machine, behind your HTTPS proxy:
plugins:- name: signincommand: fleetlayer-signinconfig:dir: ~/.local/state/fleetlayer/signinissuer: https://signin.example.comcontrol_plane: https://control.example.comtoken_file: ~/.config/fleetlayer/signin-tokenlisten: 127.0.0.1:7680clients:- name: hubredirect_uris: [https://hub.example.com/auth/callback]secret_file: ~/.config/fleetlayer/signin-clients/hubheartbeat:url: https://status.example.com/api/v1/endpoints/signin/externaltoken_file: ~/.config/fleetlayer/signin-heartbeat-token -
Invite yourself:
fleetlayer-control invite add --handle you --role adminprints a code. Openhttps://signin.example.com/invite?code=<code>, choose your name and make a passkey on your device. -
Let people in to each service. Admins can sign in to every service from the start. Anyone else needs a rule in your policy for the services they use:
allow:- who: "person:*"can: [sign_in]to: [service:pages]
Managing people
Section titled “Managing people”Admins open https://signin.example.com/admin: the people, with their role and a button to remove them, and Invite
someone, which gives a link to send (it works once, for a week). Teams, and the services that sign in here, are
under Advanced.
- Who can manage: the admins (
role: admin), and anyone the policy givesadminonservice:signin. - Every change is made by the control plane, which checks again that it’s that person’s to make, and is recorded in the audit log as them.
- Removing someone, changing a role or taking someone off a team asks for the passkey again when it was last used more than ten minutes ago, so a browser left signed in can’t do it.
- The last admin can’t be removed or made a member: make someone else an admin first.
- An admin can make 20 invites an hour.
Signing in with Google Workspace, or another provider
Section titled “Signing in with Google Workspace, or another provider”A company’s people can sign in with their work account instead of a passkey:
upstreams: - name: acme-google kind: google # Google Workspace domain: acme.example # only accounts in this Workspace, with a verified email there tenant: acme # the place it signs people in for client_id: "…apps.googleusercontent.com" client_secret_file: ~/.config/fleetlayer/signin-upstreams/acme-google join: {role: member} # optional: anyone from the domain joins as a member on first sign-in - name: okta kind: oidc # any OpenID Connect provider issuer: https://example.okta.com tenant: acme client_id: "…" client_secret_file: ~/.config/fleetlayer/signin-upstreams/okta domain: acme.example # optional for oidc: only verified emails at this domainjoin is refused on an upstream with no domain, unless you write join: {role: member, anyone_it_vouches_for: true}: on a public provider that would let in anyone on the internet.
- The provider’s side: an OAuth client for a web application, with the return address
https://signin.example.com/upstream/<name>/callback. For Google: Google Cloud console, APIs & Services, Credentials, Create OAuth client ID, Web application; an Internal consent screen keeps it to the Workspace. - The sign-in page offers Continue with Google, and the invite page Join with Google.
- Linking: the first time, by an invite opened with “Join with Google” (or by
join, for someone from the domain). After that, by the account’s issuer and subject. Never by email, which can change hands. - One place only: signing in with Acme’s Google gives tokens for Acme. Someone who’s also in another place signs in with their passkey for that one.
Settings
Section titled “Settings”| Setting | What it is |
|---|---|
dir |
All its state: people.json (passkeys), keys/ (the token-signing key), sessions.json. Made readable by this user only. |
issuer |
The address people and services use. https, except on this machine (http://signin.localhost:7680). |
passkey_domain |
What passkeys are made for. Leave it out: it’s the issuer’s own domain (example.com for signin.home.example.com), so sign-in can move anywhere under it. |
control_plane, token_file |
The control plane’s address and the token from step 1. On one machine, use http://127.0.0.1:<port>: a server often can’t resolve *.localhost names the way a browser does. |
listen |
Where it listens, behind your proxy. |
clients |
Each service that signs people in: name (as in the policy, service:<name>), its exact redirect_uris, a secret_file for a service that keeps a secret (leave it out for one that can’t, such as an app in a browser), and post_logout_redirect_uris. |
upstreams |
Providers people may sign in with (above): name, kind (google or oidc), issuer (oidc), domain (required for google), label, tenant, client_id, client_secret_file, join. |
heartbeat |
Pushed every five minutes; it fails when the folder can’t be written or the control plane doesn’t answer. |
For a service
Section titled “For a service”It’s a standard OpenID Connect provider. Point the service at https://signin.example.com/.well-known/openid-configuration
with its client ID (the name) and secret.
-
The authorization code flow, with PKCE (
S256) required of every service, including ones with a secret. -
Before a service gets a code, the person’s access to it is checked (
sign_inonservice:<name>). Someone without it sees “You don’t have access” and the reason, and the service gets nothing. -
The ID token (RS256, ten minutes) says who:
sub(the person’s ID, never reused),name,preferred_username,fleetlayer.dev/tenant,fleetlayer.dev/principal,fleetlayer.dev/role,fleetlayer.dev/teams, andgroupsfor services that map a claim to their own groups. -
A worked example, pages (
docs/plugins/pages.md): the client in the sign-in settings is- name: pagesredirect_uris: [https://pages.example.com/_/auth/callback]post_logout_redirect_uris: [https://pages.example.com/_/signed-out]secret_file: ~/.config/fleetlayer/signin-clients/pages # pages reads the same secret (its signin.secret_file)and the pages plugin gets the
access.checkgrant, so it can ask which spaces each person may read. -
The token never says what someone may do. For anything finer, a Fleetlayer plugin asks its node (
_fleetlayer.dev/access/check), and any other service asksPOST /api/checkwith its client ID and secret, about its ownservice:<name>only.
Keep it running
Section titled “Keep it running”- Monitoring:
GET /healthzis 200 while the folder can be written and the control plane answers, and the heartbeat says the same every five minutes. - Back it up: losing the folder means everyone makes new passkeys and every service gets a new secret. Back up
people.jsonandkeys/. Sessions can be lost: people sign in again. - Move it: stop it, copy the folder and its settings, start it on the other machine and point the address there. The key and the passkeys move with the folder, so tokens services hold stay valid and passkeys keep working.
- On this machine only (
localhost, or a machine’s name with no domain of yours), the invite page warns that passkeys made there stop working if sign-in moves. Use a domain you own to avoid that.