org.ow2.jonas.security.auth.spi
Class RoleBasedAuthorizationModule

java.lang.Object
  extended by org.ow2.jonas.security.auth.spi.RoleBasedAuthorizationModule
All Implemented Interfaces:
InvocationHandler

public class RoleBasedAuthorizationModule
extends Object
implements InvocationHandler

Authorizes a certain user to access a certain resource based on the role(s) of that user and that user's group(s).

Author:
S. Ali Tokmen

Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
          Verifies that the invoker has the right of invoking a certain method and invokes it on the MBeanServer.
static MBeanServerForwarder newProxyInstance(String type, String param)
          Returns a usable MBeanServerForwarder instance.
 void setJmxService(JmxService jmxService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newProxyInstance

public static MBeanServerForwarder newProxyInstance(String type,
                                                    String param)
Returns a usable MBeanServerForwarder instance.

Parameters:
type - MBeanServerForwarder type.
param - MBeanServerForwarder parameter, for example the access list file for the type "file".
Returns:
A usable MBeanServerForwarder instance.

setJmxService

public void setJmxService(JmxService jmxService)
Parameters:
jmxService - the jmxService to set

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws IllegalAccessException,
                     InvocationTargetException
Verifies that the invoker has the right of invoking a certain method and invokes it on the MBeanServer.

Specified by:
invoke in interface InvocationHandler
Parameters:
proxy - The proxy instance that the method was invoked on.
method - Method to invoke.
args - Arguments to give to the method.
Returns:
Result of the invocation.
Throws:
InvocationTargetException - Problem with the invocation target.
IllegalAccessException - If the current user is not allowed to invoke the given method.


Copyright © 2010 OW2 Consortium. All Rights Reserved.