Feature Specification: Component authelia
Created: 2026-10-07
Status: Implemented
Input: Reconstructed from the code at 093e68b6f (core/components/shared/authelia/default.nix, core/components/operator/operator-facing-options.csv, core/setups/hosts-common.nix, core/setups/groups/hosting-provider.nix, core/setups/groups/operator.nix, core/components/hosting-provider/default.nix, core/resources/oidc/), pull requests #1383, #1822, #1835, #1852 and #1874.
User Scenarios & Testing (mandatory)
User Story 1 - Give a group one single sign-on portal (Priority: P1)
Each group of a deployment needs one place where people sign in. The
authelia component marks a node as the SSO portal of its group. It
declares provides = [ "oidc" ], so this node answers the oidc requests
of the group (see oidc). The setup then puts
the daemon, the aggregated OIDC clients and the secret delivery on this node
(see setups and wiring).
Why this priority: without the portal, no application of the group can sign a user in, and no admin UI behind forward-auth is reachable.
Independent Test: nix-unit-components-authelia covers the settings
that the operator can set, and the postgresql storage of FR-007.
nix-unit-testers-oidc-routing and nix-unit-setups-supporting-requests
cover the routing of oidc requests to the provider node.
Acceptance Scenarios:
- Given a group with an
autheliamachine, When the setups evaluate, Then the"auth-server".oidcrequest of that node hasenable = true, and itsdomainisauth.<domain>. - Given an application that requests
oidc, When the setups evaluate, Then the setup adds its client to the aggregatedsupportingRequests.oidcof theauthelianode.
User Story 2 - Sign users in against the group directory (Priority: P2)
The group keeps its users in lldap. When the group has an lldap machine,
the setup gives Authelia an LDAP first-factor backend. The bind account is
the cross-node consumer authelia in the group authelia-users. OpenBao
rotates its password (see ldap).
Why this priority: the portal works without a directory, but then it has no users to sign in.
Independent Test: test-ldap-engine. It covers the rotation of the
authelia-bind password by the OpenBao LDAP engine.
Acceptance Scenarios:
- Given a group with
autheliaandlldapmachines, When the setups evaluate, Thenoidc.autheliaLdapBackendis set on theauthelianode. - Given a group with an
smtpmachine, When the setups evaluate, Thenfediversity.authelia.smtphas asubmission://<host>:<port>address, a sender and a password in KV.
User Story 3 - Show the portal in the catalog (Priority: P3)
A surface lists the components of a group with a name, an icon and a
description. The component gives the name Authelia, the cropped logo of
pkgs.authelia and uiSubdomain = "auth".
Why this priority: the catalog entry is informational.
Independent Test: applications-catalog.
Acceptance Scenarios:
- Given the catalog, When a surface renders it, Then the
autheliaentry showslogo-cropped.svgfrom the source ofpkgs.authelia.
Edge Cases
- A group without an
lldapmachine gets no LDAP backend. The portal then has no users from a directory. - A group without an
smtpmachine gets no notifier account infediversity.authelia.smtp. - On the
tf-incus-operator-hostsdeployment, the LDAP engine is the mountldapMountFor group nson the central OpenBao. On the central group (the one group whose roster providesvarsBackend) it is theldapmount. Elsewhere it is null. - On the central group (the one group whose roster provides
varsBackend), the setup also adds the OIDC clients of each group that setscentralLogin, such as thehypervisorgroup (aggregatedHypervisorOidc). The clients of such a group log in through the portal of the central group. - A group without a routed
postgresqlprovider keeps the state in a local SQLite database, which has no offsite backup.
Requirements (mandatory)
Functional Requirements
- FR-001: The component MUST declare
provides = [ "oidc" ], so the node answers theoidcrequests of its group. - FR-002: The component MUST declare
uiSubdomain = "auth". The setup MUST compose the portal name and the OIDC issuer name from this one label. - FR-003: The implementation MUST request
"spiffe".spiffe.enable = true, so the node logs in to OpenBao with its SVID and reads its rotated secrets. - FR-004: The implementation MUST publish TCP ports
80and443through"web".firewall.publicTCPPorts, because people on the internet reach the login UI. - FR-005: The component MUST NOT request an admin-UI forward-auth
oidcrequest for itself, because it is the portal. - FR-006: The setup MUST set the daemon configuration, the OIDC clients, the LDAP backend, the secret delivery and the SMTP notifier from the
oidcresource. - FR-007: The implementation MUST request
postgresqlwith database, consumer and userauthelia, and the password file ownerauthelia-main. Thesettingsmodule MUST rendercontracts.postgresql.results.authelia.defaultintostorage.postgres, and MUST render nothing when the result is absent, so that the daemon keeps its local SQLite database. - FR-008: The implementation MUST request
garagethroughmkBackupsGarageRequestwith the bucketauthelia-backups, and astreamingBackupof thepostgresdatabase to that bucket with the restic provider, as the userauthelia-main.
Key Entities
"auth-server".oidc: the request of the setup on the portal node. It carriesdomain,cookieDomain,deploymentDomain,instanceNameanddeployAdminUIs.oidc.autheliaLdapBackend: the bind account and the OpenBao LDAP engine for the first factor.fediversity.authelia.smtp: the notifier account:address,username,senderandpasswordKv.operator-facing-options.csv: rows withapplication = authelia. 32 options have the audiencefediversityand 14 have the audienceoperator.
Success Criteria (mandatory)
Measurable Outcomes
- SC-001:
nix-unit-components-authelia,nix-unit-testers-oidc-routingandnix-unit-setups-supporting-requestspass. - SC-002:
test-ldap-enginepasses. - SC-003:
applications-catalogpasses with theautheliaicon.
Assumptions
- The
hosting-providerandoperatorgroups both declare anautheliamachine. Each group runs its own portal. core/components/hosting-provider/default.niximports this component for both groups.- The OIDC provider implementation is in
core/resources/oidc/, not in this component.
Known Deviations
None.