Authentication¶
IsardVDI supports multiple authentication providers. You can enable several providers at the same time.
These providers are configured in the web panel, not in isardvdi.cfg
Local, LDAP, SAML, and Google are configured from the web administration interface, under
Administration → Config → Authentication — the single
source of truth. The matching AUTHENTICATION_AUTHENTICATION_* keys in isardvdi.cfg are
deprecated: their values were imported into the database once, by the database migration
that introduced this move (SMTP → migration 175, LDAP → 180, SAML → 182, Google → 183, local and
per-provider enabled → 184/186). After that migration, editing these keys in isardvdi.cfg
has no effect — the database governs (the authentication service reads the provider config from
RethinkDB, not from the environment). The tables below are kept only as a reference to what each
setting means, to help you fill in the web panel.
OAuth2¶
Google¶
Google is the only OAuth2 provider currently available. Configure it from Administration → Config → Authentication. The isardvdi.cfg keys below are deprecated (imported once by migration 183; editing them afterwards has no effect) and are shown only as a reference for the panel fields:
| Parameter | Default value | Description |
|---|---|---|
AUTHENTICATION_AUTHENTICATION_GOOGLE_ENABLED |
false |
If set to true, this enables the Google authentication |
AUTHENTICATION_AUTHENTICATION_GOOGLE_CLIENT_ID |
The Google OAuth Client ID | |
AUTHENTICATION_AUTHENTICATION_GOOGLE_CLIENT_SECRET |
The Google OAuth Client Secret |
Create your Google OAuth credentials at https://console.developers.google.com/apis/credentials and set the authorized redirect URI to https://your-domain.com/authentication/callback.
GitHub provider removed
Earlier versions of this page documented a GitHub OAuth2 provider (BACKEND_AUTH_GITHUB_*). That provider no longer exists in IsardVDI and has been removed. The old BACKEND_HOST, BACKEND_AUTH_AUTOREGISTRATION, BACKEND_AUTH_GOOGLE_ID and BACKEND_AUTH_GOOGLE_SECRET keys are gone as well.
LDAP¶
LDAP authentication uses the same login form as local login. Configure it in Administration → Config → Authentication.
The isardvdi.cfg keys listed below are deprecated (migration 180): editing them has no effect after that migration. They are provided only as a reference for the panel fields.
The following table describes each configuration parameter:
| Parameter | Default value | Description |
|---|---|---|
AUTHENTICATION_AUTHENTICATION_LDAP_ENABLED |
false |
Set to true to enable LDAP authentication. |
AUTHENTICATION_AUTHENTICATION_LDAP_PROTOCOL |
ldap |
The LDAP protocol. Other possible values are ldaps. |
AUTHENTICATION_AUTHENTICATION_LDAP_HOST |
The LDAP server address. | |
AUTHENTICATION_AUTHENTICATION_LDAP_PORT |
389 | The port where the LDAP server is listening. |
AUTHENTICATION_AUTHENTICATION_LDAP_BIND_DN |
The DN that Isard uses to query the LDAP server. | |
AUTHENTICATION_AUTHENTICATION_LDAP_PASSWORD |
The password that Isard uses to query the LDAP server. | |
AUTHENTICATION_AUTHENTICATION_LDAP_BASE_SEARCH |
The DN shared by all users (e.g., ou=people,dc=example,dc=com). |
|
AUTHENTICATION_AUTHENTICATION_LDAP_FILTER |
(&(objectClass=person)(uid=%s)) |
The filter used to find each user. %s represents the username sent through the form. See LDAP search filters for more information. |
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_UID |
The LDAP entry field containing the user UID. | |
AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_UID |
.* |
The regex applied to the UID field. By default, it captures the entire field. |
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_USERNAME |
The LDAP entry field containing the user username. | |
AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_USERNAME |
.* |
The regex applied to the username field. By default, it captures the entire field. |
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_NAME |
The LDAP entry field containing the user name. | |
AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_NAME |
.* |
The regex applied to the name field. By default, it captures the entire field. |
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_EMAIL |
The LDAP entry field containing the user email. | |
AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_EMAIL |
.* |
The regex applied to the email field. By default, it captures the entire field. |
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_PHOTO |
The LDAP entry field containing the user photo. | |
AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_PHOTO |
.* |
The regex applied to the photo field. By default, it captures the entire field. |
Field and regex parameters: These parameters define the fields returned by the LDAP search. For example, in some installations, the email field is named mail. A regex is then applied to this field to filter the content if necessary. By default, the entire field is collected. The regex match attempts to extract the first group; if no group is defined, it extracts the entire match.
With these settings, LDAP authentication is functional. Additionally, LDAP authentication supports an extra feature: autoregistration. This allows users to be automatically registered in groups, eliminating the need for registration codes.
Autoregistration¶
If a group has a registration code and LDAP autoregistration is enabled, LDAP autoregistration takes precedence. Autoregistration is configured from the web administration interface. The historical mapping table below describes each parameter (keys imported once; no longer in isardvdi.cfg.example):
| Parameter | Default value | Description |
|---|---|---|
AUTHENTICATION_AUTHENTICATION_LDAP_AUTO_REGISTER |
false |
Set to true to enable LDAP autoregistration. |
AUTHENTICATION_AUTHENTICATION_LDAP_AUTO_REGISTER_GROUPS |
Only users belonging to one of these groups will be autoregistered (comma-separated). If empty, all users can register. | |
AUTHENTICATION_AUTHENTICATION_LDAP_GUESS_CATEGORY |
false |
Set to true to have Isard guess the category based on search results, instead of relying on the category ID provided by the form. This allows multiple categories to use the same form and login URL. |
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_CATEGORY |
The LDAP entry field containing the user category. | |
AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_CATEGORY |
.* |
The regex applied to the category field. By default, it captures the entire field. |
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_GROUP |
The LDAP entry field containing the user group. | |
AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_GROUP |
.* |
The regex applied to the group field. By default, it captures the entire field. |
AUTHENTICATION_AUTHENTICATION_LDAP_GROUP_DEFAULT |
If set, this is the default group assigned when autoregistering a user. It is equivalent to applying REGEX_GROUP to FIELD_GROUP. |
|
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_LIST_SEARCH_BASE |
The base search DN for listing all roles of a user (e.g., dc=example,dc=com). |
|
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_LIST_FILTER |
(&(objectClass=posixGroup)(memberUid=%s)) |
The filter used to search for all roles of a user. %s represents the username sent through the form. See LDAP search filters for more information. |
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_LIST_USE_USER_DN |
false |
Set to true to use the full DN instead of the username sent through the form when searching for user roles. |
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_LIST_FIELD |
The field containing the roles in the ROLE_LIST_FILTER search results. |
|
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_LIST_REGEX |
.* |
The regex applied to the ROLE_LIST_FIELD. By default, it captures the entire field. |
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_ADMIN_IDS |
A comma-separated list of role IDs that are part of the admin role. |
|
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_MANAGER_IDS |
A comma-separated list of role IDs that are part of the manager role. |
|
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_ADVANCED_IDS |
A comma-separated list of role IDs that are part of the advanced role. |
|
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_USER_IDS |
A comma-separated list of role IDs that are part of the user role. |
|
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_DEFAULT |
user |
The default role assigned if the user does not match any role mapping. Possible values are admin, manager, advanced, and user. |
AUTHENTICATION_AUTHENTICATION_LDAP_SAVE_EMAIL |
true |
Save the email provided by LDAP. Even if the email is not saved, it is used to validate the domain during authentication. |
Field and regex parameters: These parameters define the fields returned by the LDAP search. For example, in some installations, the email field is named mail. A regex is then applied to this field to filter the content if necessary. By default, the entire field is collected. The regex match attempts to extract the first group; if no group is defined, it extracts the entire match.
Example LDAP configurations¶
LDAP with autoregistration
## LDAP
AUTHENTICATION_AUTHENTICATION_LDAP_ENABLED=true
AUTHENTICATION_AUTHENTICATION_LDAP_PROTOCOL=ldap
AUTHENTICATION_AUTHENTICATION_LDAP_HOST=ldap.example.com
#AUTHENTICATION_AUTHENTICATION_LDAP_PORT=389
### Credentials used for querying the LDAP
AUTHENTICATION_AUTHENTICATION_LDAP_BIND_DN="uid=isard,ou=users,dc=example,dc=com"
AUTHENTICATION_AUTHENTICATION_LDAP_PASSWORD=password
### Base Search is the DN that all the users share, e.g. ou=people,dc=example,dc=com
AUTHENTICATION_AUTHENTICATION_LDAP_BASE_SEARCH=dc=example,dc=com
### Filter is the actual filter used to search users. The '%s' represents the user that is sent through the form
### More information: https://confluence.atlassian.com/kb/how-to-write-ldap-search-filters-792496933.html
AUTHENTICATION_AUTHENTICATION_LDAP_FILTER="(&(objectClass=person)(uid=%s))"
### These are the fields that the LDAP search responds. For example, in some installations, the field for the email is called 'mail'
### Then, a regex is applied to this field, in case we needed to filter inside a LDAP field. By default it collects the whole field
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_UID=uid
#AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_UID=.*
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_USERNAME=uid
#AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_USERNAME=.*
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_NAME=sn
#AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_NAME=.*
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_EMAIL=mail
#AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_EMAIL=.*
#AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_PHOTO=
#AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_PHOTO=.*
### Auto Register the existing ldap users into IsardVDI
AUTHENTICATION_AUTHENTICATION_LDAP_AUTO_REGISTER=true
AUTHENTICATION_AUTHENTICATION_LDAP_GUESS_CATEGORY=true
### These are the fields that the LDAP search responds. For example, in some installations, the field for the group is called 'group'
### Then, a regex is applied to this field, in case we needed to filter inside a LDAP field. By default it collects the whole field
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_CATEGORY=homeDirectory
AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_CATEGORY="/home/users.images/([^/]+)/[^/]+/[^/]+"
AUTHENTICATION_AUTHENTICATION_LDAP_FIELD_GROUP=homeDirectory
AUTHENTICATION_AUTHENTICATION_LDAP_REGEX_GROUP="/home/users.images/[^/]+/([^/]+)/[^/]+"
### The base search for listing all the roles of a user
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_LIST_SEARCH_BASE=dc=example,dc=com
### Filter is the actual filter used to search all the roles of a user. The '%s' represents the user that is sent through the form
### More information: https://confluence.atlassian.com/kb/how-to-write-ldap-search-filters-792496933.html
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_LIST_FILTER="(&(objectClass=posixGroup)(memberUid=%s))"
### The field that contains the roles in the AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_LIST_FILTER search
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_LIST_FIELD=cn
#AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_LIST_REGEX=.*
### All the users that are in at least one of the role IDs specified here, will be created in the admin role (comma separated)
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_ADMIN_IDS=isard-admins
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_MANAGER_IDS=isard-managers
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_ADVANCED_IDS=profes,ofi
#AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_USER_IDS=ldapusers
# This is the default role that users will have if they don't match in any of the previous roles.
# Values can be 'admin', 'manager', 'advanced', 'user'
AUTHENTICATION_AUTHENTICATION_LDAP_ROLE_DEFAULT=user
SAML¶
IsardVDI supports SAML 2.0 authentication through integration with any SAML Identity Provider (IdP). This allows users to log in using their organization's existing identity provider instead of managing separate credentials in IsardVDI.
Configure SAML from Administration → Config → Authentication. The AUTHENTICATION_AUTHENTICATION_SAML_* keys below are deprecated (migration 182). Editing them in isardvdi.cfg has no effect after the migration; they serve as a field reference only.
Basic Configuration¶
SAML authentication is configured from the web administration interface. The historical mapping table below describes each parameter (keys imported once; no longer in isardvdi.cfg.example):
| Parameter | Default value | Description |
|---|---|---|
AUTHENTICATION_AUTHENTICATION_SAML_ENABLED |
false |
Set to true to enable SAML authentication. |
AUTHENTICATION_AUTHENTICATION_SAML_METADATA_URL |
The URL to fetch the IdP metadata from (e.g., https://idp.example.com/metadata). |
|
AUTHENTICATION_AUTHENTICATION_SAML_METADATA_FILE |
/keys/idp-metadata.xml |
Optional: Local IdP metadata file. If this file exists, it is used instead of fetching from the URL. This allows the service to start without network access to the IdP. |
AUTHENTICATION_AUTHENTICATION_SAML_ENTITY_ID |
Optional: Custom Entity ID for the Service Provider. If not set, it defaults to the metadata URL (https://your-domain.com/authentication/saml/metadata). Set this if your IdP requires a specific Entity ID (e.g., my-app). |
|
AUTHENTICATION_AUTHENTICATION_SAML_SIGNATURE_METHOD |
Optional: Signature method for signing SAML AuthnRequests. If not set, requests are not signed. Set this if your IdP requires signed requests (AuthnRequestsSigned="true"). Valid values: http://www.w3.org/2001/04/xmldsig-more#rsa-sha256 (recommended), http://www.w3.org/2000/09/xmldsig#rsa-sha1, or http://www.w3.org/2001/04/xmldsig-more#rsa-sha512. |
|
AUTHENTICATION_AUTHENTICATION_SAML_KEY_FILE |
/keys/isardvdi.key |
The path to the Service Provider private key file. |
AUTHENTICATION_AUTHENTICATION_SAML_CERT_FILE |
/keys/isardvdi.cert |
The path to the Service Provider certificate file. |
AUTHENTICATION_AUTHENTICATION_SAML_MAX_ISSUE_DELAY |
90s |
The maximum time between the initial login request and the response. |
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_UID |
The SAML attribute name that contains the user UID. | |
AUTHENTICATION_AUTHENTICATION_SAML_REGEX_UID |
.* |
The regex filter applied to the UID field. By default, it captures the whole field. |
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_USERNAME |
The SAML attribute name that contains the username. | |
AUTHENTICATION_AUTHENTICATION_SAML_REGEX_USERNAME |
.* |
The regex filter applied to the username field. By default, it captures the whole field. |
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_NAME |
The SAML attribute name that contains the user's display name. | |
AUTHENTICATION_AUTHENTICATION_SAML_REGEX_NAME |
.* |
The regex filter applied to the name field. By default, it captures the whole field. |
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_EMAIL |
The SAML attribute name that contains the user's email. | |
AUTHENTICATION_AUTHENTICATION_SAML_REGEX_EMAIL |
.* |
The regex filter applied to the email field. By default, it captures the whole field. |
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_PHOTO |
The SAML attribute name that contains the user's photo URL. | |
AUTHENTICATION_AUTHENTICATION_SAML_REGEX_PHOTO |
.* |
The regex filter applied to the photo field. By default, it captures the whole field. |
AUTHENTICATION_AUTHENTICATION_SAML_SAVE_EMAIL |
true |
Set to true to save the email to the database. |
Field and Regex Configuration: These parameters define how IsardVDI extracts data from the SAML assertion. For example, the email attribute might be named mail in some installations. A regex is applied to the attribute value to extract specific parts. By default, the entire field is captured. The regex engine attempts to extract the first capture group; if no group exists, it extracts the whole match.
Certificate Setup¶
The Service Provider (IsardVDI) requires a certificate and private key for signing SAML requests. You can:
-
Generate a self-signed certificate:
-
Use a certificate from your organization's CA.
-
Let IsardVDI generate a self-signed certificate automatically (if files do not exist).
Local Metadata File¶
IsardVDI supports using a local IdP metadata file as a fallback. This is useful for: - Air-gapped deployments - Development or testing without network access - Faster startup (no network latency) - Resilience when the IdP is temporarily unavailable
To use a local metadata file:
# Download IdP metadata to local file
curl -o /opt/isard/authentication/keys/idp-metadata.xml https://idp.example.com/metadata
Behavior: IsardVDI first attempts to load metadata from the local file. If the file does not exist or fails to parse, it automatically falls back to fetching from the METADATA_URL.
Auto-registration¶
If a group has a registration code and SAML auto-registration is enabled, SAML auto-registration takes precedence. Auto-registration is configured from the web administration interface; the following table is for reference only:
| Parameter | Default value | Description |
|---|---|---|
AUTHENTICATION_AUTHENTICATION_SAML_AUTO_REGISTER |
false |
Set to true to enable SAML auto-registration. |
AUTHENTICATION_AUTHENTICATION_SAML_AUTO_REGISTER_ROLES |
[] |
Only users with these role values are auto-registered (comma-separated). Empty means all users can register. |
AUTHENTICATION_AUTHENTICATION_SAML_GUESS_CATEGORY |
false |
Set to true to attempt guessing the category based on SAML attributes, instead of relying on the category ID provided by the form. This enables multiple categories to use the same form and login URL. |
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_CATEGORY |
The SAML attribute name that contains the user's category. | |
AUTHENTICATION_AUTHENTICATION_SAML_REGEX_CATEGORY |
.* |
The regex filter applied to the category field. By default, it captures the whole field. |
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_GROUP |
The SAML attribute name that contains the user's group. | |
AUTHENTICATION_AUTHENTICATION_SAML_REGEX_GROUP |
.* |
The regex filter applied to the group field. By default, it captures the whole field. |
AUTHENTICATION_AUTHENTICATION_SAML_GROUP_DEFAULT |
default |
The default group assigned to the user if no group is detected. |
AUTHENTICATION_AUTHENTICATION_SAML_GUESS_ROLE |
false |
Set to true to attempt determining the user's role from SAML attributes. |
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_ROLE |
The SAML attribute name that contains role information. | |
AUTHENTICATION_AUTHENTICATION_SAML_REGEX_ROLE |
.* |
The regex filter to extract the role value from the attribute. Important: Must be wrapped in single quotes if using special characters. |
AUTHENTICATION_AUTHENTICATION_SAML_ROLE_ADMIN_IDS |
[] |
A comma-separated list of role values mapped to the admin role. |
AUTHENTICATION_AUTHENTICATION_SAML_ROLE_MANAGER_IDS |
[] |
A comma-separated list of role values mapped to the manager role. |
AUTHENTICATION_AUTHENTICATION_SAML_ROLE_ADVANCED_IDS |
[] |
A comma-separated list of role values mapped to the advanced role. |
AUTHENTICATION_AUTHENTICATION_SAML_ROLE_USER_IDS |
[] |
A comma-separated list of role values mapped to the user role. |
AUTHENTICATION_AUTHENTICATION_SAML_ROLE_DEFAULT |
user |
The default role assigned if the user does not match any role mapping. Possible values: admin, manager, advanced, user. |
Important: Category auto-registration matches the extracted category value against the category's uid field in the database (not the id or name fields). When creating a category in the webapp for SAML users, you must set the UID field to the value extracted by your REGEX_CATEGORY. For example, if your regex extracts "department-a", create a category with the UID set to "department-a".
Group Auto-Creation: Unlike categories, groups are automatically created when AUTO_REGISTER=true is enabled. When a SAML user logs in, IsardVDI extracts group values using REGEX_GROUP and automatically creates any missing groups with auto-generated names (e.g., "saml_provider-saml_student-group"). If no groups are extracted from SAML attributes, the user is assigned to the default group specified in GROUP_DEFAULT (default: "default"). Administrators do not need to manually create groups in the webapp; they are created automatically on first login.
Single Logout (SLO)¶
SAML Single Logout is supported. The SLO endpoint is automatically configured at:
Configure where users are redirected after logout:
| Parameter | Default value | Description |
|---|---|---|
AUTHENTICATION_AUTHENTICATION_SAML_LOGOUT_REDIRECT_URL |
URL to redirect users after logout. If empty, redirects to /. |
SAML Endpoints¶
When SAML is enabled, IsardVDI exposes the following endpoints:
| Endpoint | Path | Purpose |
|---|---|---|
| ACS | https://your-domain.com/authentication/saml/acs |
Assertion Consumer Service - receives SAML assertions from the IdP. |
| Metadata | https://your-domain.com/authentication/saml/metadata |
Service Provider metadata for IdP configuration. |
| SLO | https://your-domain.com/authentication/saml/slo |
Single Logout endpoint. |
Provide the ACS and Metadata URLs to your IdP administrator to complete the SAML setup.
Example SAML Configuration¶
Reference only
These blocks show the meaning of each option. The AUTHENTICATION_AUTHENTICATION_SAML_* keys are no longer in isardvdi.cfg.example and editing them has no effect: the equivalent configuration is done in the web panel (for example, SIGNATURE_METHOD corresponds to the Signature Method field).
Basic SAML authentication with user attribute mapping:
## SAML
AUTHENTICATION_AUTHENTICATION_SAML_ENABLED=true
AUTHENTICATION_AUTHENTICATION_SAML_METADATA_URL=https://idp.example.com/auth/realms/example/protocol/saml/descriptor
# Optional: Use local metadata file for offline startup
# curl -o /opt/isard/authentication/keys/idp-metadata.xml https://idp.example.com/auth/realms/example/protocol/saml/descriptor
#AUTHENTICATION_AUTHENTICATION_SAML_METADATA_FILE=/keys/idp-metadata.xml
# Optional: Custom Entity ID (if IdP requires a specific value)
#AUTHENTICATION_AUTHENTICATION_SAML_ENTITY_ID=my-app
# Optional: Enable request signing (if IdP requires AuthnRequestsSigned="true")
#AUTHENTICATION_AUTHENTICATION_SAML_SIGNATURE_METHOD=http://www.w3.org/2001/04/xmldsig-more#rsa-sha256
# Certificate files (will be auto-generated if they don't exist)
AUTHENTICATION_AUTHENTICATION_SAML_KEY_FILE=/keys/isardvdi.key
AUTHENTICATION_AUTHENTICATION_SAML_CERT_FILE=/keys/isardvdi.cert
# User Attribute Mapping
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_UID=uid
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_USERNAME=uid
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_NAME=displayName
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_EMAIL=mail
AUTHENTICATION_AUTHENTICATION_SAML_SAVE_EMAIL=true
SAML with auto-registration and role mapping:
## SAML
AUTHENTICATION_AUTHENTICATION_SAML_ENABLED=true
AUTHENTICATION_AUTHENTICATION_SAML_METADATA_URL=https://idp.example.com/metadata
# Optional: Custom Entity ID and request signing
#AUTHENTICATION_AUTHENTICATION_SAML_ENTITY_ID=my-app
#AUTHENTICATION_AUTHENTICATION_SAML_SIGNATURE_METHOD=http://www.w3.org/2001/04/xmldsig-more#rsa-sha256
# User Attributes
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_UID=uid
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_USERNAME=uid
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_NAME=displayName
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_EMAIL=mail
# Auto-registration
AUTHENTICATION_AUTHENTICATION_SAML_AUTO_REGISTER=true
AUTHENTICATION_AUTHENTICATION_SAML_AUTO_REGISTER_ROLES=teacher,student
AUTHENTICATION_AUTHENTICATION_SAML_GROUP_DEFAULT=default-group
# Role mapping from SAML attributes
# Example: Extract role from attribute like "urn:example:role:teacher:department:it"
AUTHENTICATION_AUTHENTICATION_SAML_GUESS_ROLE=true
AUTHENTICATION_AUTHENTICATION_SAML_FIELD_ROLE=eduPersonAffiliation
AUTHENTICATION_AUTHENTICATION_SAML_REGEX_ROLE='.*:role:([^:]+):.*'
AUTHENTICATION_AUTHENTICATION_SAML_ROLE_ADVANCED_IDS=teacher,staff
AUTHENTICATION_AUTHENTICATION_SAML_ROLE_USER_IDS=student
AUTHENTICATION_AUTHENTICATION_SAML_ROLE_DEFAULT=user
Troubleshooting¶
Service won't start - "fetch metadata" error:
- Check that METADATA_URL is accessible from the server.
- Verify network connectivity to the IdP.
- Use the METADATA_FILE option to load metadata from a local file.
- Check logs: docker logs isard-authentication.
"No attributes received":
- Confirm the IdP is configured to send attributes.
- Verify FIELD_* parameter names match the actual SAML attribute names.
- Enable debug logging to see the raw SAML assertion.
Certificate errors: - Ensure certificate and private key files exist. - Verify file permissions (key should be 600, cert should be 644). - Check that the certificate has not expired. - Verify the key and certificate match:
openssl rsa -modulus -noout -in /opt/isard/authentication/keys/isardvdi.key | openssl md5
openssl x509 -modulus -noout -in /opt/isard/authentication/keys/isardvdi.cert | openssl md5
Users not auto-registered:
- Verify AUTO_REGISTER=true is set.
- Check that the user's role matches AUTO_REGISTER_ROLES (if configured).
- Review authentication service logs for registration errors.
Regex not extracting correctly:
- Test regex patterns at https://regex101.com/.
- Remember to wrap the regex in single quotes if it contains special characters.
- The regex tries to extract the first capture group (), or the whole match if no group exists.
"Invalid Request" or "Invalid Entity ID" errors from IdP: - Verify the IdP is configured with the correct Entity ID. - Check that your SP metadata matches what the IdP expects:
- If the IdP requires a specific Entity ID, fill in the Entity ID field in the administration panel. - Ensure the IdP has the correct ACS and SLO URLs configured."Invalid Redirect URI" errors:
- Verify the IdP has the correct Valid Redirect URIs configured:
- https://your-domain.com/authentication/saml/acs
- https://your-domain.com/authentication/saml/slo
- https://your-domain.com/authentication/callback
- Check that the IdP's client configuration includes these URLs in the allowed list.
Signed requests required but not working:
- Fill in the Signature Method field in the administration panel with http://www.w3.org/2001/04/xmldsig-more#rsa-sha256.
- Ensure certificate and key files are properly configured and match.
- Verify the IdP has the correct certificate in its configuration.
- Check logs for the "SAML request signing enabled" message.