7 Replies Latest reply on Jun 16, 2009 11:29 AM by joe_the_quick

    Seam security with Glassfish JAAS Realm

    thejavafreak

      Dear all,


      Has anyone been able to use Glassfish JAAS realm with Seam security? Or does the Seam JAAS only works with JBoss AS?


      thanks in advance

        • 1. Re: Seam security with Glassfish JAAS Realm
          shane.bryzak

          You can use any JAAS configuration, this is described in the security chapter of the docs.  Just set jaas-config-name to whichever policy you want to use.

          • 2. Re: Seam security with Glassfish JAAS Realm
            mmartin

            I tried to setup JAAS security in glassfish setting the value


            <security:identity authenticate-method="#{authenticator.authenticate}" jaas-config-name="file" />
            



            but doesn't work correctly. I don't know if I must do something more!


            Thanks a lot!

            • 3. Re: Seam security with Glassfish JAAS Realm
              chadws

              Did you ever get this to work? I am having the same problem and am hoping to get it working soon.

              • 4. Re: Seam security with Glassfish JAAS Realm
                mmartin

                I couldn't get this to work. I tried a complex Seam application ni Glassfish V2 and the only thing that I couldn't get to work was that. To me is a very important thing because I need some applications to work under the same Realm to make SSO.


                Let me know if you are success with that.


                Thank you!

                • 5. Re: Seam security with Glassfish JAAS Realm
                  chadws

                  I believe the problem is that the Glassfish JAAS LDAP module does not use the standard JAAS callbacks, but rather some custom fields set by the glassfish server. It appears that it is intended to be used only by the container and not as an independent JAAS login module. I have thought about implementing the missing code so that it would work in both situations, but have not had the time.

                  • 6. Re: Seam security with Glassfish JAAS Realm
                    thejavafreak

                    I think that Seam JAAS module only works on JBoss.

                    • 7. Re: Seam security with Glassfish JAAS Realm
                      I have the same problem with a JAAS Realm in Tomcat:

                      I've configured a MemoryRealm in Tomcat (using context.xml), but the trouble is that the Realm does not have a name, so I cannot quote it in the jaas-config-name.
                      Has anybody succeeded in getting Tomcat Realms to work with Jboss Seam?

                      There has been a bug related to this in JIRA:
                      https://jira.jboss.org/jira/browse/JBSEAM-967

                      But however the bug has been closed with no concrete resolution hints.

                      The realm declaration in Context.xml:
                      <Context ...>...
                      <Realm name="customRealm" className="org.apache.catalina.realm.MemoryRealm"
                                      pathname="conf/custom-users.xml" />
                      </Context>