Single sign-on with Authelia and LLDAP
How one office password opens every app on the box, the four ways an app checks who you are, which group rules apply, and where sign-in stops today.
Every person on the box has one password, the office password, and it opens every app. Two pieces make that work: LLDAP keeps the people, groups and passwords, and Authelia is the one sign-in page, at auth.<apps domain>. No app keeps passwords of its own.
Four ways an app checks who you are
Each piece declares one, in its piece.toml:
- **OpenID Connect (
oidc)**: the app sends you to Authelia, Authelia signs you in and sends you back with a signed answer.thx applyregisters one client per such app with Authelia, with a secret generated on the box. The CRM, tasks, the wiki, git, the password vault and others work this way. - **Forward auth (
forward)**: Caddy asks Authelia about every request before the app sees it, then passes the app four headers:Remote-User,Remote-Groups,Remote-NameandRemote-Email. Caddy overwrites any copy of those headers a browser sends. Apps with no login of their own, such as Drive, the whiteboard and Home, are protected this way. - **Directory (
ldap)**: the app checks the username and password against LLDAP itself. Mail and calendars use it because phones and desktop clients send a password; they cannot open a web sign-in page. - **None (
none)**: internal services with no people of their own.
The apps page shows which way each app uses.
Groups decide what you reach
Signing in proves who you are; groups decide what you see. A forward-auth app can be limited to some groups: the status page and the web analytics are for admins only, and Authelia answers anyone else with "forbidden". Drive shows only the shared spaces of your own company and team groups. The calendar server gives access to a shared calendar by membership of the group named in its path. Home shows each person only the apps they can open.
One session for the whole apps domain
Authelia sets one session cookie for the whole apps domain, so after signing in once you move between apps without another prompt. A new person's first sign-in happens through their welcome link: the page sets their password and signs them in to Authelia in the same step, so "open your office" lands them inside.
Passwords
People change their own password in the Home app; it checks the current one against the directory first. The directory's own web page, at directory.<apps domain>, also lets them change it. Authelia's reset and change pages are turned off on the box, and there is no reset mail yet: someone who forgets their password asks an admin, who runs thx user passwd.
Where it stops today
- Sign-in is one factor, the password. Authelia's access rules are
one_factor; two-factor enrolment is not tested yet. - Mail, calendar and file clients send the office password directly, so even a future second factor would cover only the browser. There are no per-device app passwords.
- The password vault keeps its own master password on purpose. Single sign-on answers who you are; the master password unlocks the vault, which is encrypted on your device with a key derived from it.
- Changing the list of OIDC apps recreates the Authelia container, which means a few seconds without sign-in.