1 Reply Latest reply on Aug 9, 2005 5:20 AM by peter

    authentication issue

    peter Apprentice

      Hi

      I am trying to integrate jboss portal with one internal project. Due to the two system has different user database, i need to combine them. The problems are:

      (1)for jbossportal, when the users register as eg. ABC, the internal system need ABC@example.com as its user name.
      I am planing the integration and find out what is needed to do.

      (a)change the UserPortlet to adapte my internal system by adding "@example.com" properly
      (b)when user login through web, i need to modify the following to by using concat(username,"@example.com").


      <application-policy name="portal">
      <authentication>
      <login-module code="org.jboss.portal.core.security.jaas.HibernateLoginModule" flag="required">
      <module-option name="unauthenticatedIdentity">guest</module-option>
      <module-option name="hashAlgorithm">MD5</module-option>
      <module-option name="hashEncoding">HEX</module-option>
      <module-option name="factoryJNDIName">java:/portal/SessionFactory</module-option>
      <module-option name="principalsQuery">SELECT u.password FROM UserImpl AS u WHERE u.userName=:username</module-option>
      <module-option name="rolesQuery">SELECT g.name FROM UserImpl AS u LEFT JOIN u.roles AS g WHERE u.userName=:username</module-option>
      <module-option name="additionalRole">Authenticated</module-option>
      <module-option name="password-stacking">useFirstPass</module-option>
      </login-module>
      </authentication>
      </application-policy>

      To:

      <application-policy name="portal">
      <authentication>
      <login-module code="org.jboss.portal.core.security.jaas.HibernateLoginModule" flag="required">
      <module-option name="unauthenticatedIdentity">guest</module-option>
      <module-option name="hashAlgorithm">MD5</module-option>
      <module-option name="hashEncoding">HEX</module-option>
      <module-option name="factoryJNDIName">java:/portal/SessionFactory</module-option>
      <module-option name="principalsQuery">SELECT u.password FROM UserImpl AS u WHERE u.userName=:concat(username,'@example.com')</module-option>
      <module-option name="rolesQuery">SELECT g.name FROM UserImpl AS u LEFT JOIN u.roles AS g WHERE u.userName=:concat(username,'@example.com')</module-option>
      <module-option name="additionalRole">Authenticated</module-option>
      <module-option name="password-stacking">useFirstPass</module-option>
      </login-module>
      </authentication>
      </application-policy>



      Is this a good way to do?

      regards
      Yang