- XML Reference Guide
- Overview
- What Is XML?
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- Table of Contents
- The Document Object Model
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- DOM and Java
- Informit Articles and Sample Chapters
- Books and e-Books
- Implementations
- DOM and JavaScript
- Using a Repeater
- Repeaters and XML
- Repeater Resources
- DOM and .NET
- Informit Articles and Sample Chapters
- Books and e-Books
- Documentation and Downloads
- DOM and C++
- DOM and C++ Resources
- DOM and Perl
- DOM and Perl Resources
- DOM and PHP
- DOM and PHP Resources
- DOM Level 3
- DOM Level 3 Core
- DOM Level 3 Load and Save
- DOM Level 3 XPath
- DOM Level 3 Validation
- Informit Articles and Sample Chapters
- Books and e-Books
- Documentation and Implementations
- The Simple API for XML (SAX)
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- SAX and Java
- Informit Articles and Sample Chapters
- Books and e-Books
- SAX and .NET
- Informit Articles and Sample Chapters
- SAX and Perl
- SAX and Perl Resources
- SAX and PHP
- SAX and PHP Resources
- Validation
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- Document Type Definitions (DTDs)
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- XML Schemas
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- RELAX NG
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- Schematron
- Official Documentation and Implementations
- Validation in Applications
- Informit Articles and Sample Chapters
- Books and e-Books
- XSL Transformations (XSLT)
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- XSLT in Java
- Java in XSLT Resources
- XSLT and RSS in .NET
- XSLT and RSS in .NET Resources
- XSL-FO
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- XPath
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- XML Base
- Informit Articles and Sample Chapters
- Official Documentation
- XHTML
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- XHTML 2.0
- Documentation
- Cascading Style Sheets
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- XUL
- XUL References
- XML Events
- XML Events Resources
- XML Data Binding
- Informit Articles and Sample Chapters
- Books and e-Books
- Specifications
- Implementations
- XML and Databases
- Informit Articles and Sample Chapters
- Books and e-Books
- Online Resources
- Official Documentation
- SQL Server and FOR XML
- Informit Articles and Sample Chapters
- Books and e-Books
- Documentation and Implementations
- Service Oriented Architecture
- Web Services
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- Creating a Perl Web Service Client
- SOAP::Lite
- Amazon Web Services
- Creating the Movable Type Plug-in
- Perl, Amazon, and Movable Type Resources
- Apache Axis2
- REST
- REST Resources
- SOAP
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- SOAP and Java
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- WSDL
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- UDDI
- UDDI Resources
- XML-RPC
- XML-RPC in PHP
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- Ajax
- Asynchronous Javascript
- Client-side XSLT
- SAJAX and PHP
- Ajax Resources
- JSON
- Ruby on Rails
- Creating Objects
- Ruby Basics: Arrays and Other Sundry Bits
- Ruby Basics: Iterators and Persistence
- Starting on the Rails
- Rails and Databases
- Rails: Ajax and Partials
- Rails Resources
- Web Services Security
- Web Services Security Resources
- SAML
- Informit Articles and Sample Chapters
- Books and e-Books
- Specification and Implementation
- XML Digital Signatures
- XML Digital Signatures Resources
- XML Key Management Services
- Resources for XML Key Management Services
- Internationalization
- Resources
- Grid Computing
- Grid Resources
- Web Services Resource Framework
- Web Services Resource Framework Resources
- WS-Addressing
- WS-Addressing Resources
- WS-Notifications
- New Languages: XML in Use
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- Google Web Toolkit
- GWT Basic Interactivity
- Google Sitemaps
- Google Sitemaps Resources
- Accessibility
- Web Accessibility
- XML Accessibility
- Accessibility Resources
- The Semantic Web
- Defining a New Ontology
- OWL: Web Ontology Language
- Semantic Web Resources
- Google Base
- Microformats
- StructuredBlogging
- Live Clipboard
- WML
- XHTML-MP
- WML Resources
- Google Web Services
- Google Web Services API
- Google Web Services Resources
- The Yahoo! Web Services Interface
- Yahoo! Web Services and PHP
- Yahoo! Web Services Resources
- eBay REST API
- WordML
- WordML Part 2: Lists
- WordML Part 3: Tables
- WordML Resources
- DocBook
- Articles
- Books and e-Books
- Official Documentation and Implementations
- XML Query
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- XForms
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- Resource Description Framework (RDF)
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- Topic Maps
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation, Implementations, and Other Resources
- Rich Site Summary (RSS)
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- Simple Sharing Extensions (SSE)
- Atom
- Podcasting
- Podcasting Resources
- Scalable Vector Graphics (SVG)
- Informit Articles and Sample Chapters
- Books and e-Books
- Official Documentation
- OPML
- OPML Resources
- Summary
- Projects
- JavaScript TimeTracker: JSON and PHP
- The Javascript Timetracker
- Refactoring to Javascript Objects
- Creating the Yahoo! Widget
- Web Mashup
- Google Maps
- Indeed Mashup
- Mashup Part 3: Putting It All Together
- Additional Resources
- Frequently Asked Questions About XML
- What's XML, and why should I use it?
- What's a well-formed document?
- What's the difference between XML and HTML?
- What's the difference between HTML and XHTML?
- Can I use XML in a browser?
- Should I use elements or attributes for my document?
- What's a namespace?
- Where can I get an XML parser?
- What's the difference between a well-formed document and a valid document?
- What's a validating parser?
- Should I use DOM or SAX for my application?
- How can I stop a SAX parser before it has parsed the entire document?
- 2005 Predictions
- 2006 Predictions
- Nick's Book Picks
Everybody starts the discussion of "Single Sign-on" by talking about how many times a day you have to use a (potentially different) username and password in your daily computer dealings. They talk about how nice it would be if you only had to sign in once, and then everywhere you went sites would automatically open their virtual doors to you based on this magical authentication. And they talk about it as though it were something new.
It's not new. You use a version of this "single sign on" virtually every day in your offline life. Every time you get stopped for speeding or write a check or sign up for a library card and someone asks to see your drivers license or state ID, you're using a version of "single sign on".
It works like this: the clerk at the grocery store or the librarian or the traffic cop are not verifying that you are who you say you are, or that you were born on a certain day, or that you live in a certain place. They're all relying on the fact that the state (or non-US equivalent, if applicable) did all of that verification, asking for a birth certificate, and so on, when you applied for the drivers license. They take your ID to be an assertion that you are who you say you are.
Theoretically, that's how it works online, as well. Ideally, you would be able to sign in to your computer once, and from then on wherever you went, be it your company's intranet or your bank account, the site would know who you were and you wouldn't have to sign in again. That's the theory, anyway.
Making that happen is a little bit more complicated. One way is for everybody to simply use a single sign-on "provider" such as Microsoft's Passport service, but that's not necessarily attractive to companies because Microsoft then owns all of their customer data. Another way is by using "federated" identities.
And that's where SAML comes in.
Security Assertion Markup Language, or SAML, is a way for sites to "vouch for" users. In other words, if I sign in to my company's intranet and then try to go to, say, a partner company's site, my company's intranet can vouch for me, telling the partner site who I am so that it doesn't have to ask for another username and password. SAML describes an XML vocabulary for doing that.
For example, check out this sample file from Authenticating Web Services with SAML:
<saml:Assertion MajorVersion="1" MinorVersion="0" AssertionID="192.168.19.12.109856" Issuer="Issuingauthority.com" IssueInstant="2002-06-21T12:02:02Z"> <saml:Conditions NotBefore="2002-06-21T12:02:02Z" NotAfter=""2002-06-21T12:12:02Z" /> <saml:AuthenticationStatement AuthenticationMethod="Password" AuthenticationInstant="2002-06-21T12:12:02Z"> <saml:Subject> <saml:NameIdentifier SecurityDomain="relyingdomain.com" Name="bridget" /> <saml:Subject> <saml:Attribute> <saml:AttributeDesignator AttributeName="Department" AttributeNamespace="http://www.informit.com"/> <saml:AttributeValue>Editor</saml:AttributeValue> </saml:Attribute> </saml:AuthenticationStatement> <saml:AuthorizationDecisionStatement Decision="Permit" Resouce="http://www.informit.com/articles/edit.cgi"> <saml:Actions Namespace="http://www.informit.com"> <saml:Action>Execute</saml:Action> </saml:Actions> <saml:Subject> <saml:NameIdentifier SecurityDomain="relyingdomain.com" Name="bridget" /> </saml:Subject> <saml:AuthoricationDecisionStatement> </saml:Assertion>
This SAML statement actually serves several purposes. I've lumped them all together for the sake of brevity, but in reality a message doesn't have to do this much work.
First, note that we have an Assertion
of some kind. That Assertion
is identifiable, and comes from a particular place. Based on the Condition
s, we
see that it's only valid during a particular period of time. In this case, we start by noting that
a user that can be identified as bridget
authenticated with the server using a Password
at a particular instant. Based on that, the server asserts that this person
is not only bridget
, but that bridget
has been assigned the attribute
of Editor
in the http://www.informit.com
namespace. Note that the
server could have simply replied that this is bridget
, or that this person was an
Editor
and not supplied the information as to how it knew.
Next we have the AuthorizationDecisionStatement
, which states that this
person, bridget
, is allowed to Execute
the http://www.informit.com/articles/edit.cgi
resource. (Kind of like the blue background on
your drivers license that says you can buy a beer.)
All of these messages are carried via SOAP, so they are perfectly suited to Web Services, but remember that they're not foolproof. First of all, you need to make sure that you really trust the party who's making these decisions. (Before you sell them the beer, are they offering you a state-issued ID, or a library card?) Second, you need to make sure that these messages are really coming from the party who's making these decisions. (Is that state-issued ID a fake?) Third, you need to remember that this is simply a means for communicating centralized identification information. You still need to formulate your own security policies.
But at least, with SAML, you have a base to work from.