|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
org.jboss.security.plugins.JaasSecurityManager
The JaasSecurityManager is responsible both for authenticating credentials associated with principals and for role mapping. This implementation relies on the JAAS LoginContext/LoginModules associated with the security domain name associated with the class for authentication, and the context JAAS Subject object for role mapping.
isValid(Principal, Object)
,
getPrincipal(Principal)
,
doesUserHaveRole(Principal, Set)
Nested Class Summary | |
static class |
JaasSecurityManager.DomainInfo (src)
The authentication cache object. |
Field Summary | |
protected Logger (src) |
log
The log4j category for the security manager domain |
protected boolean |
trace
|
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean (src) |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
JaasSecurityManager()
Creates a default JaasSecurityManager for with a securityDomain name of 'other'. |
|
JaasSecurityManager(java.lang.String securityDomain,
javax.security.auth.callback.CallbackHandler handler)
Creates a JaasSecurityManager for with a securityDomain name of that given by the 'securityDomain' argument. |
Method Summary | |
protected boolean |
doesRoleGroupHaveRole(java.security.Principal role,
java.security.acl.Group userRoles)
Check that the indicated application domain role is a member of the user's assigned roles. |
boolean |
doesUserHaveRole(java.security.Principal principal,
java.security.Principal role)
Validates operational environment Principal against the specified application domain role. |
boolean |
doesUserHaveRole(java.security.Principal principal,
java.util.Set rolePrincipals)
Does the current Subject have a role(a Principal) that equates to one of the role names. |
void |
flushCache()
Not really used anymore as the security manager service manages the security domain authentication caches. |
javax.security.auth.Subject |
getActiveSubject()
Get the currently authenticated Subject. |
java.security.Principal |
getPrincipal(java.security.Principal principal)
Map the argument principal from the deployment environment principal to the developer environment. |
java.lang.String |
getSecurityDomain()
Get the name of the security domain associated with this security mgr. |
java.util.Set |
getUserRoles(java.security.Principal principal)
Return the set of domain roles the principal has been assigned. |
boolean |
isValid(java.security.Principal principal,
java.lang.Object credential)
Validate that the given credential is correct for principal. |
boolean |
isValid(java.security.Principal principal,
java.lang.Object credential,
javax.security.auth.Subject activeSubject)
Validate that the given credential is correct for principal. |
void |
setCachePolicy(CachePolicy (src) domainCache)
The domainCache is typically a shared object that is populated by the login code(LoginModule, etc.) and read by this class in the isValid() method. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, startService, stop, stopService |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src) |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Logger (src) log
protected boolean trace
Constructor Detail |
public JaasSecurityManager()
public JaasSecurityManager(java.lang.String securityDomain, javax.security.auth.callback.CallbackHandler handler)
securityDomain
- the name of the security domainhandler
- the JAAS callback handler instance to use
java.lang.reflect.UndeclaredThrowableException
- thrown if handler does not
implement a setSecurityInfo(Princpal, Object) methodMethod Detail |
public void setCachePolicy(CachePolicy (src) domainCache)
isValid(Principal, Object)
public void flushCache()
public java.lang.String getSecurityDomain()
getSecurityDomain
in interface AuthenticationManager (src)
public javax.security.auth.Subject getActiveSubject()
getActiveSubject
in interface AuthenticationManager (src)
AuthenticationManager.isValid(java.security.Principal, Object)
,
AuthenticationManager.isValid(java.security.Principal, Object, javax.security.auth.Subject)
public boolean isValid(java.security.Principal principal, java.lang.Object credential)
isValid
in interface AuthenticationManager (src)
principal
- - the security domain principal attempting accesscredential
- - the proof of identity offered by the principal
public boolean isValid(java.security.Principal principal, java.lang.Object credential, javax.security.auth.Subject activeSubject)
isValid
in interface AuthenticationManager (src)
principal
- - the security domain principal attempting accesscredential
- the proof of identity offered by the principalactiveSubject
- - if not null, a Subject that will be populated with
the state of the authenticated Subject.
public java.security.Principal getPrincipal(java.security.Principal principal)
getPrincipal
in interface RealmMapping (src)
principal
- the caller principal as known in the operation environment.
public boolean doesUserHaveRole(java.security.Principal principal, java.util.Set rolePrincipals)
doesUserHaveRole
in interface RealmMapping (src)
principal
- - ignored. The current authenticated Subject determines
the active user and assigned user roles.rolePrincipals
- - a Set of Principals for the roles to check.
java.security.acl.Group;
,
Subject.getPrincipals()
public boolean doesUserHaveRole(java.security.Principal principal, java.security.Principal role)
principal
- - the caller principal as known in the operation environment.role
- - the application domain role that the principal is to be validated against.
public java.util.Set getUserRoles(java.security.Principal principal)
getUserRoles
in interface RealmMapping (src)
protected boolean doesRoleGroupHaveRole(java.security.Principal role, java.security.acl.Group userRoles)
role
- , the application domain role required for accessuserRoles
- , the set of roles assigned to the user
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |