[
http://jira.jboss.com/jira/browse/JBAS-5356?page=all ]
Stefan Guilhen closed JBAS-5356.
--------------------------------
Fix Version/s: JBossAS-5.0.0.CR1
(was: JBossAS-5.0.0.CR2)
Resolution: Done
Examples of definitions of security domains as microcontainer beans can now be found in
testsuite/src/resources/security/jaassecdomain-tests-beans.xml. The
JaasSecurityDomainUnitTestCase has been enhanced to test the security domains specified in
this file.
There is one interesting thing to notice about security domain beans: the code hasn't
been annotated with @JMX because this hardcodes the name of the exported mbean, meaning
that only one security domain instance would be reachable through the MBeanServer.
Instead, we introduce this annotation on a per domain basis using the <annotation>
element:
<bean name="JaasSecDomain:ExampleDomain"
class="org.jboss.security.plugins.JaasSecurityDomain">
<constructor>
<parameter>ExampleDomain</parameter>
</constructor>
<property name="keyStorePass">unit-tests</property>
<property name="salt">abcdefgh</property>
<property name="iterationCount">13</property>
<!-- introduce a JMX annotation to export this bean as an MBean -->
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.security:service=JaasSecDomain,domain=ExampleDomain",exposedInterface=org.jboss.security.plugins.JaasSecurityDomainMBean.class)</annotation>
</bean>
This allows us to export each domain using an specific name. In the example above, the
specified domain is exported under the
"jboss.security:service=JaasSecDomain,domain=ExampleDomain" name. Domains that
don't need to be exported simply don't specify a JMX annotation using the
<annotation> element.
Make JaasSecurityDomain a bean
------------------------------
Key: JBAS-5356
URL:
http://jira.jboss.com/jira/browse/JBAS-5356
Project: JBoss Application Server
Issue Type: Task
Security Level: Public(Everyone can see)
Components: Security
Affects Versions: JBossAS-5.0.0.Beta4
Reporter: Anil Saldhana
Assigned To: Stefan Guilhen
Fix For: JBossAS-5.0.0.CR1
Just the way XMLLoginConfig was made into a bean with an additional @JMX annotation,
JaasSecurityDomain needs to be made into a bean. Any internal attributes that use
ObjectNames (if any) need to be injectable.
The AS test suite has usage of JaasSecurityDomain as an MBean Service. Just replace some
of them into beans and leave the rest as services such that we test both usage.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira