[Design of Security on JBoss] - Re: Security Injection in AS5
by sguilhen@redhat.com
Update on the metadata work:
Following Ales' pointers I was able to come up with a clean implementation of the metadata factory that generates the beans responsible for the definition of an application policy.
There are still a few details to address but I am ready to commit the code and work on the details later. As of now, it is possible to declare complete application policies and have them registered with the security layer:
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
|
| <application-policy xmlns="urn:jboss:security-beans:1.0" name="TestPolicy1">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required"/>
| </authentication>
| <authorization>
| <policy-module code="org.jboss.security.authz.AuthorizationModule" flag="required">
| <module-option name="authzOption">authz.value</module-option>
| </policy-module>
| </authorization>
| <identity-trust>
| <trust-module code="org.jboss.security.trust.IdentityTrustModule" flag="required">
| <module-option name="trustOption1">trust.value1</module-option>
| <module-option name="trustOption2">trust.value2</module-option>
| </trust-module>
| </identity-trust>
| <audit>
| <provider-module code="org.jboss.security.audit.AuditModule">
| <module-option name="auditOption">audit.value</module-option>
| </provider-module>
| </audit>
| <rolemapping>
| <mapping-module code="org.jboss.security.mapping.RoleMappingModule">
| <module-option name="mappingOption1">mapping.value1</module-option>
| <module-option name="mappingOption2">mapping.value2</module-option>
| </mapping-module>
| </rolemapping>
| </application-policy>
| ....
| </deployment>
|
JASPI authentication policies can also be declared:
| <application-policy xmlns="urn:jboss:security-beans:1.0" name="TestPolicy1">
| <authentication-jaspi>
| <login-module-stack name="ModuleStack1">
| <login-module code="org.jboss.security.auth.StackModule1" flag="required">
| <module-option name="stackOption1">stack1.value1</module-option>
| </login-module>
| <login-module code="org.jboss.security.auth.StackModule2" flag="option"/>
| </login-module-stack>
| <login-module-stack name="ModuleStack2">
| <login-module code="org.jboss.security.auth.StackModule1" flag="required">
| <module-option name="stackOption1">stack2.value1</module-option>
| <module-option name="stackOption2">stack2.value2</module-option>
| </login-module>
| </login-module-stack>
| <auth-module code="org.jboss.security.auth.AuthModule" login-module-stack-ref="ModuleStack1">
| <module-option name="authOption1">auth.value1</module-option>
| <module-option name="authOption2">auth.value2</module-option>
| </auth-module>
| </authentication-jaspi>
| </application-policy>
|
There are a few tests (I'll be working on improving the tests) that run in standalone mode and those tests add, at runtime, a binding for the security-policy schema into the SingletonSchemaResolverFactory in the setUp method. For this code to work in the AS we need add this binding permanently to XB and update the AS to use a new release of XB. I've opened a thread in the JBossXB forum to address this issue.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149151#4149151
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149151
17 years, 11 months
[Design of JBossXB] - Add schema binding to SingletonSchemaResolverFactory
by sguilhen@redhat.com
I am about to commit the implementation of a metadata factory for security policies. This factory allows for the declaration of policies in -beans.xml files using security tags:
| <deployment xmlns="urn:jboss:bean-deployer:2.0">
|
| <application-policy xmlns="urn:jboss:security-beans:1.0" name="TestPolicy1">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
| <module-option name="usersProperties">jboss-users.properties</module-option>
| <module-option name="rolesProperties">jboss-roles.properties</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
| .....
| </deployment>
|
the AppPolicyBean generated by the factory registers the application policy described with the security layer.
What I need is to add a definitive binding for the security schema to the SingletonSchemaResolverFactory for the policies to be used in the AS. In my tests I'm doing that explicitly during the setUp method:
| SingletonSchemaResolverFactory.getInstance().addJaxbSchema("urn:jboss:security-beans:1.0",
| "org.jboss.security.microcontainer.beans.metadata.SecurityPolicyMetaData");
|
Is it ok if I add myself this binding and commit it?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149139#4149139
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149139
17 years, 11 months