The right way to do this is to establish single sign-on at the J2EE container level between your two deployed applications.  Depending on the state being maintained, storing that data on the client using a SharedObject could be the worst solution in the world for security reasons.  In Tomcat you can use the crossContext attribute on the connector to allow session state for authenticated sessions to be shared among all of the web applications deployed in that engine.  Macromedia even provides documentation of deploying CF and using the crossContext attribute I’m suggesting (other containers have equivalents- check your container’s docs for more details):

 

http://www.macromedia.com/support/coldfusion/j2ee/cfmx7j2ee_tomcat_deploy.html

 

If you already have the apps in a single J2EE instance as you’ve described, this solution is the right choice if you have any data that is remotely sensitive in the session.  For example, on some of the apps I’ve been involved with here at Cynergy Systems we leverage single sign-on extensively.  Our web services are in a different web context then the main application.  When web service calls are made from the Flex client, we don’t transmit any user data whatsoever.  Instead, the web service receives the raw data and turns around and asks Tomcat “Hey Tomcat, which authenticated user is making this request?” and then uses their credentials as managed on the server by the server to fulfill the request.  In architecture like this one, if someone should manage to hack their way into your web services they won’t be able to get at any real data because retrieves and updates ask the container for the user details, not the caller.  The only way around this is to obtain compromised login credentials.

 

Jason

 

__________
Jason Weiss
Cynergy Systems, Inc.
Macromedia Flex Alliance Partner
http://www.cynergysystems.com


Email: jasonDOTweissATcynergysystemsDOTcom__nospam
Office: 866-CYNERGY

 

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Matt Chotin
Sent: Wednesday, November 30, 2005 10:27 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Maintaining Session Data/Passing data to other apps

 

Have you looked into SharedObject, if you’re hitting the same domain that should allow you to share data across SWFs.

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of smi295
Sent: Wednesday, November 30, 2005 2:35 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Maintaining Session Data/Passing data to other apps

 

Hi,

I'm developing an app at the moment which maintains user info for a
suite of applications. It works by authenticating and retrieving user
information then redirecting to the target application. The problem is
i was hoping the session data would be maintained between the apps, as
i would use redirection ( getUrl('http://www.hotmail.com') within the
same browser, but the session data gets destroyed between the two. How
can i maintain the session data? An alternative would be some method
to pass data between the apps, but the data is sensitive, so i can't
use query string parameters e.g 
http://localhost:8101/flex/charts/PieChart1.mxml?
fname=Reiner&lname=Knizia


The app i am redirecting to is another j2ee instance on the same
server.

I am using CF7 and Flex 1.5

Can anyone help?

Regards,

Scott









--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to