-
Notifications
You must be signed in to change notification settings - Fork 0
JBoss AS 7 Modifications
This page gives an overview on necessary changes to JBoss AS 7.1.x
Download and install JBoss AS 7.1.0.Final. You could use JBoss AS 7.1.1.Final, but there are [issues with the included JSF implementation] (https://issues.jboss.org/browse/AS7-4366), so you would have to replace the corresponding modules yourself.
- Download [MySQL Connector/J] (http://dev.mysql.com/downloads/connector/j)
- Create a driver module as described in [Installing a JDBC driver as a module] (https://community.jboss.org/wiki/DataSourceConfigurationInAS7#Installing_a_JDBC_driver_as_a_module)
- Go to the modules/org/picketlink/main directory and delete all jar files in it.
- Download Picketlink 2.1.4 jars for JBoss AS 7.1.x here: picketlink-core-2.1.4.Final.jar and picketlink-jbas7-2.1.4.Final.jar
- Copy both Picketlink 2.1.4 jars into modules/org/picketlink/main directory
- In modules/org/picketlink/main do the following changes to the module.xml file :
<module xmlns="urn:jboss:module:1.1" name="org.picketlink"> <resources> <resource-root path="picketlink-core-2.1.4.Final.jar"/> <resource-root path="picketlink-jbas7-2.1.4.Final.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.security.auth.message.api"/> <module name="javax.security.jacc.api"/> <module name="javax.transaction.api"/> <module name="javax.xml.bind.api"/> <module name="javax.xml.stream.api"/> <module name="javax.servlet.api"/> <module name="org.jboss.common-core"/> <module name="org.jboss.logging"/> <module name="org.jboss.as.web"/> <module name="org.jboss.security.xacml"/> <module name="org.picketbox"/> <module name="javax.xml.ws.api"/> <module name="org.apache.log4j"/> <module name="org.apache.santuario.xmlsec"/> </dependencies> </module>
To allow uploads of big sample files, increase the transaction timeout
<subsystem xmlns="urn:jboss:domain:transactions:1.1">
<core-environment>
<process-id>
<uuid/>
</process-id>
</core-environment>
<recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
<coordinator-environment default-timeout="1200"/>
</subsystem>
Under <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1"> add the attribute deployment-timeout="300" to the deployment-scanner tag:
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="300"/>
Some of the pages in Plato use big forms which can cause problems (exceptions) when they are validated. To avoid this add following lines in standalone.xml after the <extensions>...</extensions> part.
<system-properties>
<property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="10000"/>
</system-properties>
In standalone.xml add the following security-domains to the <subsystem xmlns="urn:jboss:domain:security:1.1">, <security-domains> .
<security-domain name="idp" cache-type="default">
<authentication>
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
<module-option name="unauthenticatedIdentity" value="guest"/>
<module-option name="dsJndiName" value="java:jboss/datasources/idpDatasource"/>
<module-option name="principalsQuery" value="SELECT password FROM IdpUser WHERE username=? AND status='ACTIVE'"/>
<module-option name="rolesQuery" value="SELECT r.rolename as Role, 'Roles' as RoleGroup FROM IdpUser u, IdpUser_IdpRole ur, IdpRole r WHERE u.username=? and ur.user_id = u.id and ur.roles_id = r.id order by r.rolename"/>
<module-option name="hashAlgorithm" value="MD5"/>
<module-option name="hashEncoding" value="hex"/>
</login-module>
</authentication>
</security-domain>
<security-domain name="sp" cache-type="default">
<authentication>
<login-module code="org.picketlink.identity.federation.bindings.jboss.auth.SAML2LoginModule" flag="required"/>
</authentication>
</security-domain>
You have to add datasource definitions for your applications. Adjust the passwords and users to ones you created for Planning Suite and IDP
For Planning Suite
<datasource jta="true" jndi-name="java:jboss/datasources/platoDatasource" pool-name="platoDatasource" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/platodb?useUnicode=true&connectionCollation=utf8_general_ci&characterSetResults=utf8&characterEncoding=UTF-8</connection-url>
<driver>mysql</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>plato</user-name>
<password>plato</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<use-fast-fail>false</use-fast-fail>
</validation>
<statement>
<prepared-statement-cache-size>500</prepared-statement-cache-size>
<share-prepared-statements>Ltrue</share-prepared-statements>
</statement>
</datasource>
For IDP:
<datasource jta="true" jndi-name="java:jboss/datasources/idpDatasource" pool-name="idpDatasource" enabled="true" use-java-context="true" use-ccm="true">
<connection-url>jdbc:mysql://localhost:3306/idpdb?useUnicode=true&connectionCollation=utf8_general_ci&characterSetResults=utf8&characterEncoding=UTF-8</connection-url>
<driver>mysql</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
<prefill>true</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>idp</user-name>
<password>idp</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
<use-fast-fail>false</use-fast-fail>
</validation>
<statement>
<prepared-statement-cache-size>500</prepared-statement-cache-size>
<share-prepared-statements>Ltrue</share-prepared-statements>
</statement>
</datasource>