Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Websphere, RAP and Principal(Where are my principals ?)
Websphere, RAP and Principal [message #642710] Thu, 02 December 2010 13:17 Go to next message
Opfermann C is currently offline Opfermann CFriend
Messages: 53
Registered: July 2009
Location: Annecy
Member
Hi,

I'm facing an issue when trying to log my users using the J2EE authentication.
Indeed, when I watch in debug mode, I can find my Principal on the HTTPRequest object in the BridgeServlet.
But when I try to access it in the application (inside the RAP framework) using RWT.getRequest().getUserPrincipal() it doesn't work on Websphere.

This was tried under Tomcat and it work because the Principal are stored in the Request. But in Webpshere, the Principal are stored in a context that seems not to be accessible by the RAP application.

Maybe there is an option to launch the RAP framework using the same thread/classloader as Websphere ?

Has anybody already tried and succeed in getting the Principals in the application under Websphere ?
Re: Websphere, RAP and Principal [message #642850 is a reply to message #642710] Thu, 02 December 2010 23:39 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

you'll have to obtain the principal from the request thread like this:

RWT.requestThreadExec( new Runnable() {
run() {
RWT.getRequest().getUserPrincipal();
}
} );

See also:

253963: Support integration with EJB
https://bugs.eclipse.org/bugs/show_bug.cgi?id=253963


Regards, Ralf

--
Ralf Sternberg

Twitter: http://twitter.com/ralfstx
Blog: http://www.eclipsesource.com/blogs/

Professional support for RAP and RCP?
http://www.eclipsesource.com/support/
Re: Websphere, RAP and Principal [message #650082 is a reply to message #642850] Fri, 21 January 2011 16:42 Go to previous messageGo to next message
Opfermann C is currently offline Opfermann CFriend
Messages: 53
Registered: July 2009
Location: Annecy
Member

Hi,

Thank you for your answer which solves my authentication issue.
I succeed accessing to Principal.

Now, I'm facing an issue when trying to invoke a secured remote EJB.

The Subject does not seem to be propagated by the container.
Credentials are not put on the request so EJB can not be invoked.

I try to access Subject in RAP application and on request thread without success. It is always null or empty.

Do you have clues about this issue?
Thank you.
Re: Websphere, RAP and Principal [message #650170 is a reply to message #650082] Sat, 22 January 2011 09:51 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

I'm afraid I can't help with this issue. But if the requestThreadExec()
workaround does not help, it might not be a RAP issue at all. Have you
tried to access the Subject from a normal servlet? If you can reproduce
your problem with a servlet, chances are that you get more insight on a
Java EE forum.

Best regards, Ralf

--
Ralf Sternberg

Twitter: @ralfstx
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:RWT.getLocale() in Threads
Next Topic:RAP or E4
Goto Forum:
  


Current Time: Fri Apr 19 22:20:07 GMT 2024

Powered by FUDForum. Page generated in 0.03208 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top