Replacement for principal name "ANONYMOUS"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Replacement for principal name "ANONYMOUS"

forums-8
One of our MDBs invokes a SB. That SB is using
getCallerPrincipal().getName(). That always returns "ANONYMOUS". How can we
replace that with another user name? We provided @RunAs("System") to the MDB
and mapped a single principal in glassfish-application.xml:

<security-role-mapping> <role-name>System</role-name>
<principal-name>Foo</principal-name> </security-role-mapping>
Unfortunately this has no effect, we still get "ANONYMOUS". Also, we provided
a Default Principal and Default Principal Password in the adming GUI, with
neither effect.

What is the correct and working way to tell GFv3.1.1_b11 that each time
@RunAs("System") is used, getCallerPrincipal().getName() shall return "Foo"
but not "ANONYOUS"?


--

[Message sent by forum member 'mkarg']

View Post: http://forums.java.net/node/826153


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Replacement for principal name "ANONYMOUS"

forums-8
quote from ejb spec section 17.2.5.1 Use of getCallerPrincipal:

Note that getCallerPrincipal returns the principal that represents the caller
of the
enterprise bean, not the principal that corresponds to the run-as security
identity for the bean,
if any.


--

[Message sent by forum member 'cf126330']

View Post: http://forums.java.net/node/826153


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Replacement for principal name "ANONYMOUS"

lyuboe
This post has NOT been accepted by the mailing list yet.
This post was updated on .
forums-8, can you please explain what is the difference? It is not quite clear to me..

Thanks
Loading...