Hi, i’m trying to integrate cockpit with LDAP.
I’m following this tutorial: OpenLDAP and Camunda-Spring Boot App Integration in Windows - DZone Integration
For testing purpose i’m using online ldap: https://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/
i have configured WebSecurityConfig
like this:
@EnableWebSecurity
@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable();
http.authorizeRequests().antMatchers("/").permitAll();
http.headers().frameOptions().disable();
}
@Bean
public static AdministratorAuthorizationPlugin administratorAuthorizationPlugin() {
AdministratorAuthorizationPlugin plugin = new AdministratorAuthorizationPlugin();
plugin.setAdministratorUserName("gauss");
return plugin;
}
@Bean
public static LdapIdentityProviderPlugin ldapIdentityProviderPlugin() {
LdapIdentityProviderPlugin plugin = new LdapIdentityProviderPlugin();
plugin.setServerUrl("ldap://ldap.forumsys.com");
plugin.setManagerDn("cn=read-only-admin,dc=example,dc=com");
plugin.setManagerPassword("password");
plugin.setBaseDn("ou=mathematicians,dc=example,dc=com");
plugin.setUserSearchBase("");
plugin.setUserSearchFilter("(objectclass=person)");
plugin.setUserIdAttribute("uid");
plugin.setUserFirstnameAttribute("cn");
plugin.setUserLastnameAttribute("sn");
plugin.setUserPasswordAttribute("userPassword");
return plugin;
}
However this results in: Login Failed : Wrong credentials, locked user or missing access rights to application
I’m not sure where I’m wrong, it seems that it is authorizing user in ldap but some rights are missing for user “gauss”, even thou i have granted him administrator privileges, what am i missing?