| By Steven Forehand, Zachary Loch | Article Rating: |
|
| October 19, 2005 09:30 AM EDT | Reads: |
26,675 |
The code above should be placed somewhere in the target application's domain. The code takes in query string parameters and writes them to the browser as cookies. It then opens a window to the target system. Since the cookies are in the browser, the session has been maintained and all is well. The only thing we need to do now is modify our original code to call this file passing the cookies instead of writing them to the browser. The format of the request is http://testsingle sign-on.com/setCookies.html?cookie=values;path=/&cookie=value;path=/. Therefore we need to take out the code that writes the cookies to the browser in our original example and add the following code:
<cfset cookieString="">
<cfloop collection="#cookieStruct#" item="key">
<cfset cookieString=cookieString & "#key#%3d#cookieStruct[key]#;path%3d/&">
</cfloop>
<cfoutput>
<script language="javascript">
window.open('testsso.com/setCookies.html?#cookieString#',
'SelectWindow','width=800,height=300');
</script>
</cfoutput>
The first chunk of code formats the cookies so that they are ready to be passed via the URL. We need to strip out "=" and replace it with the HEX equivalent, namely, "%3d". The next chunk opens a new window that points to the HTML page that sets our cookies and we pass the cookies in the URL. The setCookies.html file then writes the cookies to the browser, and then redirects the user to the target application...game...set...match. The obvious drawback to this approach is that you must have permission or access to set the setCookies.html file on the target domain. That completes SSO 101. Next we'll look more at East Carolina University's specific implementation.
The possibilities of implementing an SSO solution are nearly endless. We have chosen to extend our implementation with the addition of a managed password "store" database. This database contains all the userID and password combinations for each user for each externally accessible system or application (don't worry, the data is encrypted). When a user logs into our portal, after all the authentication sequence is completed, the information related to that user in the password store database for SSO purposes is retrieved and stored in session. This method reduces the amount of database activity, providing better performance while also making this information available to internal functions of the portal as well as internal software applications.
In addition to a managed password store database, we have also developed standard XML configuration files for each system we access via SSO. Obviously, as this article states, there are bits of information you need from the external system to allow the SSO process to work. What are the names of the input fields for the userID and password? What is the URL of the external system? Our standard, proprietary XML configuration file defines all the elements needed for the external system to be accessed. The power of this feature is that it is extensible enough to offer access to multiple systems. Need access to another system? No problem. Simply create the XML configuration file. Much like the authentication information mentioned previously, all XML configuration files are read and stored in an application-scoped variable managed by the portal.
With the addition of the managed password store and the XML configuration files, we are dangerously close to a robust SSO solution. We are currently adding an administrative tool or "wizard" to step users through the process of creating the XML configuration file, allowing SSO access to external systems and applications. This "wizard" will not require any knowledge of XML, only that the user knows the URL and a few basic elements of the external system. Remember all that coffee and late nights sleeping on the floor at work making our office seem more like a hotel than a workplace (confused? see our previous article in CFDJ)? Here we go again...
As your organization progresses through the evolutionary life cycle of implementing Web-based applications, keep single sign-on and Web application portals in mind. You can save yourself much time and many headaches by starting your Web application portal while you still have only a few applications. Then, for those systems that cannot be moved into the portal, implement a single sign-on solution. Users can be freed from remembering multiple passwords for each system as well as the URLs. By combining a Web application portal with a single sign-on solution, any organization can provide a single point of access for all Web applications enterprise wide. This can increase security for the organization and provide convenience to users. After all, isn't convenience for our customers the ultimate goal? Enough said.
Published October 19, 2005 Reads 26,675
Copyright © 2005 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Steven Forehand
Steven Forehand is the team manager for the New Technologies Development Group, a team of twelve talented application developers at East Carolina University located in Greenville, North Carolina. He has been using Macromedia ColdFusion since just prior to version 2 and has over nine years of software development experience and is Macromedia ColdFusion MX certified
More Stories By Zachary Loch
Zachary Loch, a Macromedia Certified Advanced ColdFusion MX Developer, is project manager of application development at East Carolina University and also works on special data integration projects. He has 8 years of software development experience in a diverse set of industries including healthcare, insurance, education, and telecommunications.
![]() |
Casey Priest 11/18/05 12:07:02 PM EST | |||
I receive this error when trying to use the code: Element Set-Cookie is undefined in a CFML structure referenced as part of an expression. I really need this work - any ideas? |
||||
![]() |
CFDJ News Desk 10/19/05 09:42:09 AM EDT | |||
Implementing a Single Sign-On Solution Using CF. There is an evolution that takes place when organizations start to develop Web applications as part of their IT infrastructure. Initially, an application is written for a particular purpose, say a contact management system or an inventory control system. |
||||
![]() |
INGR8 10/19/05 09:14:45 AM EDT | |||
|| The obvious drawback to this approach is that you must have permission or access to set the setCookies.html file on the target domain || Good point. |
||||
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Betas Target RIAs and Cloud Computing
- Adobe Cans Another 9% of its Workforce
- Moyea DVD4Web Converter V2.0 Converts DVD to FLV Fast and Synchronously with Watermarks
- Adobe Fiddles with its Web Apps
- Adobe & Salesforce Cut Cloud Deal
- Hosting.com Launches ColdFusion 9 in the Cloud
- The Real Time Infrastructure Ultimatum
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Is Microsoft as Free as Open Source?
- Adobe Reader Sued
- The Planet Named “Bronze Sponsor” of Cloud Computing Expo
- Microsoft Expression Web Has Got Game
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Bruce Chizen Joins Voyager Capital as Venture Partner
- My Top Seven Wishes From Adobe MAX 2009
- The Next Programming Models, RIAs and Composite Applications
- Where Are RIA Technologies Headed in 2008?
- Constructing an Application with Flash Forms from the Ground Up
- AJAX World RIA Conference & Expo Kicks Off in New York City
- CFEclipse: The Developer's IDE, Eclipse For ColdFusion
- Personal Branding Checklist
- Adobe Flex 2: Advanced DataGrid
- Has the Technology Bounceback Begun?
- Building a Zip Code Proximity Search with ColdFusion
- i-Technology Viewpoint: We Need Not More Frameworks, But Better Programmers
- The Asynchronous CFML Gateway
- Web Services Using ColdFusion and Apache CXF






























