5 Replies Latest reply on Oct 24, 2007 10:19 AM by Shane Bryzak

    Seam + SingleSignON

    Diego Coronel Apprentice


      Im trying to use singleSignOn with seam, i have lots of plugable modules, and i need to use my SecurityModule to log in users, i tried to edit \jboss-web.deployer\server.xml to use

      <Valve className="org.apache.catalina.authenticator.SingleSignOn" />

      But when im in another module i tried to write
       Logado: #{identity.loggedIn}<br />
       Username: #{identity.username}
       Principal: #{identity.principal.name}

      and my result is false, empty, empty, but in my SecurityModule these results are correct, my problem is that im not using EAR, just war and jar (my decision, because SPI - Java 6), and i need to login 1 time and use this Principal and Roles in another modules, how can i do it ??

      Im using:
      - Seam RC1
      - JBoss 4.2.1
      - Windows XP
      - Java 6

      Sry about my english...

        • 1. Re: Seam + SingleSignON
          Diego Coronel Apprentice

          Anyone ?? i wanna do something like JDBC..Realm, i did it in another applications without Seam and its perfect. But with Seam Authenticator the SingleSignOn valve is not working, any suggestion ?? is there any possibility to do it with seam ?? i have 2 war, ModuleSecutity and PresentationModule, my login is in ModuleSecutity and i want my PresentationModule acessing Identify from ModuleSecutity.... anyone pls ?? its really necessary in my projects. ty

          • 2. Re: Seam + SingleSignON
            Diego Coronel Apprentice

            more information...
            This is my SecurityModule

             - Component (org.jboss.seam.security.identity)
            authenticateEveryRequest false
            authenticateMethod org.jboss.seam.core.Expressions$2@4b72a2
            class class org.jboss.seam.security.RuleBasedIdentity
            cookieEnabled false
            cookieMaxAge 31536000
            cookiePath /fmtam_idoctor_web
            credentialsSet false
            loggedIn true
            principal reter
            rememberMe false
            securityContext org.drools.reteoo.ReteooStatefulSession@152fd52
            securityRules org.drools.reteoo.ReteooRuleBase@175249c
            subject Subject: Principal: reter Principal: org.jboss.seam.security.SimpleGroup@4b79e9d
            username Diego
            toString() org.jboss.seam.security.RuleBasedIdentity@13b8970

            and this is my another module

            - Component (org.jboss.seam.security.identity)
            authenticateEveryRequest false
            class class org.jboss.seam.security.RuleBasedIdentity
            cookieEnabled false
            cookieMaxAge 31536000
            cookiePath /fmtam_seguranca_web
            credentialsSet false
            loggedIn false
            rememberMe false
            subject Subject:
            toString() org.jboss.seam.security.RuleBasedIdentity@38a3ca

            obs: i just have 1 authenticator class,

            public class Authenticator implements IAuthenticator {
             Log log;
             Identity identity;
             public boolean authenticate() {
             System.out.println("Iniciando login SESSION");
             log.info("authenticating #0", identity.getUsername());
             System.out.println("finalizando login");
             return true;
             public Identity getIdentity() {
             return identity;
             public void setIdentity(Identity identity) {
             this.identity = identity;
             public void remove(){
             System.out.println("Destruindo stateful");

            if i enable my cookie or set my cookiePath/fmtam_idoctor_web in all applications, my singleSignOn will work ? how can i do it ?

            • 3. Re: Seam + SingleSignON
              Diego Coronel Apprentice

              so, i need suggestions, pls, anyone can tell me if its possible with seam ? i need to log in /system1 and in another module like /system2 use the roles from system1/ like login at once and use these roles in all modules ? if i do it using

              <Realm className="org.apache.catalina.realm.DataSourceRealm" debug="99"
               userTable="users" userNameCol="user_name" userCredCol="user_pass"
               userRoleTable="user_roles" roleNameCol="role_name"/>

              can i use jboss EL like hasRole('anyRole') ? any suggestion ?

              • 4. Re: Seam + SingleSignON
                Diego Coronel Apprentice

                Seam Team, :)

                Is there any solution for me ? should i believe i cant do it ? or my english is so bad that you cant understand ? ill be really happy with some suggestions.

                • 5. Re: Seam + SingleSignON
                  Shane Bryzak Master

                  I don't really understand the issue, however Seam Security currently has no explicit support for single sign on. We intend to provide integration with JBoss SSO, however this is on hold for now. You can track its progress here: