-
Notifications
You must be signed in to change notification settings - Fork 485
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
test-support-unboundid EmbeddedLdapServer has hard-coded credentials #576
Comments
Thanks for the report, @Interessierter. Can you clarify why you need to supply a different set of credentials in a test? |
Hi Josh, thanks for the reply! I agree that specifying a different set of credentials isnt usually neccessary (although it could be in more complex test setups when you're re-using existing configuration) but what tripped me was that the API of So in IMHO either the |
…d test server - had to make some minor API adjustments but kept the old API for backward compatibility
The configuration also specifies the ldif that has the custom credentials used to connect. Does that help to clarify? |
@rwinch was that addressed at me? Then no, I dont understand what you're trying to say. As you can see I have opened a pull request (with tests) which fixes the issue. Are you trying to say if you have the account you want to use for binding is included in the LDIF it should work? It doesnt, I have tested it (and btw. the hardcoded account |
Ok I see the reason this does not work. The TestContextSourceFactory uses the ContextSource to perform the ldif import, but the credentials for the I'm open to making the change. I'll close this in favor of continuing the discussion on the PR gh-578 |
Hello,
this has cost me some hours to debug :(
See here: https://github.com/spring-projects/spring-ldap/blob/master/test-support-unboundid/src/main/java/org/springframework/ldap/test/unboundid/EmbeddedLdapServer.java#L43
The
unboundid
part of the spring-ldap-test has hard-coded credentials, making it impossible to use theorg.springframework.ldap.test.unboundid.LdapTestUtils
or other classes utlizing this (like the very usefulorg.springframework.ldap.test.unboundid.EmbeddedLdapServerFactoryBean
) with different credentials, even if the API and the documentation clearly say so. The existing test does not catch this as it tests the code with exactly the hardcoded credentials.IMHO the API of
LdapTestUtils
should be changed to require the user/password always.The text was updated successfully, but these errors were encountered: