Add LDAP AuthenticationManager factory - #10138
Merged
eleftherias merged 2 commits intoJan 18, 2022
Merged
Conversation
eleftherias
force-pushed
the
ldap-manager-bean
branch
from
September 16, 2021 17:23
6267fcc to
47cea15
Compare
eleftherias
marked this pull request as ready for review
September 16, 2021 17:28
eleftherias
force-pushed
the
ldap-manager-bean
branch
from
October 4, 2021 13:22
47cea15 to
a71759f
Compare
rwinch
requested changes
Oct 12, 2021
rwinch
left a comment
Member
There was a problem hiding this comment.
Thanks for the updates. I've provided feedback inline.
eleftherias
added a commit
to eleftherias/spring-security
that referenced
this pull request
Oct 13, 2021
eleftherias
added a commit
to eleftherias/spring-security
that referenced
this pull request
Oct 13, 2021
eleftherias
force-pushed
the
ldap-manager-bean
branch
from
October 13, 2021 15:51
a71759f to
e418a71
Compare
rwinch
requested changes
Oct 19, 2021
eleftherias
force-pushed
the
ldap-manager-bean
branch
from
January 5, 2022 11:18
e418a71 to
048c782
Compare
Contributor
Author
|
Updated example usage: @Bean
public EmbeddedLdapServerContextSourceFactoryBean contextSourceFactoryBean() {
EmbeddedLdapServerContextSourceFactoryBean contextSourceFactoryBean =
EmbeddedLdapServerContextSourceFactoryBean.fromEmbeddedLdapServer();
contextSourceFactoryBean.setPort(0);
return contextSourceFactoryBean;
}
@Bean
public AuthenticationManager authenticationManager(BaseLdapPathContextSource contextSource) {
LdapAuthenticationManagerFactory factory = LdapAuthenticationManagerFactory
.usingBindAuthentication(contextSource);
factory.setUserDnPatterns("uid={0},ou=people");
factory.setUserDetailsContextMapper(new PersonContextMapper());
return factory.createAuthenticationManager();
} |
rwinch
requested changes
Jan 11, 2022
rwinch
left a comment
Member
There was a problem hiding this comment.
Thanks for the updates. I've commented inline
eleftherias
force-pushed
the
ldap-manager-bean
branch
from
January 14, 2022 11:59
048c782 to
00d8e7a
Compare
eleftherias
force-pushed
the
ldap-manager-bean
branch
from
January 14, 2022 12:08
00d8e7a to
bee8f20
Compare
Contributor
Author
|
Updated example configuration: Note: the issue description has also been updated to the latest configuration. |
eleftherias
force-pushed
the
ldap-manager-bean
branch
from
January 18, 2022 13:47
bee8f20 to
ad33eae
Compare
eleftherias
force-pushed
the
ldap-manager-bean
branch
from
January 18, 2022 13:56
ad33eae to
11ed970
Compare
eleftherias
added a commit
that referenced
this pull request
Jan 18, 2022
eleftherias
added a commit
that referenced
this pull request
Jan 18, 2022
eleftherias
added a commit
that referenced
this pull request
Jan 18, 2022
This was referenced Jan 23, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a
LdapBindAuthenticationManagerFactory,LdapPasswordComparisonAuthenticationManagerFactoryandEmbeddedLdapServerContextSourceFactoryBeanwhich can be used to create anAuthenticationManagerthat can perform LDAP authentication.This is an example usage
It is equivalent to the following configuration
Logs and reference documentation will be added in future commits.