Class SolarisRealm
- java.lang.Object
-
- com.sun.enterprise.security.auth.realm.AbstractRealm
-
- com.sun.enterprise.security.auth.realm.AbstractStatefulRealm
-
- com.sun.enterprise.security.auth.realm.Realm
-
- com.sun.enterprise.security.BaseRealm
-
- com.sun.enterprise.security.auth.realm.solaris.SolarisRealm
-
- All Implemented Interfaces:
Comparable<Realm>
@Service public final class SolarisRealm extends BaseRealm
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
Descriptive string of the authentication type of this realm.-
Fields inherited from class com.sun.enterprise.security.auth.realm.Realm
_logger, JAAS_CONTEXT_PARAM, RI_DEFAULT
-
Fields inherited from class com.sun.enterprise.security.auth.realm.AbstractStatefulRealm
groupMapper, GROUPS_SEP, PARAM_DEFAULT_DIGEST_ALGORITHM, PARAM_GROUP_MAPPING, PARAM_GROUPS
-
-
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<String>
getGroupNames(String username)
Returns the name of all the groups that this user belongs to.protected void
init(Properties props)
Initialize a realm with some properties.-
Methods inherited from class com.sun.enterprise.security.BaseRealm
addUser, addUser, getGroupNames, getUser, getUserNames, persist, refresh, removeUser, supportsUserManagement, updateUser, updateUser
-
Methods inherited from class com.sun.enterprise.security.auth.realm.Realm
getDefaultInstance, getDefaultRealm, getInstance, getInstance, getRealmNames, getRealmStatsProvier, instantiate, instantiate, isValidRealm, isValidRealm, setDefaultRealm, unloadInstance, unloadInstance, updateInstance, updateInstance
-
Methods inherited from class com.sun.enterprise.security.auth.realm.AbstractStatefulRealm
addAssignGroups, compareTo, getDefaultDigestAlgorithm, getJAASContext, getMappedGroupNames, getName, getProperties, getProperty, refresh, setName, setProperty, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
AUTH_TYPE
public static final String AUTH_TYPE
Descriptive string of the authentication type of this realm.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
protected 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 classAbstractStatefulRealm
- 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 classAbstractRealm
- Returns:
- Description of the kind of authentication that is directly supported by this realm.
-
getGroupNames
public Enumeration<String> 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 classAbstractRealm
- 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
-
-