com.sun.enterprise.config.serverbeans
Interface SecureAdminHelper


@Contract
public interface SecureAdminHelper


Nested Class Summary
static class SecureAdminHelper.SecureAdminCommandException
          An exception indicating a user-correctable error that occurred as a secure admin command executed.
 
Method Summary
 String getDN(String value, boolean isAlias)
          Returns the DN for the given DN or alias value.
 boolean isAnyAdminUserWithoutPassword()
          Reports whether any admin user exists which has an empty password.
 void validateInternalUsernameAndPasswordAlias(String username, String passwordAlias)
          Makes sure that the specified username is an admin user and that the specified password alias exists.
 

Method Detail

getDN

String getDN(String value,
             boolean isAlias)
             throws IOException,
                    KeyStoreException
Returns the DN for the given DN or alias value.

Parameters:
value - the user-specified value
isAlias - whether the value is an alias or the DN itself
Returns:
the DN
Throws:
IOException
KeyStoreException

validateInternalUsernameAndPasswordAlias

void validateInternalUsernameAndPasswordAlias(String username,
                                              String passwordAlias)
Makes sure that the specified username is an admin user and that the specified password alias exists. Note that implementations of this method should not make sure that the username and the password pointed to by the alias actually match a valid admin user in the admin realm. That check is done by the normal authorization logic when the username and the actual password are used.

Parameters:
username -
passwordAlias -
Throws:
SecureAdminHelper.SecureAdminCommandException - if eiher the username or the password alias is not valid

isAnyAdminUserWithoutPassword

boolean isAnyAdminUserWithoutPassword()
                                      throws Exception
Reports whether any admin user exists which has an empty password.

Returns:
true if any admin user exists with an empty password; false otherwise
Throws:
SecureAdminHelper.SecureAdminCommandException
Exception


Copyright © 2012 GlassFish Community. All Rights Reserved.