views:

157

answers:

4

I have a Java Enterprise Edition web application, a standard WAR. I want to integrate this with an existing .NET infrastructure running IIS. To be specific, I need to be able to share user sessions between the two applications in some secure manner.

Is there a "standard" way of doing this?

Edit: I do not need full session sharing, sorry for not pointing that out. What I need to be able to do is to check if a user is authenticated with the .NET application when she connects to the J2EE application.

A: 

Very doubtful.

You'd have to persist session state to a third component, such as a database. I doubt that the built-in providers for either infrastructure are at all similar (as far as schemas, etc); so you'd like have to create your own.

This does not sound like it would be a fun thing to do.

matt b
Ok, my answer is probably no longer applicable now that you've clarified you are just interested in single-signon.
matt b
delete it or change it?
01
+1  A: 

Create a .NET web service (using WCF, of course) to return whether a user is authenticated. Then call that web service from the J2EE application.

John Saunders
Is there a way to do this without the user having to write in any credentials? I was thinking about some form of cookie stealing, but the same origin policy applies to ports as well as domains if I'm not mistaken..
Jacob Hansson
I don't know enough about J2EE to answer this. I presume you'd somehow have to communicate the .NET session id to Java so it could supply that in the web service call.
John Saunders
A: 

If they will run on the same server, you will need an isapi redirect filter, like the isapi_redirect.dll that comes with Tomcat.

R Ubben
A: 

This open source library, http://spnego.sourceforge.net, will enable your java app to do transparent/integrated windows authentication.

It's installed as a servlet filter so you will not have to write any code.

Pat Gonzalez