users@glassfish.java.net

Re: ORB authentication

From: <forums_at_java.net>
Date: Tue, 24 May 2011 04:21:53 -0500 (CDT)

I finally managed to get authentication working...

First of all, make sure you provide the server's JARs in your classpath. As a
maven freak I included "glassfish-embedded-all" and it would NOT work. Make
sure you point to gf-client.jar. If anymone knows which is the maven artifact
to add, I would be more than glad.

make sure to include this in your *sun-ejb-jar.xml* (or
*glassfish-ejb-jar.xml*) :

    <ejb>
      <ejb-name>BatchServiceBean</ejb-name>
      <ior-security-config>
        <as-context>
          <auth-method>USERNAME_PASSWORD</auth-method>
          <realm>default</realm>
          <required>true</required>
        </as-context>
      </ior-security-config>
    </ejb>
I didn't see this information in the different articles I've read. I guess it
wouldn't be a bad idea to point this out. Note that for some reason, if I put
"fileRealm" as the realm value, it does not work. Even though fileRealm is
the default realm... God knows why.
Now, is there anyway to "bullk activate" the athentication for all my beans?
Because with this, it looks like I'll have to copy the "ior-security-config"
for all my EJBs.


--
[Message sent by forum member 'Roinou']
View Post: http://forums.java.net/node/805069