users@glassfish.java.net

Re: identifying EJB calling machine

From: <forums_at_java.net>
Date: Sun, 17 Apr 2011 16:02:01 -0500 (CDT)

 first, thanks for your response.

I have been investigating the matter and this is what happens:

if i secure an EJB this way:

<ejb>
<ejb-name>DataAccessEjb</ejb-name>
<jndi-name>java:global/stuff/business-0.0.1-SNAPSHOT/DataAccessEjb!com.stuff.business.DataAccessEjbRemote</jndi-name>
<ior-security-config>
<transport-config>
<integrity>REQUIRED</integrity>
<confidentiality>REQUIRED</confidentiality>
<establish-trust-in-target>SUPPORTED</establish-trust-in-target>
<establish-trust-in-client>REQUIRED</establish-trust-in-client>
</transport-config>
</ior-security-config>
</ejb>

ejbctx.getCallerPrincipal().getName() will return the web container
certificate DN. 

Is there a way for me to get the customer ID as well (the one calling the
servlet which in turns calls my EJB?)


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