You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I would like to exclude from role ldap search any user which was not authentified by my ldap. For that I'm using the following regexp in skip_users: /.*$(?<!DC=adm,DC=corp)/
With this regexp it's excluding all users but it should not exclude my ldap user which have the following DN
CN=Test User,OU=Users,DC=contonso,DC=com
I've tested this regexp successfully on several regexp online site like regex101.
To Reproduce
The ldap configuration in config.yml is
LDAP service is an Active Directory 2016 (but anyway the problem is not really related to the ldap version). The problem occurs at line 189 of LDAPAuthorizationBackend2.java
@df-cgdm thanks for the report. I've been squinting at this for a few minutes and apologies if I'm missing something but the config file posted skips users matching RegEx /.*$(?<!DC=contonso,DC=com)/
skip_users:
- '/.*$(?<!DC=contonso,DC=com)/'
and the log file shows how the user being skipped matches in fact that:
Skipped search roles of user CN=Test User,OU=Users,DC=contonso,DC=com/test-user
Gotcha! It seems like the issue here is that the matcher we use does not support negative lookbehind (not all regex matchers do, including some browsers). Please try this one instead with a negative lookahead: ^(?!.*DC=contonso,DC=com$).*$
davidlago
added
the
triaged
Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
label
Oct 10, 2022
Describe the bug
I would like to exclude from role ldap search any user which was not authentified by my ldap. For that I'm using the following regexp in skip_users:
/.*$(?<!DC=adm,DC=corp)/
With this regexp it's excluding all users but it should not exclude my ldap user which have the following DN
CN=Test User,OU=Users,DC=contonso,DC=com
I've tested this regexp successfully on several regexp online site like regex101.
To Reproduce
The ldap configuration in config.yml is
I've set the Trace Level of com.amazon.dlic.auth.ldap.backend to TRACE
Expected behavior
This should skip any user which is not ending with "DC=contonso,DC=com" but in fact it skips all users.....
Logs
The text was updated successfully, but these errors were encountered: