Single Sign On
Homarr supports multiple authentication options, from internal userbase (credentials), to LDAP (with Active directory support), and OIDC.
Auth configuration common variables​
Environment Variable | Description | Default Value |
---|---|---|
AUTH_PROVIDERS | Select Which provider to use between credentials, ldap and oidc. Multiple providers can be enabled with by separating them with , , (ex. AUTH_PROVIDERS=credentials,oidc , it is highly recommended to just enable one provider). | credentials |
AUTH_LOGOUT_REDIRECT_URL | URL to redirect to after clicking logging out. | --- |
AUTH_SESSION_EXPIRY_TIME | Time for the session to time out. Can be set as pure number, which will automatically be used in seconds, or followed by s, m, h or d for seconds, minutes, hours or days. (ex: "30m") | "30d" |
- Credentials Provider
- LDAP provider
- OIDC provider
This is the default provider.
First user is created using the onboarding process and the rest can be created by this user (see user management)
This provider authenticates against an LDAP server.
Any user in LDAP server that signs in gets created in Homarr database.
Roles are fetched from LDAP groups. Groups with the same name of Homarr will be used to synchronize them.
Example Setup
Configuration​
Environment Variable | Description | Default value |
---|---|---|
AUTH_LDAP_URI | URI of your LDAP server | --- |
AUTH_LDAP_BASE | Base dn of your LDAP server | --- |
AUTH_LDAP_BIND_DN | User used for finding users and groups | --- |
AUTH_LDAP_BIND_PASSWORD | Password for bind user | --- |
AUTH_LDAP_USERNAME_ATTRIBUTE | Attribute used for username | uid |
AUTH_LDAP_USER_MAIL_ATTRIBUTE | Attribute used for mail field | |
AUTH_LDAP_GROUP_CLASS | Class used for querying groups | groupOfUniqueNames |
AUTH_LDAP_GROUP_MEMBER_ATTRIBUTE | Attribute used for querying group member | member |
AUTH_LDAP_GROUP_MEMBER_USER_ATTRIBUTE | User attribute used for comparing with group member | dn |
AUTH_LDAP_SEARCH_SCOPE | Serach scopes between base, one and sub | base |
AUTH_LDAP_USERNAME_FILTER_EXTRA_ARG | Extra arguments for user search filter (& based) | --- |
AUTH_LDAP_GROUP_FILTER_EXTRA_ARG | Extra arguments for user's groups search filter (& based) | --- |
This provider authenticates using OIDC protocol.
Users signed in using OIDC are created in Homarr.
Roles are fetched from group claims. This can also be changed to roles for example added to a azure app registration by using the AUTH_OIDC_GROUPS_ATTRIBUTE
.
Example Setup
Configuration​
Environment Variable | Description | Default value |
---|---|---|
AUTH_OIDC_ISSUER | Issuer URI of OIDC provider. This has generally to be without trailing slash except for Authentik | --- |
AUTH_OIDC_CLIENT_ID | ID of OIDC client (application) | --- |
AUTH_OIDC_CLIENT_SECRET | Secret of OIDC client (application) | --- |
AUTH_OIDC_CLIENT_NAME | Display name of provider (in login screen) | OIDC |
AUTH_OIDC_AUTO_LOGIN | Automatically redirect to OIDC login | false |
AUTH_OIDC_SCOPE_OVERWRITE | Overwrite default scopes (openid, profile, email) | openid email profile groups |
AUTH_OIDC_GROUPS_ATTRIBUTE | Attribute used for groups (roles) claim | groups |
AUTH_OIDC_NAME_ATTRIBUTE_OVERWRITE | Overwrite name attribute. By default it will use preferred_username if it does not contain a @ and otherwise name. | --- |
AUTH_OIDC_FORCE_USERINFO | Force userinfo endpoint to be used for user information. | false |
Permission System​
To give a user special permissions, first create a new group in homarr and assign the permission desired.
For example if the group on homarr is called homarr-admins
a new group on the oidc provider, for example authentik needs to be created with the same name, that would be homarr-admins
.
After assigning the group on the oidc provider to the user, and logging again into homarr, the user should automatically get placed in that group and inherit the permissions defined.