Sample web application with XACML authorization for JBoss AS7 (and EAP 6)
You'll need Java 6 and also some other tools to run this demo.
We suggest usage EAP 6.1.0.Beta from JBoss AS download page
If you like to try the demo with AS 7.1.1.Final, then you have to fix file Picketbox
module file
[inst]/modules/org/picketbox/main/module.xml
. Add org.jboss.security.xacml
module dependency there
(cf. fix in repo)
Run standalone server:
$ export JBOSS_HOME=/path/to/jboss-installation
$ cd $JBOSS_HOME/bin
$ ./standalone.sh
Configure xacml-demo security domain using CLI:
$ ./jboss-cli.sh -c
and run commands:
/subsystem=security/security-domain=xacml-demo:add(cache-type=default)
/subsystem=security/security-domain=xacml-demo/authentication=classic:add(login-modules=[{"code"=>"UsersRoles", "flag"=>"required"}]) {allow-resource-service-restart=true}
/subsystem=security/security-domain=xacml-demo/authorization=classic:add(policy-modules=[{"code"=>"org.jboss.test.xacml.CustomXACMLAuthorizationModule", "flag"=>"required"}]) {allow-resource-service-restart=true}
You should have git installed
$ git clone [email protected]:jboss-security-qe/as7-xacml-demo.git
or you can download current sources as a zip file
You need also a Maven installed
$ cd as7-xacml-demo
$ mvn clean package
$ cp target/as7-xacml-demo.war "$JBOSS_HOME/standalone/deployments/"
Go to http://localhost:8080/as7-xacml-demo/ and try to login using credentials:
- admin/admin - you will get access to an index page
- user/user - you will be logged in, but access will be denied (HTTP status 403 returned)