views:

29

answers:

3

This question is more towards Design and Architecture and I want to know SO Readers think on my scenario.

I have a requirement where in my Application should provide other application interface when the user logs in to my application.

For example, lets say my application is www.gmail.com and other application is www.stackoverflow.com so what am trying to accomplish is that when the user log's in gmail account he should see his home page of stackoverflow and a particular questions.

From technology point of view, we have to use Java and so am not sure of what design and architecture consideration would go in to implement the requirement.

One Approach, am thinking on is that when the user logs in to gmail than I will populate the request object with all the login credential parameters for stackoverflow website and also question_id which would be passed in as parameter and then on Stackoverflow side, I would parse the request object and authenticate the user credentials and depending upon request parameter, I would render the question_id which I received from request.

I want to know what would be best approach and issues encountered in designing such an system.

Edit

After seeing all the answer, I would like to add little update to my question. What I am looking for is to get the feel of issues and challenges what I would have to face while trying to accomplish my task, also I am using Java and am not sure how can I accomplish my goal using Java as we do not have something like OLE which we have in Microsoft Technology stack to achieve the task.

Hope I am making some sense here.

A: 

You can't definitely do that at client side or java script as it will lead to cross site scripting issues. Or you can use iframes (which isdeprecated).

The other way of doing it would be to have your own interface/UI for the application and use only the service layer from your back end (java/j2ee in your case) which you may end up duplicating all the front end again (on the positive side, you will get your own branding of the site).

Regarding credentialing all most all the sites now used "OAuth" or similar and it should not be that difficult for authorizing

Teja Kantamneni
Actually, here both application are in house for fortune 500 corporate but has different user base, just to add context to the question.
Rachel
@Rachel, Understood even if they are in house if they are in two different sub domains you will have the same problems, but for other parts you will have some flexibility modifying for your needs
Teja Kantamneni
A: 

If both applications are web-based in-house applications, you could write a master login component, independent of either application, that will perform the user authentication, load any useful data it can at login time, and send the user's browser to the correct URL, making sure to pass any relevant information to the target app (as part of the forwarding request or behind the scenes in some distributed shared memory). Just a thought.

Yuval
A: 

I can think of three ways you could solve this.

  • Implement single sing-on. You log-in to all enterprise applications, and once logged all of them use the same authentication credentials (I think this is the best option. you don't need a full-fledge SSO, at least for these two application you could use the same credential validation mechanism)

  • You could also do what your are proposing creating the authentication credential for the user (i.e a cookie) and then do a redirect. Keep in mind that both application will need to be in the same sub-domain in order to work.

  • As mentioned before, you could also expose through your application the data/services you want to consume from the other application.

In my company we have what we call "Graphical Services", which are managed by a central server which also do credential validation, if the credentials are right it display a user interface for the user (generally in a Pop-up or an iframe).

Hope it helps.

mfcabrera