[Jboss-cvs] JBossAS SVN: r55396 - trunk/testsuite/src/resources/jmx/jmxadaptor

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 8 00:07:23 EDT 2006


Author: anil.saldhana at jboss.com
Date: 2006-08-08 00:07:21 -0400 (Tue, 08 Aug 2006)
New Revision: 55396

Added:
   trunk/testsuite/src/resources/jmx/jmxadaptor/authorization-jmx-invoker-service.xml
   trunk/testsuite/src/resources/jmx/jmxadaptor/jaas-service.xml
   trunk/testsuite/src/resources/jmx/jmxadaptor/jmxinvoker-roles.properties
Log:
JBAS-3203: resources for test case

Added: trunk/testsuite/src/resources/jmx/jmxadaptor/authorization-jmx-invoker-service.xml
===================================================================
--- trunk/testsuite/src/resources/jmx/jmxadaptor/authorization-jmx-invoker-service.xml	2006-08-08 04:04:13 UTC (rev 55395)
+++ trunk/testsuite/src/resources/jmx/jmxadaptor/authorization-jmx-invoker-service.xml	2006-08-08 04:07:21 UTC (rev 55396)
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--$Id: authorization-jmx-invoker-service.xml 44773 2006-05-10 20:37:43Z asaldhana $ -->
+<server>
+
+   <!-- Roles are configured on the invoker -->
+   <mbean code="org.jboss.jmx.connector.invoker.InvokerAdaptorService"
+          name="jboss.security.test:type=adaptor,name=Invoker,access=ConfigurableRolesAuthorized"
+      xmbean-dd="">
+      <xmbean>
+         <description>The JMX Detached Invoker Service</description>
+         <class>org.jboss.jmx.connector.invoker.InvokerAdaptorService</class>
+
+         <!-- Attributes -->
+         <attribute access="read-only" getMethod="getName">
+            <description>The class name of the MBean</description>
+            <name>Name</name>
+            <type>java.lang.String</type>
+         </attribute>
+         <attribute access="read-only" getMethod="getState">
+            <description>The status of the MBean</description>
+            <name>State</name>
+            <type>int</type>
+         </attribute>
+         <attribute access="read-only" getMethod="getStateString">
+         <description>The status of the MBean in text form</description>
+            <name>StateString</name>
+            <type>java.lang.String</type>
+         </attribute>
+         <attribute access="read-write" getMethod="getExportedInterfaces" setMethod="setExportedInterfaces">
+            <description>The interfaces the invoker proxy supports</description>
+            <name>ExportedInterfaces</name>
+            <type>[Ljava.lang.Class;</type>
+         </attribute>
+         <attribute access="read-only" getMethod="getMethodMap">
+            <description>Map(Long hash, Method) of the proxy interface methods</description>
+            <name>MethodMap</name>
+            <type>java.util.Map</type>
+         </attribute>
+         <!-- Operations -->
+         <operation>
+            <description>The start lifecycle operation</description>
+            <name>start</name>
+         </operation>
+         <operation>
+            <description>The stop lifecycle operation</description>
+            <name>stop</name>
+         </operation>
+         <operation>
+            <description>The detyped lifecycle operation (for internal use only)</description>
+            <name>jbossInternalLifecycle</name>
+            <parameter>
+               <description>The lifecycle operation</description>
+               <name>method</name>
+               <type>java.lang.String</type>
+            </parameter>
+            <return-type>void</return-type>
+         </operation>
+
+         <operation>
+            <description>The detached invoker entry point</description>
+            <name>invoke</name>
+            <parameter>
+               <description>The method invocation context</description>
+               <name>invocation</name>
+               <type>org.jboss.invocation.Invocation</type>
+            </parameter>
+            <return-type>java.lang.Object</return-type>
+            <descriptors>
+               <interceptors>
+                  <interceptor code="org.jboss.jmx.connector.invoker.AuthenticationInterceptor"
+                     securityDomain="java:/jaas/subject-context"/>
+                  <interceptor code="org.jboss.jmx.connector.invoker.AuthorizationInterceptor"
+                     authorizingClass="org.jboss.jmx.connector.invoker.ExternalizableRolesAuthorization"/>
+               </interceptors>
+            </descriptors>
+         </operation>
+      </xmbean>
+      <attribute name="ExportedInterfaces">org.jboss.jmx.adaptor.rmi.RMIAdaptorExt
+      </attribute>
+   </mbean>
+
+   <mbean code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
+      name="jboss.security.test:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory,access=ConfigurableRolesAuthorized">
+      <!-- Use the standard JRMPInvoker from conf/jboss-service.xxml -->
+      <depends optional-attribute-name="InvokerName">jboss:service=invoker,type=jrmp</depends>
+      <!-- The target MBean is the InvokerAdaptorService configured below -->
+      <depends optional-attribute-name="TargetName">jboss.security.test:type=adaptor,name=Invoker,access=ConfigurableRolesAuthorized</depends>
+      <!-- Where to bind the RMIAdaptor proxy -->
+      <attribute name="JndiName">jmx/invoker/ConfigurableAuthorizedRMIAdaptor</attribute>
+      <!-- The RMI compabitle MBeanServer interface -->
+      <attribute name="ExportedInterfaces">org.jboss.jmx.adaptor.rmi.RMIAdaptorExt
+      </attribute>
+      <attribute name="ClientInterceptors">
+          <interceptors>
+             <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
+             <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
+             <interceptor>org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor</interceptor>
+             <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
+          </interceptors>
+      </attribute>
+   </mbean>
+
+</server>
\ No newline at end of file

Added: trunk/testsuite/src/resources/jmx/jmxadaptor/jaas-service.xml
===================================================================
--- trunk/testsuite/src/resources/jmx/jmxadaptor/jaas-service.xml	2006-08-08 04:04:13 UTC (rev 55395)
+++ trunk/testsuite/src/resources/jmx/jmxadaptor/jaas-service.xml	2006-08-08 04:07:21 UTC (rev 55396)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+   <!-- The custom JAAS login configuration that installs 
+       a Configuration capable of dynamically updating the
+       config settings
+   -->
+   <mbean code="org.jboss.security.auth.login.DynamicLoginConfig"
+      name="jboss.security.tests:service=LoginConfig,test=SecureRMIAdaptor">
+      <attribute name="PolicyConfig" serialDataType="jbxb">
+         <jaas:policy
+            xsi:schemaLocation="urn:jboss:security-config:4.1 resource:security-config_4_1.xsd"
+            xmlns:jaas="urn:jboss:security-config:4.1"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            >
+            <jaas:application-policy name="subject-context">
+               <jaas:authentication>
+                 <jaas:login-module code = "org.jboss.security.auth.spi.UsersRolesLoginModule"
+                         flag = "required" />
+				  <jaas:login-module 
+					  code="org.jboss.security.auth.spi.IdentityLoginModule" 
+					   flag="required">
+                      <jaas:module-option name="principal">SpecialJMXUser</jaas:module-option>
+                      <jaas:module-option name="roles">testRole</jaas:module-option>
+                  </jaas:login-module> 
+               </jaas:authentication>
+            </jaas:application-policy>
+         </jaas:policy>         
+      </attribute>
+      <depends optional-attribute-name="LoginConfigService">
+         jboss.security:service=XMLLoginConfig
+      </depends>
+      <depends optional-attribute-name="SecurityManagerService">
+         jboss.security:service=JaasSecurityManager
+      </depends>
+   </mbean>
+</server>

Added: trunk/testsuite/src/resources/jmx/jmxadaptor/jmxinvoker-roles.properties
===================================================================
--- trunk/testsuite/src/resources/jmx/jmxadaptor/jmxinvoker-roles.properties	2006-08-08 04:04:13 UTC (rev 55395)
+++ trunk/testsuite/src/resources/jmx/jmxadaptor/jmxinvoker-roles.properties	2006-08-08 04:07:21 UTC (rev 55396)
@@ -0,0 +1,2 @@
+#Specify the roles that are authorized to access the jmx invoker
+roles=testRole




More information about the jboss-cvs-commits mailing list