Authelia LLDAP implementation
Authelia Setup
Section titled “Authelia Setup”Authelia is a highly available authentication and authorization server for your applications. It is designed to be deployed behind your reverse proxy and acts as a central point of authentication for your apps and services. It can be used to protect your apps and services with two-factor authentication, single sign-on and more. The TrueCharts implementation of Authelia has been built to be more robust with CloudNativePG integration and highly available. Cannot find a guide on the whole setup yet though so this is a work in progress.
Authelia is available in the Enterprise train of TrueCharts to act as the authentication provider for your apps and services either through OAuth or forward authentication. LLDAP can be used to manage your Authelia users and groups. To enable this as an option follow the steps outlined below. References to the specific questions as they appear in the TrueNAS SCALE UI are included in the guide and highlighted along with the answers you should use.
This is adapted from a guide I wrote for the TrueCharts project. Not published yet as I haven’t been able to test the guide start to finish as I just did a rewrite of the TrueCharts implentation of LLDAP. I will update this guide once I have tested it.
Setup instructions
Section titled “Setup instructions”-
Tick the box for
LDAP backend configurationa further set of questions will then appear. -
The dropdown
Implementationshould be set ascustom -
URL should be set to internally link back to your LLDAP instance for the default configuration it should look something like the one below.
ldap://lldap-ldap.ix-lldap.svc.cluster.local:3890This will need to be adapted if you have named LLDAP differently or used a different port for LDAP. -
Next set the
Base DNthis is one of the configurable options you set when installing LLDAP which by default isdc=example,dc=comand should be adapted to your domain if set. -
The
Username Attributeshould be set touid. -
The
Additional Users DNshould be set toou=peopleas this is where all your users are stored. -
The users filter can be set to one of two options depending on whether you want to allow sign in with a username or both username and email. Both options are outlined below.
Username only
(&({username_attribute}={input})(objectClass=person))Username and email
(&(|({username_attribute}={input})({mail_attribute}={input}))(objectClass=person)) -
The next option that needs setting is
Additional Groups DNmust be set toou=groupsas this is where all your groups are stored. -
LLDAP only supports only one filter which should be set in
Groups Filterand set to;member={dn}) -
The
Group name Attributeshould be set tocn. -
The
Mail Attributeshould simply be set tomail. -
The
Display Name Attributeshould be set todisplayName. This is the attribute that Authelia will use to greet users when they log in. -
Admin useris the default admin user used when setting up LLDAP initially and is auto generated for you. The entry you input into this box should look something like the one below. Changedc=example,dc=comto match theBase DNyou set earlier. Though you can use another user but make sure they are in theLLDAP_PASSWORD_MANAGERgroup.Admin user
uid=admin,ou=people,dc=example,dc=com -
Enter the admin user password into the
Passwordfield. As stated earlier DO NOT use the default password.
References
Section titled “References”The origin material for this guide is available on the LLDAP Github. While further information on Authelia can be found on their Github and website.