6 Replies Latest reply on Oct 8, 2010 2:18 PM by cbrock

    errai.require_authentication_for_all

    umk

      Hello,

       

      I'm pretty new to Errai so I may have just missed something obvious but I don't understand why I'm not being challenged to authenticate when running the skeleton project (from the User Guide: http://download.jboss.org/errai/docs/1.1.0-CR2/userguide/index.html#d0e1289)

       

      The default ErraiService.properties the project generates contains "errai.require_authentication_for_all=true". And clicking the button sends a message using the bus to the server-side code - but no auth challenge.

       

      Can anyone explain this?

       

      (Errai v1.1.0-CR2)

       

      Thank you,

      Clint

        • 1. Re: errai.require_authentication_for_all
          cbrock

          In order for there to be an authentication challenge, and actual security client needs to be configured.  You must also have configured a security adapter, such as the JAAS adapter.  You can look at our "TheStore" demo for an example of this fully configured.

          • 2. Re: errai.require_authentication_for_all
            umk

            A security adapter is configured for the HelloWorld application (sandbox-archetype):

            errai.authentication_adapter=org.jboss.errai.bus.server.security.auth.JAASAdapter

             

            TheStore appears to rely on Errai Workspaces for authentication. I guess I was wondering if authentication could be used with other applications without requiring them to be Errai Workspaces. If so, can this be achieved without too much difficultly? Thanks.

            • 3. Re: errai.require_authentication_for_all
              jdestef

              Hi,

               

              Did you ever figure out if this could be done without using the Workspace?

               

              Thx

              • 4. Re: errai.require_authentication_for_all
                umk

                Nope. I was hoping to hear back from Christopher after my last message... If I find a way to do this, I'll post back here. Maybe you can do the same??

                • 5. Re: errai.require_authentication_for_all
                  jdestef

                  Will do.

                   

                  Thx

                  • 6. Re: errai.require_authentication_for_all
                    cbrock

                    Okay, the JAASAdapter is not tied to workspace.  Rather, it relies on their being an authentication client on the clientside bus to communicate with it.  We have really only implemented on in Workspaces, and we should really be documenting the protocol so people can implement their own authentication clients.

                     

                    Essentially is uses a standard messaging protocol to communicate back and forth.  That protocol can be implemented by a custom client, which was really the idea.