9 Replies Latest reply on Mar 28, 2012 3:43 AM by Jason Porter

    How to use existing JpaIdentityStore

    Bernhard Hurzeler Novice

      Hey there,

      I have an existing JPAIdentityStore produced by the Seam 3 Sample Security application. I would like to reuse it. This means I have 2 persistence units one for my webapp and one for the JPAIdentityStore. How do I configure Seam Security so that it knows how to talk to the 2nd peristence unit in terms of security?

       

      My beans.xml currently looks something like this:

       

      <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:s="urn:java:ee" xmlns:security="urn:java:org.jboss.seam.security"
      xmlns:plidm="urn:java:org.jboss.seam.security.management.picketlink"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://jboss.org/schema/cdi/beans_1_0.xsd">
      <interceptors>
        <class>org.jboss.seam.transaction.TransactionInterceptor</class>
        <class>org.jboss.seam.security.SecurityInterceptor</class>
      </interceptors>

      <security:IdentityImpl>
        <s:modifies />
        <security:authenticatorClass>org.jboss.seam.security.management.IdmAuthenticator
        </security:authenticatorClass>
        <!-- security:authenticatorClass>com.icm.ip.security.DBAuthenticator </security:authenticatorClass -->
      </security:IdentityImpl>

       

          <plidm:JpaIdentityStoreConfiguration>
             <s:replaces />
             <plidm:identityClass>com.icm.ip.security.IdentityObject</plidm:identityClass>
             <plidm:credentialClass>com.icm.ip.security.IdentityObjectCredential</plidm:credentialClass>
             <plidm:relationshipClass>com.icm.ip.security.IdentityObjectRelationship</plidm:relationshipClass>
             <plidm:roleTypeClass>com.icm.ip.security.IdentityRoleName</plidm:roleTypeClass>
             <plidm:attributeClass>com.icm.ip.security.IdentityObjectAttribute</plidm:attributeClass>
           </plidm:JpaIdentityStoreConfiguration>
      </beans>

       

      But perhaps I don't even need my own classes.

      I need help!

      Thanks