Class SecureAdminHelperImpl
java.lang.Object
com.sun.enterprise.security.admin.cli.SecureAdminHelperImpl
- All Implemented Interfaces:
com.sun.enterprise.config.serverbeans.SecureAdminHelper
@Service
@PerLookup
public class SecureAdminHelperImpl
extends Object
implements com.sun.enterprise.config.serverbeans.SecureAdminHelper
Various utility methods which support secure admin operations.
- Author:
- Tim Quinn
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.sun.enterprise.config.serverbeans.SecureAdminHelper
com.sun.enterprise.config.serverbeans.SecureAdminHelper.SecureAdminCommandException
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the correct DN to use for a given secure admin principal, mapping the alias (if it's an alias specified) to the DN for the corresponding cert in the key store.boolean
Returns whether at least one admin user has an empty password.void
validateInternalUsernameAndPasswordAlias
(String username, String passwordAlias) Makes sure the username is a valid admin username and that the password alias is defined.
-
Constructor Details
-
SecureAdminHelperImpl
public SecureAdminHelperImpl()
-
-
Method Details
-
getDN
Returns the correct DN to use for a given secure admin principal, mapping the alias (if it's an alias specified) to the DN for the corresponding cert in the key store.- Specified by:
getDN
in interfacecom.sun.enterprise.config.serverbeans.SecureAdminHelper
- Parameters:
value
- user-provided value (alias name or the actual DN)isAlias
- whether the value is an alias- Returns:
- DN to use
- Throws:
IOException
- if there is an error accessing the key storeKeyStoreException
- if the keystore has not been initializedIllegalArgumentException
- if the cert for the specified alias as fetched from the key store is not an X509 certificate
-
validateInternalUsernameAndPasswordAlias
Makes sure the username is a valid admin username and that the password alias is defined. This method does NOT make sure that the password associated with the username and the password associated with the password alias are the same.- Specified by:
validateInternalUsernameAndPasswordAlias
in interfacecom.sun.enterprise.config.serverbeans.SecureAdminHelper
- Parameters:
username
- user-provided usernamepasswordAlias
- name of the password alias
-
isAnyAdminUserWithoutPassword
Returns whether at least one admin user has an empty password.- Specified by:
isAnyAdminUserWithoutPassword
in interfacecom.sun.enterprise.config.serverbeans.SecureAdminHelper
- Returns:
- true if at least one admin user has an empty password; false otherwise
- Throws:
BadRealmException
NoSuchRealmException
NoSuchUserException
Exception
-