Setup Two-Factor Authentication (2FA) with ldap account not working
We have gitlab 14.3.2-ce.0 omnibus installed on Debian GNU/Linux 9.13 (stretch).
The 2fa setup has been working without problems till version 14.1.6.
Ever since gitlab version 14.1.7-ce the 2fa setup has been changed, a current password is required to register a two-factor authenticator.
When using a LDAP account the registration fails with error : You must provide a valid current password
When using a local account the registration succeeds.
The change in version 14.1.7 "Require password param for 2FA changes (merge request)"
our working LDAP config from the command gitlab-ctl show-config
"ldap_enabled": true,
"ldap_servers": {
"main": {
"label": "LABEL",
"host": "<working_host>",
"port": 389,
"uid": "sAMAccountName",
"encryption": "start_tls",
"verify_certificates": false,
"bind_dn": "CN=ldapbrowse,CN=Users,DC=<DOMAIN>,DC=<DOMAIN>,DC=<DOMAIN>",
"password": "<password>",
"active_directory": true,
"allow_username_or_email_login": false,
"block_auto_created_users": false,
"base": "DC=<DOMAIN>,DC=<DOMAIN>,DC=<DOMAIN>",
"user_filter": "",
"attributes": {
"username": [
"uid",
"userid",
"sAMAccountName"
],
"email": [
"mail",
"email",
"userPrincipalName"
],
"name": "sn",
"first_name": "givenName",
"last_name": "sn"
}
}
},
command : gitlab-rake gitlab:ldap:check
returns : LDAP authentication... Success
The LDAP login works, only a new 2fa setup fails.
User who have already setup their 2fa have no problems with login.
How can I debug the ldap 2fa error?
Could there be an error in the ldap configuration?
Any help or suggestions would be appreciated.