@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
LdapConfigurationService
checkConnection
in interface LdapConfigurationService
ambariLdapConfiguration
- the ambari ldap configuration instanceAmbariLdapException
- if the connection is not possiblepublic String checkUserAttributes(String testUserName, String testPassword, AmbariLdapConfiguration ambariLdapConfiguration) throws AmbariLdapException
checkUserAttributes
in interface LdapConfigurationService
testUserName
- 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 LdapConfigurationService
userDn
- a user DN to checkambariLdapConfiguration
- the available LDAP configuration to be validatedAmbariLdapException
Copyright © 2022 Apache Software Foundation. All rights reserved.