Class SolarisRealm
- java.lang.Object
-
- com.sun.enterprise.security.auth.realm.Realm
-
- com.sun.enterprise.security.BaseRealm
-
- com.sun.enterprise.security.auth.realm.IASRealm
-
- com.sun.enterprise.security.auth.realm.solaris.SolarisRealm
-
- All Implemented Interfaces:
Comparable
@Service public final class SolarisRealm extends IASRealm
Realm wrapper for supporting Solaris authentication.The Solaris realm needs the following properties in its configuration:
- jaas-ctx - JAAS context name used to access LoginModule for authentication.
- See Also:
SolarisLoginModule
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUTH_TYPE
static String
OS_ARCH
static String
SOL_SPARC_OS_ARCH
static String
SOL_X86_OS_ARCH
-
Fields inherited from class com.sun.enterprise.security.BaseRealm
JAAS_CONTEXT_PARAM, sm
-
Fields inherited from class com.sun.enterprise.security.auth.realm.Realm
_logger, groupMapper, PARAM_GROUP_MAPPING
-
-
Constructor Summary
Constructors Constructor Description SolarisRealm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
authenticate(String username, char[] password)
Invoke the native authentication call.String
getAuthType()
Returns a short (preferably less than fifteen characters) description of the kind of authentication which is supported by this realm.Enumeration
getGroupNames(String username)
Returns the name of all the groups that this user belongs to.void
init(Properties props)
Initialize a realm with some properties.-
Methods inherited from class com.sun.enterprise.security.BaseRealm
addUser, addUser, getAuthenticationHandler, getGroupNames, getUser, getUserNames, persist, refresh, removeUser, supportsUserManagement, updateUser, updateUser
-
Methods inherited from class com.sun.enterprise.security.auth.realm.Realm
addAssignGroups, compareTo, getDefaultDigestAlgorithm, getDefaultInstance, getDefaultRealm, getInstance, getInstance, getJAASContext, getMappedGroupNames, getName, getProperties, getProperty, getRealmNames, getRealmStatsProvier, instantiate, instantiate, instantiate, isValidRealm, isValidRealm, refresh, setDefaultRealm, setName, setProperty, toString, unloadInstance, unloadInstance, updateInstance, updateInstance
-
-
-
-
Field Detail
-
AUTH_TYPE
public static final String AUTH_TYPE
- See Also:
- Constant Field Values
-
OS_ARCH
public static final String OS_ARCH
- See Also:
- Constant Field Values
-
SOL_SPARC_OS_ARCH
public static final String SOL_SPARC_OS_ARCH
- See Also:
- Constant Field Values
-
SOL_X86_OS_ARCH
public static final String SOL_X86_OS_ARCH
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(Properties props) throws BadRealmException, NoSuchRealmException
Initialize a realm with some properties. This can be used when instantiating realms from their descriptions. This method may only be called a single time.- Overrides:
init
in classRealm
- Parameters:
props
- Initialization parameters used by this realm.- Throws:
BadRealmException
- If the configuration parameters identify a corrupt realm.NoSuchRealmException
- If the configuration parameters specify a realm which doesn't exist.
-
getAuthType
public String getAuthType()
Returns a short (preferably less than fifteen characters) description of the kind of authentication which is supported by this realm.- Specified by:
getAuthType
in classRealm
- Returns:
- Description of the kind of authentication that is directly supported by this realm.
-
getGroupNames
public Enumeration getGroupNames(String username) throws InvalidOperationException, NoSuchUserException
Returns the name of all the groups that this user belongs to. This is called from web path role verification, though it should not be.- Specified by:
getGroupNames
in classRealm
- Parameters:
username
- Name of the user in this realm whose group listing is needed.- Returns:
- Enumeration of group names (strings).
- Throws:
InvalidOperationException
- thrown if the realm does not support this operation - e.g. Certificate realm does not support this operation.NoSuchUserException
-
-