Bypass MFA | AzureAD-LDAP-wrapper
@@ -41,7 +41,7 @@
/>
@@ -49,14 +49,14 @@
@@ -68,8 +68,8 @@
"name": "Bypass MFA",
"url" : "https://ahaenggli.github.io/AzureAD-LDAP-wrapper/configuration/bypass-mfa/",
"headline": "Bypass MFA",
- "description": "Officially MFA is not supported by this LDAP-wrapper. The login for users with activated MFA simply fails, as mentioned here and here. There is no interactive window to enter another factor, and LDAP does not support this either. If you need to use this LDAP-wrapper despite of activated MFA, there are two options:\nDisable MFA for this application in AzureAD (preferred).\nThere are several ways to define MFA, but only some of them allows you to disable MFA.",
- "wordCount" : "359",
+ "description": "Officially MFA is not supported by this LDAP-wrapper. The login for users with activated MFA simply fails, as mentioned here and here. There is no interactive window to enter another factor, and LDAP does not support this either. If you need to use this LDAP-wrapper despite of activated MFA, there are two options:\nDisable MFA for this application in your tenant (preferred).\nThere are several ways to define MFA, but only some of them allows you to disable MFA.",
+ "wordCount" : "364",
"inLanguage": "en",
"isFamilyFriendly": "true",
"mainEntityOfPage": {
@@ -80,7 +80,7 @@
"copyrightYear" : "0001",
"dateCreated": "0001-01-01T00:00:00.00Z",
"datePublished": "0001-01-01T00:00:00.00Z",
- "dateModified": "2023-07-21T12:16:16.00Z",
+ "dateModified": "2024-01-11T15:18:30.00Z",
"publisher":{
"@type":"Organization",
"name": "AzureAD-LDAP-wrapper",
@@ -878,6 +878,196 @@
Disable MFA for this application in AzureAD (preferred).
+
Disable MFA for this application in your tenant (preferred).
There are several ways to define MFA, but only some of them allows you to disable MFA.
Per-user MFA
MFA could be enabled individually for each user. A possible workaround seems to be the trusted IPs feature, which allows to disable MFA for some IPs, but this feature requires Azure AD Premium.
+ href="https://learn.microsoft.com/en-us/entra/identity/authentication/howto-mfa-mfasettings#trusted-ips"
+>trusted IPs feature, which allows to disable MFA for some IPs, but this feature requires Microsoft Entra ID Premium.
If a login fails due to this MFA method, the error code is AADSTS50079.
Security defaults Security defaults seems to be the only ways for customers using the free Azure AD plan to Security defaults seems to be the only ways for customers using the free Microsoft Entra ID plan to enable multi-factor authentication in their whole environment. It looks like there are no workarounds to disable MFA for certain IPs or applications.
If a login fails due to this MFA method, the error code is AADSTS50076.
Conditional Access Conditional Access can be used to require MFA for some or all the users. This is the most flexible way to activate MFA, but it is a premium feature. The settings allows to exclude certain apps. If a login fails due to this MFA method, the error codea are either AADSTS50158 (for external MFA like Duo) or also AADSTS50079. As a simple workaround, the app used by the LDAP-wrapper can be excluded:
Let the LDAP-wrapper internally treat some MFA/2FA related error codes as a successful login.
There is an experimental feature to bypass MFA/2FA. It must be manually enabled by setting the the env var GRAPH_IGNORE_MFA_ERRORS to true.
-Even if the env var is set to true, the login attempt appears as “Failure” in the AzureAD sign-in logs due to MFA/2FA. Only the LDAP wrapper internally treats some MFA/2FA-related error codes as successful logins. Specifically, these are the error codes AADSTS50076, AADSTS50079 and AADSTS50158, as mentioned above.
+Even if the env var is set to true, the login attempt appears as “Failure” in the Microsoft Entra ID sign-in logs due to MFA/2FA. Only the LDAP wrapper internally treats some MFA/2FA-related error codes as successful logins. Specifically, these are the error codes AADSTS50076, AADSTS50079 and AADSTS50158, as mentioned above.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/configuration/index.xml b/configuration/index.xml
index 2893663..749c130 100644
--- a/configuration/index.xml
+++ b/configuration/index.xml
@@ -13,7 +13,7 @@
https://ahaenggli.github.io/AzureAD-LDAP-wrapper/configuration/bypass-mfa/Officially MFA is not supported by this LDAP-wrapper. The login for users with activated MFA simply fails, as mentioned here and here. There is no interactive window to enter another factor, and LDAP does not support this either. If you need to use this LDAP-wrapper despite of activated MFA, there are two options:
-Disable MFA for this application in AzureAD (preferred).
+Disable MFA for this application in your tenant (preferred).
There are several ways to define MFA, but only some of them allows you to disable MFA.
diff --git a/configuration/settings/index.html b/configuration/settings/index.html
index 7a6059b..ecdec29 100644
--- a/configuration/settings/index.html
+++ b/configuration/settings/index.html
@@ -875,6 +875,196 @@
Authelia supports LDAP authentication, enabling users to log in by authenticating against your LDAP directory. This guide outlines the steps to set up LDAP authentication with Authelia using LDAP-wrapper.
Before configuring LDAP authentication for Authelia with LDAP-wrapper, ensure the following prerequisites are met:
+
+
LDAP-wrapper: Ensure you have a functioning LDAP-wrapper.
+
Authelia: Set up and configure Authelia for your environment.
+
+
+
+ Settings for Authelia LDAP Authentication with LDAP-wrapper
+
+
+
+
+
+
To configure LDAP authentication with Authelia using LDAP-wrapper, follow these steps:
+
+
Open your configuration.yml file in the Authelia configuration directory.
+
Locate the authentication_backend section and configure it with the following example, adjusting the url,base_dn, user, and password based on your LDAP-wrapper setup:
+
+
## Authentication Backend Provider Configuration
+authentication_backend:
+
+## Password Reset Options
+password_reset:
+## Disable both the HTML element and the API for reset password functionality.
+disable:true
+## External reset password url for Microsoft
+custom_url:"https://account.activedirectory.windowsazure.com/ChangePassword.aspx"
+
+## The amount of time to wait before we refresh data from the authentication backend. Uses duration notation
+## See the below documentation for more information
+## Duration Notation docs: <https://www.authelia.com/c/common#duration-notation-format>
+## Refresh Interval docs: <https://www.authelia.com/c/1fa#refresh-interval>
+refresh_interval:5m
+
+##
+## LDAP (Authentication Provider)
+##
+ldap:
+## The LDAP implementation, this affects elements like the attribute utilised for resetting a password.
+implementation:custom
+## The url to the ldap server. Format: <scheme>://<address>[:<port>].
+url:ldap://my-nas-name.local:389
+## The dial timeout for LDAP.
+timeout:5s
+## Use StartTLS with the LDAP connection.
+start_tls:false
+tls:
+## Server Name for certificate validation (in case it's not set correctly in the URL).
+# server_name: ldap.domain.tld
+## Skip verifying the server certificate (to allow a self-signed certificate).
+skip_verify:false
+## Minimum TLS version for either Secure LDAP or LDAP StartTLS.
+minimum_version:TLS1.2
+## The distinguished name of the container searched for objects in the directory information tree.
+base_dn:dc=domain,dc=tld
+## The attribute holding the username of the user. This attribute is used to populate the username in the session
+username_attribute:uid
+## The additional_users_dn is prefixed to base_dn and delimited by a comma when searching for users.
+additional_users_dn:cn=users
+## The users filter used in search queries to find the user profile based on input filled in login form.
+users_filter:(&(|({username_attribute}={input})({mail_attribute}={input}))(objectClass=person))
+## The additional_groups_dn is prefixed to base_dn and delimited by a comma when searching for groups.
+additional_groups_dn:cn=groups
+## The groups filter used in search queries to find the groups based on relevant authenticated user.
+groups_filter:(&(member={dn})(objectClass=posixGroup))
+## The attribute holding the name of the group.
+group_name_attribute:cn
+## The attribute holding the mail address of the user. If multiple email addresses are defined for a user, only the
+mail_attribute:mail
+## The attribute holding the display name of the user. This will be used to greet an authenticated user.
+display_name_attribute:displayName
+## Follow referrals returned by the server.
+## This is especially useful for environments where read-only servers exist. Only implemented for write operations.
+permit_referrals:false
+## The username and password of the admin user, matching an entry of your LDAP-wrapper environment variable `LDAP_BINDUSER`.
+user:uid=root
+## Password can also be set using a secret: <https://www.authelia.com/c/secrets>
+password:1234
+
+
Save the changes to your configuration.yml file.
+
Restart Authelia to apply the new configuration.
+
+
Now, Authelia is configured to authenticate users against your LDAP directory through LDAP-wrapper.