File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
api/src/main/java/io/kafbat/ui/config/auth Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 16
16
import org .springframework .context .annotation .Configuration ;
17
17
import org .springframework .ldap .core .DirContextOperations ;
18
18
import org .springframework .ldap .core .support .BaseLdapPathContextSource ;
19
+ import org .springframework .ldap .core .support .DefaultTlsDirContextAuthenticationStrategy ;
19
20
import org .springframework .ldap .core .support .LdapContextSource ;
20
21
import org .springframework .security .authentication .AuthenticationManager ;
21
22
import org .springframework .security .authentication .ProviderManager ;
@@ -90,6 +91,9 @@ public LdapContextSource ldapContextSource() {
90
91
ctx .setUserDn (props .getAdminUser ());
91
92
ctx .setPassword (props .getAdminPassword ());
92
93
ctx .afterPropertiesSet ();
94
+ if (props .getUrls ().startsWith ("ldaps://" )) {
95
+ ctx .setAuthenticationStrategy (new DefaultTlsDirContextAuthenticationStrategy ());
96
+ }
93
97
return ctx ;
94
98
}
95
99
You can’t perform that action at this time.
0 commit comments