java.lang.Object
org.apache.axis.handlers.BasicHandler
org.jboss.net.axis.server.JBossAuthorizationHandler
- All Implemented Interfaces:
- org.apache.axis.Handler, java.io.Serializable
- public class JBossAuthorizationHandler
- extends org.apache.axis.handlers.BasicHandler
AuthorizationHandler that checks allowed and denied roles against the active
subject using a given realmMapping. Is somehow redundant to what, e.g., the JBoss EJB invocation handler
does, but maybe we need this to shield access to other container resources
such as MBeans for which we will expose security-agnostic providers.
Change History
- jung, 15.03.2002: Added security domain option.
To Do
- jung, 14.03.2002: Cache simple principals. Principal factory for
interacting with various security domains.
- Version:
- $Revision: 1.1 $
| Methods inherited from class org.apache.axis.handlers.BasicHandler |
canHandleBlock, cleanup, generateWSDL, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
realmMapping
protected org.jboss.security.RealmMapping realmMapping
- the security domain against which we call
rolesAllowed
protected final java.util.Set rolesAllowed
- the roles that we want to let through
rolesDenied
protected final java.util.Set rolesDenied
- the roles that we want to deny access
isInitialised
protected boolean isInitialised
- whether this handler has been initialized
JBossAuthorizationHandler
public JBossAuthorizationHandler()
initialise
protected void initialise()
throws org.apache.axis.AxisFault
- initializes the roles checked by this handler
getPrincipal
protected java.security.Principal getPrincipal(java.lang.String userName)
- creates a new principal belonging to the given username,
override to adapt to specific security domains.
getAssociatedPrincipals
protected java.util.Collection getAssociatedPrincipals(org.apache.axis.MessageContext msgContext)
- returns a collection of principals that the context subject
is associated with
doesUserHaveRole
protected boolean doesUserHaveRole(java.security.Principal principal,
java.util.Set roles)
- return whether the given Principal has the given roles
invoke
public void invoke(org.apache.axis.MessageContext msgContext)
throws org.apache.axis.AxisFault
- Authenticate the user and password from the msgContext. Note that
we do not disassociate the subject here, since that would have
to be done by a separate handler in the response chain and we
currently expect Jetty or the WebContainer to do that for us