Skip to content
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

EPMRPP-94013 || Not possible to create LDAP integration with any encoder type #334

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,21 @@ protected AuthenticationProvider getDelegate() {
LdapParameter.GROUP_SEARCH_BASE.getParameter(integration).ifPresent(builder::groupSearchBase);
LdapParameter.USER_SEARCH_FILTER.getParameter(integration).ifPresent(builder::userSearchFilter);

LdapParameter.PASSWORD_ENCODER_TYPE.getParameter(integration).ifPresent(it -> {
//TODO: temporary solution for working with encoded passwords
/* LdapParameter.PASSWORD_ENCODER_TYPE.getParameter(integration).ifPresent(it -> {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [reviewdog] <com.puppycrawl.tools.checkstyle.checks.indentation.CommentsIndentationCheck> reported by reviewdog 🐶
Block comment has incorrect indentation level 0, expected is 4, indentation should be the same level as line 131.

LdapAuthenticationProviderConfigurer<AuthenticationManagerBuilder>
.PasswordCompareConfigurer passwordCompareConfigurer = builder.passwordCompare();
LdapParameter.PASSWORD_ATTRIBUTE.getParameter(integration)
.ifPresent(passwordCompareConfigurer::passwordAttribute);

/*
*//*
* DIRTY HACK. If LDAP password has salt, ldaptemplate.compare operation does not work
* since we don't know server's salt.
* To enable local password comparison, we need to provide password encoder from crypto's
* package
* This is why we just wrap old encoder with new one interface
* New encoder cannot be used everywhere since it does not have implementation for LDAP
*/
*//*
final PasswordEncoder delegate = PasswordEncoderFactories.createDelegatingPasswordEncoder();
builder.passwordEncoder(new org.springframework.security.crypto.password.PasswordEncoder() {

Expand All @@ -125,7 +126,7 @@ public boolean matches(CharSequence rawPassword, String encodedPassword) {
return delegate.matches(rawPassword, encodedPassword);
}
});
});
});*/

LdapParameter.USER_DN_PATTERN.getParameter(integration).ifPresent(builder::userDnPatterns);

Expand Down
Loading