| By Kirk Liemohn, Chris Edwards | Article Rating: |
|
| April 4, 2008 04:00 AM EDT | Reads: |
7,139 |
Client JavaScript Rendering
The Confluence Page
web part has SSO code to render client script to the browser. This is
done in the Web part's CreateChildControls overload. The code checks to
see if the Microsoft SSO service has been configured for the
"Confluence" application. If it's been configured, it uses the built-in
SSO provider to reserve a credential ticket. This ticket is a generated
string token that can be used later to retrieve a user's credentials.
This code in Listing 1 renders the JavaScript in Listing 2 to the browser. Most if it is in the SsoClientScriptFormatted constant, with the exception of the SSO ticket.
The call to createXMLHttpRequest is called as the browser is rendering one of the Confluence Web parts. This call sets up the xmlHTTP object appropriate to the browser (Internet Explorer 6/7, Firefox, etc.). The next call to getCredentials makes a separate HTTP request to ConfluenceSettings.aspx to redeem the ticket/token that was originally sent to the browser. Once the call to ConfluenceSettings.aspx returns, another request is sent to Confluence with the specific user's credentials. This establishes a session (and authenticates the user) between Confluence and the user's browser session.
Confluence Page Request
For the Confluence Page
Web part to render the Confluence page content, the Web part must
request the data from Confluence using the SSO credentials. This is
done in the OnPreRender overload of the Web part as shown in Listing 3.
This code checks to determine if SSO credentials have been stored for the current user. If they haven't been, the call to GetConfluecePage will throw an exception. This exception will be handled by the SingleSignonException handler that provides a link so the end user can provide SSO credentials.
SSO Settings and Authentication Ticket Verification Code
The ConfluenceSettings.aspx page has been set up to respond with a
Confluence login URL if a particular query string is provided with an
appropriate token. This is used by the JavaScript emitted in Listing 2.
In Listing 4 we show snippets of the OnLoad method for the page. This method pulls the credentials for the current user with a call to the GetCredentials method. A separate call is made to GetCredentialsUsingTicket. If both the username/password match from the credentials returned from both calls, then the credentials are returned to the browser through the JavaScript request.
The call to GetCredentialsUsingTicket is executed with elevated privileges as shown Listing 4. This had to be done because the call requires SSO administrative-level privileges. It also requires the SSO Administrative account to be a site collection administrator.
Summary
In Part 1 of this article we covered the
primary points of content embedding. In Part 2 we covered integrated
search and single sign-on. Unfortunately we weren't able to cover some
other aspects of this project, such as how we deployed the SharePoint
Connector for Confluence into two SharePoint features and provided a
MSI for installation. Nor did we get into our agile process for working
with the Atlassian team on the other side of the U.S., not to mention
its development team in Australia - that resulted in a couple of late
nights!
We would like to thank Lawrence Liu and Deb Bannon of Microsoft for introducing ThreeWill to Atlassian. We would also like to thank Jonathan Nolen of Atlassian for managing the requirements and giving guidance as well as Brendan Patterson who wrote the Confluence plug-in for SharePoint.
Resources
- Confluence: www.atlassian.com/software/confluence/
- SharePoint Connector for Confluence features: /www.atlassian.com/sharepoint/features.jsp
- SharePoint Connector for Confluence homepage: http://confluence.atlassian.com/display/CONFEXT/SharePoint+Connector+for+Confluence
- Protocol Handlers: http://msdn2.microsoft.com/en-us/library/ms917418.aspx
- Crawling forms-based authentication web sites: http://support.microsoft.com/kb/934577
- Access Control List: http://en.wikipedia.org/wiki/Access_control_list
- Custom security trimmer: http://msdn2.microsoft.com/en-us/library/aa981236.aspx
- Register a security trimmer programmatically: http://blogs.threewill.com/implementingsharepoint/Lists/Posts/Post.aspx?ID=22
- Start the SSO service: http://technet2.microsoft.com/Office/en-us/library/ 34d6aeca-2a18-4416-8824-85d709d1b0da1033.mspx?mfr=true
- Manage settings for SSO: http://technet2.microsoft.com/Office/en-us/library/ cd4f4a25-e393-4e1b-9c26-a0bed175d3a21033.mspx?pf=true
- SharePoint 2007 Single Sign-on Setup Blog: http://www.sharepointblogs.com/llowevad/archive/ 2007/06/25/sharepoint-2007-single-sign-on-setup.aspx.
ThreeWill is a software solutions provider based in Alpharetta, GA that helps companies build custom collaborative and workflow solutions that enable their people to work together better. As a Microsoft Gold Partner, it specializes in the building on SharePoint 2007 technologies to produce effective solutions its client's business problems. See www.threewill.com.
About Atlassian
Atlassian develops affordable
lightweight software that helps enterprises collaborate better. Its
products include Confluence, widely recognized as the most advanced
enterprise wiki, and JIRA, one of the world's most popular issue
trackers for IT project management. The company has more than 9,000
customers worldwide, including 30 of the world's top 50 corporations.
See www.atlassian.com.
Published April 4, 2008 Reads 7,139
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Kirk Liemohn
Kirk Liemohn is a principal software engineer with ThreeWill. His recent project experience includes Microsoft Office SharePoint Server (MOSS) enterprise search projects as well as a Windows SharePoint Services (WSS) business analysis portal. Kirk manages a SharePoint blog at http://www.implementingsharepoint.com.
More Stories By Chris Edwards
Chris Edwards is a senior software engineer with ThreeWill. His project roles have ranged from development/technical lead to development resource. He is certified as MCSD using Microsoft .NET and as MCTS: SharePoint Services 3.0, Application Development. Chris manages resource links related to WSS at http://wssresourceguide.com.
![]() |
shirley 03/30/09 04:55:53 AM EDT | |||
We can assist here as we specialise in developing and implementing SharePoint 2007 – that’s all we do. There is more information on this at http://www.nsynergy.com or mail to info@nsynergy.com. |
||||
- Kindle 2 vs Nook
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- Confessions of a Ulitzer Addict
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- It's the Java vs. C++ Shootout Revisited!
- Cloud Computing Can Revitalize Your Career as Software Developer
- IBM Could "Reinvent" Java: Mills
- Oracle & Cloud Computing: Exclusive Q&A with SVP Richard Sarwal
- A Brief History of Cloud Computing
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- JavaServer Faces (JSF) vs Struts
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- What's New in Eclipse?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- i-Technology Predictions for 2007: Where's It All Headed?










































