Add alert for DN logins that dont exist. Might be attempts to use the rootdn which is not supported.

Closes #345
This commit is contained in:
2025-06-19 10:30:16 +10:00
parent 96afbd8316
commit 8fd2a43ee2
4 changed files with 66 additions and 2 deletions

View File

@@ -84,8 +84,12 @@ return [
* setup.
*/
'login' => [
'attr' => [env('LDAP_LOGIN_ATTR','uid') => env('LDAP_LOGIN_ATTR_DESC','User ID')], // Attribute used to find user for login
'objectclass' => explode(',',env('LDAP_LOGIN_OBJECTCLASS', 'posixAccount')), // Objectclass that users must contain to login
// Attribute used to find user for login
'attr' => [strtolower(env('LDAP_LOGIN_ATTR','uid')) => env('LDAP_LOGIN_ATTR_DESC','User ID')],
// Objectclass that users must contain to login
'objectclass' => explode(',',env('LDAP_LOGIN_OBJECTCLASS', 'posixAccount')),
// Alert if DN is being used, and the login fails, and the the DN doesnt exist
'alert_rootdn' => env('LDAP_ALERT_ROOTDN',TRUE) && strtolower(env('LDAP_LOGIN_ATTR','uid')) === 'dn',
],
'template' => [