-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix handling of multiple LDAP user bind patterns #8134
Conversation
99c74b5
to
e0fd4d6
Compare
d59d73f
to
34e87df
Compare
...ts-launcher/src/main/java/io/trino/tests/product/launcher/suite/suites/Suite7NonGeneric.java
Outdated
Show resolved
Hide resolved
@@ -1,7 +1,7 @@ | |||
password-authenticator.name=ldap | |||
ldap.url=ldaps://ldapserver:636 | |||
ldap.ssl-trust-certificate=/etc/openldap/certs/openldap-certificate.pem | |||
ldap.user-base-dn=ou=Asia,dc=presto,dc=testldap,dc=com | |||
ldap.user-base-dn=dc=presto,dc=testldap,dc=com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added uid=EuropeUser,ou=Europe
and uid=AmericanUser,ou=America
who are a memberOf DefaultGroup
so both of them should be able to run queries provided they can bind to LDAP.
I've changed the ldap.user-bind-pattern
to include both ou=America
and ou=Asia
so that every user except EuropeUser
can bind. And base-dn has been changed to remove ou=Asia
because we want to search every ou
.
@kokosing @lukasz-walkiewicz @dain PTAL at the changes. |
It's possible and expected for some authentication attempts to fail when testing multiple LDAP bind patterns. In such cases we should ignore all AccessDeniedExceptions except any that get thrown when testing the last pattern.
34e87df
to
3222de6
Compare
@@ -47,7 +47,7 @@ | |||
testOnEnvironment(SinglenodeLdapAndFile.class).withGroups("ldap", "ldap_and_file", "ldap_cli", "ldap_and_file_cli").build(), | |||
testOnEnvironment(SinglenodeLdapInsecure.class).withGroups("ldap").build(), | |||
testOnEnvironment(SinglenodeLdapReferrals.class).withGroups("ldap").build(), | |||
testOnEnvironment(SinglenodeLdapBindDn.class).withGroups("ldap").build(), | |||
testOnEnvironment(SinglenodeLdapBindDn.class).withGroups("ldap").withExcludedGroups("ldap_multiple_binds").build(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BindDn env uses a fixed bind user which cannot be used together with bind patterns obviously. So an exclusion was needed.
Attempt to implement #8022 correctly.