-
Notifications
You must be signed in to change notification settings - Fork 40.9k
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
EmbeddedLdapContextConfiguration LdapContextSource bean creation not populating base property #23030
Comments
@mdiskin sorry, I am not sure I follow. The |
In the Non-Embedded Autocomplete the there is a property (single string). In the Embedded there is the ability to pass into unboundid an array of dn's but the corresponding LdapContextSource bean create doesn't set this base.
So if you are using the embedded for unit/integration testing and then Non-Embedded you have to add additional logic that fully qualifies each LdapTempate search e.g. add "dc=spring,dc=org". I was playing with options in a forked version and the unboundid support for multiple DNs doesn't seem well supported given it only takes a single base so I wasn't sure whether to remove that array/functionality for the embed-only option. One thought would be for embedded to add another property 'base' (in addition to the dn array) ideally we could derive that from the other but that would not be very easy to determine. |
We discussed this one and I can see the problem now. It's largely due to the fact the configuration between the embedded and the non embedded case are duplicated. Rather than creating a completely new The fact that there is an |
That would be awsome but sounds involved refactoring and not something for my first project commit. Let me know if I can help out maybe with testing/snapshot validation. Additionally with this approach can you also look at the autoconfigure support for BaseLdapPathBeanPostProcessor Also, would be good to upgrade the unboundid versions to the 5.x at some point. |
We want to rework |
Makes sense. I can help test snapshot or milestone releases. Also, UnboundID 6.0.0 has since been released and may be good to include in 2.6.x changes |
Was hoping to get confirmation that will be in the 2.6 initial release (I'm working against the snapshot), but if not I'll start work on a stopgap measure as it's blocking some efforts internally. |
An upgrade of UnboundID is unlikely at this time as Spring Security is still using 4.x. If you'd like to see an upgrade to 6.x, please open a Spring Security issue and we can take things from there. |
@wilkinsona I'll open that upgrade request (more of a nice to have) but the bugfix to align up the embedded and external ldap is the real blocker for me |
UPDATE: This doesn't work, because
|
This one works (Kotlin):
|
We decided to fix this by populating the base for the embedded context. In the future, we might want to revisit this to consider the customizer option. |
Drift in behavior between
LdapAutoConfiguration
andEmbeddedLdapAutoConfiguration
.LdapAutoConfiguration
populates the base from properties inLdapContextSource
and theEmbeddedLdapAutoConfiguration
doesn't which changes how queries, etc.. switching between the two.I don't mind submitting a PR but wanted confirmation of actual problem or expected behavior.
Tested on 2.4.0-M2
Thanks
Mark
The text was updated successfully, but these errors were encountered: