@Singleton public class DefaultLdapConfigurationService extends Object implements LdapConfigurationService
| Constructor and Description |
|---|
DefaultLdapConfigurationService() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkConnection(AmbariLdapConfiguration ambariLdapConfiguration)
Tests the connection based on the provided configuration.
|
Set<String> |
checkGroupAttributes(String userDn,
AmbariLdapConfiguration ambariLdapConfiguration)
Checks whether the provided group related settings are correct.
|
String |
checkUserAttributes(String testUserName,
String testPassword,
AmbariLdapConfiguration ambariLdapConfiguration)
Checks the user attributes provided in the configuration instance by issuing a search for a (known) test user in the LDAP.
|
public void checkConnection(AmbariLdapConfiguration ambariLdapConfiguration) throws AmbariLdapException
LdapConfigurationServicecheckConnection in interface LdapConfigurationServiceambariLdapConfiguration - the ambari ldap configuration instanceAmbariLdapException - if the connection is not possiblepublic String checkUserAttributes(String testUserName, String testPassword, AmbariLdapConfiguration ambariLdapConfiguration) throws AmbariLdapException
checkUserAttributes in interface LdapConfigurationServicetestUserName - the test usernametestPassword - the test passwordambariLdapConfiguration - the available LDAP configuration to be validatedAmbariLdapException - if an error occurspublic Set<String> checkGroupAttributes(String userDn, AmbariLdapConfiguration ambariLdapConfiguration) throws AmbariLdapException
checkGroupAttributes in interface LdapConfigurationServiceuserDn - a user DN to checkambariLdapConfiguration - the available LDAP configuration to be validatedAmbariLdapExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.