Tuesday, September 19, 2006

back online

Thanks to Ian, Ebe, and a new router, xmldap.org is back online.

Kim - you owe us $65.00 :-)

identityblog effect

Looks like Kim's two new posts have melted my server. He's the slashdot of the Identity world.

Sorry - the crack sys-admin team has been deployed. Hopefully we're back up soon!

Sunday, September 17, 2006

The Missing Infocard Schema

The Infocard Schema has been notoriously missing since Microsoft published RC1.

Here's the schema for the http://schemas.xmlsoap.org/ws/2005/05/identity namespace

Playing with Managed Cards

I've just checked in code that can create Managed Cards that import into CardSpace RC1.

To allow people to play around, I've also added a quick little web app, which creates cards for you. You can try this out at:

https://xmldap.org/sts/cardmanager




If you'd like to try it out, you can either download the source from http://xmldap.org

Relying Party updated to support RC1

I finally got around to updating the Relying Party to support Cardspace RC1.

Enjoy: https://xmldap.org/relyingparty

Saturday, September 16, 2006

Instructions for the CardSpace FirefFox Extention

It sounds like Craig Burton has been having trouble with the demo Cardspace Selector I put together for Firefox. I'm not sure what trouble he's been having, but I thought I'd toss up some quick instructions, and a screen cast.

Step 1) Make sure you're on Firefox 1.5 or greater.

Step 2) Make sure you've got J2SE 1.4x installed on your machine. The xmldap selector doesn't use any .net or Microsoft code...its a cross platform implementation written from scratch in Java. You can hit http://java.sun.com if you need to download a JDK

Step 3) Go to http://xmldap.org and download the Firefox extension. You may need to allow the popup blocker to trust my site. Restart firefox.

Step 4) Go to a Cardspace enabled site like xmldap, identityblog, or ping

Step 5) Click to login, create a card, and submit.

Note that you'll still get a warning saying: "Additional plugins are required to display all the media on this page" Ignore it...I haven't figured out how to make it go away yet. Please email me or comment if you know!


Craig and others - email me at cmort at xmldap.org if you have questions or issues!

Tuesday, September 12, 2006

Identity Selector for Safari

My good friend Ian Brown has taken the xmldap.org code and created an Identity Selector for Safari. It even integrates with the Apple Address Book for self-asserted cards. If you've got a Mac, check it out...if not, he's got a screen-cast.

Nice work Ian!

Sunday, August 27, 2006

6 screws and a plate!


6 screws and a plate!
Originally uploaded by Phil Hunt.
Phil Hunt from Oracle(OctetString), Ian Brown of SOA (BlueTitan) Phillip Kamps (yet another ex-sxipster), myself, and Phil's wife Wendy rode thigh deep powder at Whistler this year.

In a mad dash to the bottom to meet up with Mara, this happened to Wendy's knee.

She literally just laughed it off.


Update - My memory is off - it was Phillip instead of Ian. As Ian comments we was out with his own knee injury...which was my fault. Sorry Ian.

Catalyst 2006


mortimore, huang, shewchuk

Saturday, August 26, 2006

xmldap.org back online

Thanks to my friends at SOA Software, xmldap.org is back online.

There are a few new things as well:

  • The homepage has a new look, as well as a bunch of handy links: http://xmldap.org
  • The Relying Party has been updated to work with the latest CardSpace release.
  • The FireFox Identity Selector has been updated to get it working with the latest versions of Kim's blog and Ashish/Ping's demo site.
  • The selector also has a number of updates from Axel Nennker to support images for cards, and required fields in cards. Thanks Axel!
  • Axel also just came through with support for optionalClaims. Thanks again!

Thursday, June 15, 2006

Burnin' Down the House

"Chuck...this is Mark...apparently the house is on fire"

Everyone is ok, and the damage is minimal.

Slide show here

Identity Vocabulary Comparison

Here's a nice new overview of schemas across various identity systems by Johannes

Get it here

Discuss it here

Wednesday, June 07, 2006

Microsoft Labs STS

This was briefly available a few weeks ago...looks like it's live again:

http://sts.labs.live.com/

Haven't tried it yet myself, but it looks interesting.

Thursday, May 11, 2006

Even better than the dolphins

This article about dolphins referring to each other by name has been making the rounds in the identity world.

The monkeys are still more human.

I completely agree...

...with Johannes' latest post.

It's too bad rdf is so difficult for people to work with (or even grok)...the simple injection of a predicate into the name/value pair and you'd retain the ability to serialize complex object graphs.

Monday, May 01, 2006

Firefox Identity Selector

I've just posted a prototype identity selector for firefox, which allows you to login to infocard enabled sites, without infocard, or even windows.

You can download it here: http://xmldap.org/xmldap.xpi

In order to get started, download and install the extension, and then browse over to one of the public relying parties. It also requires that you have a JVM installed, which you can pick up from java.com if need be.

Please note that this is of alpha quality. It only supports Self Asserted tokens, and many other desireable features have not been implemented. However, it should provide the based for some interesting discussions at IIW this week.

Enjoy, and please send feedback.

[Update: There seems to be a small bug with selecting cards. If you click on a card to select it, and its values do not fill in on the right side of the screen, then click it again until they do. If you attempt to submit with blank values it won't work]

[Update: Also - keep in mind that I haven't figured out how to make the Firefox warning that a plugin to handle the infocard object isn't installed. Simply ignore this, and please send me a note if you know how to make this go away]

Wednesday, April 19, 2006

Mara's on Flickr

Check out our pics from NYC

Or subscribe to her ATOM feed

Interesting code block...

Here's an interesting block of code for displaying Certificates I found while poking around Firefox this evening...


mapIssuerOrganization: function(name) {

if (!name) return null;

if (name == "RSA Data Security, Inc.")
return "Verisign, Inc.";

// No mapping required
return name;
}

Monday, April 10, 2006

Another Java RP

This time from Ashish at Ping:
https://infocard.pingidentity.com/infocard-sp/

Nice Work!

Sunday, April 09, 2006

Finally...a Windows VM for the Mac

I've got to say, Parallel's workstation rocks. I'ts jsut like VMWare except it runs on OSX. Despite the occasional kernel panic (it's still in beta), I can now play with InfoCard without leaving my Mac. XP is super fast, and my friends at Sun will be glad to know that Solaris x86 is supported.


Here's some screen shots of InfoCard running in a VM (click for bigger shots):


Here, I'm prompting for an InfoCard



InfoCard displays some information about my RP, and asks if I want to send a card.



Since this is my first time using InfoCard, it asks if I'd like to create a card, or perhaps import some existing cards.


Here, I'm creating a new self-asserted card.



InfoCard confirms that I want to send my new card.



And I'm logged into my RP.

Friday, March 31, 2006

How to consume tokens from Infocard

So - if you’ve been wondering how my RP works...here’s an overview. I’m not going to cover declaring Policy or anything, as Mike Jones’ paper seems to have covered it in pretty good detail. I’m assuming here you can get InfoCard to invoke and POST a token.

To get started, you need to get your hands on the XML Token. This should be pretty simple, as your web framework will generally hand back parameters already URL decoded.

Once you’ve got the token, you’ll need to decrypt the token. The token is transmitted as encrypted XML, and will look something like this:


<enc:EncryptedData xmlns:enc="http://www.w3.org/2001/04/xmlenc#"
Type="http://www.w3.org/2001/04/xmlenc#Element">
<enc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc" />
<dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
<enc:EncryptedKey>
<enc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
</enc:EncryptionMethod>
<dsig:KeyInfo>
<wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">zHXxYr8jTDe/UhznC81ixsQXSpI=</wsse:KeyIdentifier>
</wsse:SecurityTokenReference>
</dsig:KeyInfo>
<enc:CipherData>
<enc:CipherValue>hgBNzEXXnoLNu6DPhXJanirEPOK/ey53RKISJrwvRhQazPBgqcnZPaxNVqZf6TOR1VbryCU6fbGw
jIuuXzTb5Z+0PsRPM4N8CLSBxYxN1BFCNnhW67qJ4zrw72OTIkkTLWvPDpJpAak6X6RGFteaf3zD
uVYU4Ta0sDmMD6lxgjs=</enc:CipherValue>
</enc:CipherData>
</enc:EncryptedKey>
</dsig:KeyInfo>
<enc:CipherData>
<enc:CipherValue>qCiqGzgr9JKl8hQXKBkZ7d+CIDmppKGTQgTYCjgT1/jR/0A4uj7gxLtERM09OACzC3oXGHn7o/9qk8J2seWp2gZdQSWcnEavbgGOYDARGi7Vu5jsBrav5m1d4HrpKD2H1uCgB8xNR6eHKoPrsCGN9x9chWph244dD3HlXMXj90OSFSt+/y1oy6DWQV8EC94C4mbUH9udNc2cp90n2MCdHIF+jmjGrDQHVL4AHIYEFbH8b5rIHrW/oFlztcVhon1vOTQ4u3AO6jPINvcZK92greuWMdoyc2Lhx2/G4xNjhRpGdyfFOSHStOCv1xA0mZSvnn9bTMT3khMjPKL5KWdwTduKghMJsoZLFC6M2b2HHM9KdihvF2qPMXMsk8ZOf4dmL76bTzOsfC0yTtasY6L4lLn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AAnYd0xhggXlMBpDVDv5pLHZCx+CWfNmX7ZCBsVeDmTZgUmq76L5cn4yrhFjm4PypSsO4H1n/lgymZhx1ydb4ZD2tYOzoxEYyJfkEP4h07fJBLi/hp98PCL7Da4mIq81u+7y4jNs3WHO//nmbEBg3LisgmZHrBVI0OUphmNpM+eU5FM1F8eo3za5I3fymPPjOymrsO7fEvdhSLqBbwTqzNAhzw8/vx4I7e9rG7emnvU/3cQAcKd3J5RCChjf0ofWgzmU5bGKYyNHU1IZvhC+Z2kk7TINQyYas3E9uYrZjGS9pF8ppkdc8UdLJaapnPN1h7+DybO2QYQ2hTzU88+sUASUtv/LWFFq0isKjfqDW9XYj4FaIDuGZ6A1Fswy6QYHaeaRi8GCdtT4C8LyCmVkadWNlbcloZPosI8q/qTG9NigEA1p7j7ahAzeZhBUPuCX7vhvFoGg6Ie9wE754X57BvYKqcFbO2WPoDfEir0ibQpS+2uAu7tXdiWEqTId8Fv7JnSs9thx+M1ZYJHe1n1xDdX2FngsWTd2CLvYvHZGl52fmjl/UP7P0dIABY6enZKZ/XTNwKEGc98fijrvMW9CaH6D1N5vCPddD/VBlImkiCaiD7jGNyAtj5xwgGj0OnBHf2mhxHpq650L5qb5NkojFB9Bb07c2UkUxIATy0dZkxtZyK5uIB6IIs1b1bHiaKJHwp4qTw7k3xxXuhSUPdRSncSL19XVUNwnWhQtS4r+jvoM2gsglXDB8yjhXWwc6JvLTp0VKq4XsAM6BV4DodPC4N/GgGYghhxy6uO7ViRU+R0z/H4o/VMifUvOs4anMY1SSe</enc:CipherValue>
</enc:CipherData>
</enc:EncryptedData>


Basically what you have here is an ephemeral symmetric encryption key, which has itself been encrypted with the Public Key of the SSL Cert for the website InfoCard is interacting with. As you can see from the metadata provided in the KeyInfo fragment, the key is encrypted using RSA with OAEP encoding and SHA1, using the certificate identified in the SecurityTokenReference with the provided fingerprint (the fingerprint is a SHA1 hash of the cert bytes)

Your first job is to decrypt that encryption key. Step one - remove the Base64 encoding. Step 2 - you need to write a function which takes the private key for the cert referenced by the fingerprint, along with the data as input, and decrypts in this manner RSA-OAEP

Once you’ve successfully decrypted the key ( it should be 256 bits), you can use it to decrypt the token. As you can see in the XML, you need to use AES with a ChainedBlockCipher. Decrypt the token (Don’t forget to strip the initialization vectors...thanks Gary ), and you should see something similar to the following:



<saml:Assertion MajorVersion="1" MinorVersion="1"
AssertionID="uuid:d2de97e7-96ac-4bb3-a373-4fc11c914519"
Issuer="http://schemas.microsoft.com/ws/2005/05/identity/issuer/self"
IssueInstant="2006-03-29T20:52:45.312Z" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">
<saml:Conditions NotBefore="2006-03-29T20:52:45.312Z" NotOnOrAfter="2006-03-29T21:52:45.312Z" />
<saml:AttributeStatement>
<saml:Subject>
<saml:SubjectConfirmation>
<saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:holder-of-key</saml:ConfirmationMethod>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<e:EncryptedKey xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
</e:EncryptionMethod>
<KeyInfo>
<o:SecurityTokenReference xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">BCDy8bwQIxTqcoTObIhcvR2KOLw=</o:KeyIdentifier>
</o:SecurityTokenReference>
</KeyInfo>
<e:CipherData>
<e:CipherValue>XjkCVuQZ19sYbSnEeKYQ7wD/+bKvGL6kkS2yuVjQX4y3N7U86zRJ66njNPdFNdh8k/x+5CNF1rpjq/Be75a1skO9ePjLgik/UA1DlDo9jaFoYvRlEj0BN/TPJaMZ24kcmcG+QeU89rdg0S4+bqxytHyh14m6IaIaX4aj88RRVq4=</e:CipherValue>
</e:CipherData>
</e:EncryptedKey>
</KeyInfo>
</saml:SubjectConfirmation>
</saml:Subject>
<saml:Attribute AttributeName="GivenName" AttributeNamespace="http://schemas.microsoft.com/ws/2005/05/identity/claims">
<saml:AttributeValue>Mister</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute AttributeName="Surname" AttributeNamespace="http://schemas.microsoft.com/ws/2005/05/identity/claims">
<saml:AttributeValue>Milo</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute AttributeName="EmailAddress" AttributeNamespace="http://schemas.microsoft.com/ws/2005/05/identity/claims">
<saml:AttributeValue>milo@xmldap.org</saml:AttributeValue>
</saml:Attribute>
</saml:AttributeStatement>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<Reference URI="#uuid:d2de97e7-96ac-4bb3-a373-4fc11c914519">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<DigestValue>leav91ZV/KJpwumP/j+4XtlEvJg=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>gEVmREMwNiE67hMdOf7uuC4jnhG4f9y3WYL2pL6d9F3Nblf3qddMe6K+d/b6ucePKS3Q9XXBmBu2tWtmZlwTzldVjx8IYZb5u5jcQByAp2GrTJb/XxHA/3BkE073zdFRlmHje467kVd4Mcg6X2qNsV1N+euZqCUfmrXyf3cs5n4u6A9A1CTuQhCOGhE7jjDUGPmyChJa2YfHqpiVPEXgqN+RYOTLUFbA2kKj1Jyi8+FJD7vHP/5/kblge82waNFOOaA6d7lXDhr4lBDDhr5vKoNWy91bDMStn+nKN7Nzj7zPjxjynp7CisSewyWxAjcD9XDl/I9Va2UVDmPr4JC4bw==</SignatureValue>
<KeyInfo>
<KeyValue>
<RSAKeyValue>
<Modulus>rCOb7lDap18tsTurz6j/fSYnO+ck5or10hn9tZhCDwXfJip2lqjIFcj3fYv1cyP96dl4++x8QGXSB5WAu3NNtjZkVxTDO4sOk+IpkLOlE5vM6ClMSV46tx9fo6tbQ9EhJTy7vXAbCH6hQnowxdmUEVKJudCtlMeHSotix98T5zJXYMjeLvmDPmSK8pG/t+kBmRjsgSZGqjD4VFlnDBpYOZ4R+nH2ESudyvZUwAkgPAEtGuBcc+nXVUEbs+O1xOkzcTRCm9FCoww1oNSi2maRGontD14Cbyy3DuNRxqPSxEc8rN7KBoq5w2y+Q5YTVYBB+qn2rXbO0aQlYHXIZOATpw==</Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
</saml:Assertion>



The next step would be to quickly check the validity period on this Assertion to make sure it’s still fresh. You might also want to check the AssertionID against a table of previously seen assertions to prevent replay...depends on your level of paranoia.

On to signature validation...you should follow the steps outlined in XML-DSIG, but to paraphrase, check the digest of the canonicalized assetion against the digest in the SignedInfo block, and then valhttp://www.blogger.com/img/gl.link.gifidate the signature of the canonicalized SignedInfo using a PublicKey constructed from the provided KeyInfo.

Now, what’s bugging me is the use for the Symmetric Proof key provided in the Subject of the Assertion. Super Pat and I discussed this for awhile, and since it’s not used immediately in this protocol exchange, our best guess is that it’s used in subsequent interactions with the service, although I must admit the InfoCard docs are a little fuzzy on this subject. If anyone can fill me in, I’d appreciate it!

Finally, if your signature validation worked, extract the claims, enforce any policy you’d like, create a session, set a cookie, etc...

good luck!

Thursday, March 30, 2006

Make your own security tokens without InfoCard

Once you can consume security tokens from InfoCards, it's not too difficult to make them. Since most people don't have the time to try out InfoCard for real, I thought I'd add a quick utility to make your own tokens, and submit them to my RP. This should allow you to at least learn about the format and protocol for using InfoCard over the web.

Try the updated Java RP

Wednesday, March 29, 2006

Simple Java Based Relying Party

I've just turned on an InfoCard Relying Party, implemented from the ground up in Java. If you've got InfoCard up and running, please login and send me a comment.

Java Based RP

I'll follow up soon with details, as well as an overview of how it works.

[Update: I've had some complaints that this isn't working with the latest and greatest IE ( due to an issue with IE according to Kim ) I suggest build 7.0.5296.0 for now. ]

Monday, November 21, 2005

I for one...

I saw a commercial for robots tonight. Allow me to paraphrase:

I'm a neat freak...I'm obsesive compulsive...The Roomba is more intelligent than some people I know....It is a full featured robot...I know it's about to do a great service for me...the rumba finds more dirt than is humanly possible...I love robots...I don't know why I didn't buy one sooner.

I Love Robots!!!

Welcome!

Six Sigma


My new Salomon shipped with the following "quality control" device.



Anyone?

Monday, November 07, 2005

Identity Claims Transformation in Action!

Speaking of transforming claims, my good friend Pat is off in Tokyo at the moment speaking at Java ONE. As it turns out they've got a nice little posting of his bio for the converence:


アイデンティティ管理テクノロジーはこのセッションに注目しよう!(Pat Patterson氏)

Pat Patterson氏は、1997年にロンドンにあるソフトウェア開発会社のTrustbase社に入社。その後2000年にSunがTrustbase 社を買収し、以来Sunのアイデンティティ・管理製品グループのテクニカルアーキテクトを勤めています。フェデレーションとアイデンティティベースの Webサービス技術を中心に活動を行っています。JavaOne Tokyoでは2つのテクニカル・セッションのスピーカを担当。その内容について伺いました。


Obviously some fairly interesting claims about Pat's reputation/credentials, but unfortunately, not in one of my required formats. Fortunately BabelFish's STS allows for some simple claim transformation:

You will observe identity management technology to this session! (Pat Patterson)

Pat Patterson joins the Trustbase corporation of the software development company which London is in 1997. After that Sun purchases the Trustbase corporation in 2000, serves the technical architect of the identity management product group ever since Sun. Focusing on the federation and identity based Web service technology activity is done. With JavaOne Tokyo you take charge of the speaker of two technical sessions. You asked concerning the contents.


Awesome. Looks like the metasystem is going to need to stick to statically typed claims, with well defined transforms, for awhile yet...

Reply to Craig Burton

Craig Burton recently replied to my comments on his I Cry Post. While I generally agree with his sentiment on the metasystem, I have to take issue with the oversimplification of Infocard, Microsoft's implementation.

Craig states:

WS-* is not the encapsulating protocol. WS-Trust is the encapsulating protocol.


WS-Trust is actually just the encapsulating protocol for claims transformation. Microsoft's paper on the Identity Metasystem defines encapsulating protocol as the following:

"The encapsulating protocol provides a technology-neutral way to exchange claims and requirements between subjects, identity providers, and relying parties."


While WS-Trust may provide for claims transformation, it certainly does not provide provide the complete working pieces of an Identity Metasystem. In order to build a metasystem, you need a number of other critical pieces. In this case Microsoft is requiring:


  • WS-SecurityPolicy and WS-MetadataExchange for declaration and negotiation of claims requirements
  • WS-Security/dsg/encrypt and for message integrity, confedntiality, and claims presentation
  • WS-SecureConversation for channel security and trust associations
  • WS-Addressing for action, address, and message correlation
  • SOAP for transport abstraction
  • ...and some other tiny required specs...


Although not all of these are required components of an abstract metasystem, they all seem to be requirements of the Microsoft implementation, and that seems to run contrary to his call for an "architecture that is independent of mandated adoption" You gotta buy in.

Craig goes on to say:

What does WS-Trust do? It converts a token (in any format) into another token (in any format). You input an existing token, a request for a new token, and get back the new token. In otherwords, it is a token exchanger – between constituent systems.

Properly characterized, I'd say WS-Trust simply allows you to request this action to be performed. It's a simple request/response protocol, where the magic of any to any token transform is left out of band. At that point we're left up to systems that implement an Security Token Service (STS). I can name 1 commercial STS implementation (IBM's FIM), the Indigo Beta from Microsoft would allow you to build one fairly easily, and prototype code from sourceid. (Anyone know any others?) Unfortunately, given the above protocol requirements, there is some serious impedance in place of ubiquitous adoption.

Compounding the protocol requirements, in order for an STS to convert a token in any format, to any format, some sort of semantic equivalence between the two would need to be defined and implemented...something which is generally non-trivial, and sometimes not possible. Additionally, without a single canonical token format, and lacking a registrar of token formats and transforms, we're also left with a pretty serious scale issue. How does one know what the possible transforms are, and who can fulfill them? How do you incent the Supplying and Relying parties to negotiate (and by this I really mean implement) to a common set of claim formats?

Realistically, I think we'll probably end up in an environment where we negotiate to a limited set of common claims formats for the common stuff, and allow transport of a variety of vertically focused claims. Bridging between the participating parties is critical, but I'm not convinced that its the transform that's the killer app.


What I do think Craig really hits on here is that it's mandatory that a multitude of claims formats be supportable; a successful metasystem will neither be able to predict, nor prescribe the token/claim/assertion/attribute/etc formats which will flow across it. The transform is really just a facilitator, often necessary, but perhaps not a required one. I think Microsoft really nailed the decision to leave the token format out of band for the metasystem. This is critical to ubiquity, and I'm singing along with Craig on this. I am skeptical that they've got the right design center for adoption in the encapsulation protocol, when looked at in terms of it's complexity.


This does bring up a few outstanding questions I've got about Infocard:

  • What is the metadata format for "cards"? A combination of a WS-Addressing Endpoint Reference and Ws-SecPol? Something else?
  • How is it advertised and acquired? - Discovery seems totally opaque in the information I've seen so far. Kim Cameron alluded to the ability to advertise that one provides a card on a website at IIW this year, but what are the details?
  • At IIW, Microsoft mentioned that in order to promote usability aspects of the system, they'd be binding a human readable explanation of the machine readable claim. What is that format, and how is this not a new mandatory claim format for us to adopt?

Anyone out there have the answers?

Thursday, October 27, 2005

Big Iron

Went down to Atlanta earlier this week for a Sxip install...ended up getting awfully nostalgic for Sun when I saw this sucker:



That's a $5 million dollar Sun StorEdge L8500. Basically, it's a giant array of backup disks serviced entirely by robots, complete with a built in fire suppression system.

In 4 years at Sun, I never actually saw one in the wild.

Tuesday, October 04, 2005

Identity Insurance

Interesting development...AllState is providing Identity recovery insurance:

http://www.allstate.com/landingpages/home/idtheft.aspx

"With Allstate's identity restoration coverage, you have a dedicated team to handle the complicated, time-consuming and tedious work needed to help restore your good name and your credit rating. They will make the phone calls, handle the paperwork and deal with the credit bureaus. Some services focus solely on credit card theft or offer limited expense coverage, but Allstate goes further to help protect your good name — and your time."


Sxip's at Web2.0 this week trying to kill this market off before it starts.

Monday, July 25, 2005

Interesting post at sforce

Benji at SalesForce.com had an interesting post today on the sforce blog. Here's the juicy part:


How do the clients, which all use web services to authenticate (using login and password today calling our login call), know where to get the SAML token from, in a standard way? There is no standard way to do this today, and even standards like WS-Trust don't seem to solve this problem. For example, you build a client using our web services apis. You deploy to all our customers. Customer A has one SAML provider. Customer B has another SAML provider. How does your code know where to go to get the token when deployed at customer A and at customer B, without configuring all of the clients with the location of the SAML provider?

Benji raises some excellent points here...he's effectively pointing out the issue of discovering a security token service. What makes this complicated is the security token service in many of Sxip's customers is on a private network, and customers don't wish to expose the url to the general public. An anonymous discovery service either can't personalize the response to either customer a or b, or you end up exposing sts endpoint locations inside customer a or b.

Anyone have any ideas on this tricky problem?

Sunday, July 10, 2005

damn.







Sunday, June 26, 2005

Tuesday, June 21, 2005

SOAP Client Widget for Tiger

Thought I'd share my little experiment with Dashboard Widgets

It's a little AJAX Soap Client - provide the payload for the SOAP body, and it will post a message with wsa:Action and wsse:UserNameToken. The response is displayed back.

Milo's favorite barksdale-ism

Sunday, June 19, 2005

Here's what ended up on the wire

This was sent to my service. As, you can see that InfoCard has automatically created a SAML 1.1 assertion bearing the email address provided in the selected InfoCard. What's not clear to me is what's going on with the action - its' using a wa-addressing action that is not defined in ws-trust...hmm. Anyone? I wish the body weren't mysteriously encryted....

[Update: Mark Wahl passed this along

"When requesting and returning security context tokens the following Action URIs are used
http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT"
in WS-SecureConversation Feb '05.

Thanks Mark! ]


POST /simpleservice HTTP/1.1 Content-Type: application/soap+xml; charset="utf-8"; action="http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT"
Host: 192.168.9.11
Content-Length: 12838
Expect: 100-continue
Connection: Keep-Alive

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action u:Id="_1" s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT</a:Action>
<a:MessageID u:Id="_2">uuid:674467cc-10bd-4bd4-a4b6-fba565035d01;id=0</a:MessageID>
<a:To u:Id="_3" s:mustUnderstand="1">http://192.168.9.10:8080/simpleservice</a:To>
<dsig:X509Certificate xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">..../BjHqg==</dsig:X509Certificate>
<a:ReplyTo u:Id="_4">
<a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
</a:ReplyTo>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2005-06-20T00:44:36.734Z</u:Created>
<u:Expires>2005-06-21T00:44:36.734Z</u:Expires>
</u:Timestamp>
<e:EncryptedKey Id="uuid-dfeed4a3-da17-4699-80aa-dad0cccc082e-1" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"/>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<o:SecurityTokenReference>
<o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/2004/xx/oasis-2004xx-wss-x509-token-profile-1.1#X509ThumbprintSHA1">nNpk/FqUmDNX8fvv3bk9BVjY0eQ=</o:KeyIdentifier>
</o:SecurityTokenReference>
</KeyInfo>
<e:CipherData>
<e:CipherValue>GlV7KHIY0thaICqbatPYLaSRO4dyXxsR698bm9Po88K3iQpF1TvTC4HPp415eobwvUy7mLpM8XfOKEvfZ3fk0P4FjyXhtxQOnN35D7rCxVrnIu5zZqlNev9HqeqrUW05ocYgTGjD0RIV4XdRoScPiZU96EkzIfc6QsIFhGqo6RQ=</e:CipherValue>
</e:CipherData>
</e:EncryptedKey>
<c:DerivedKeyToken u:Id="_6" xmlns:c="http://schemas.xmlsoap.org/ws/2005/02/sc">
<o:SecurityTokenReference>
<o:Reference URI="#uuid-dfeed4a3-da17-4699-80aa-dad0cccc082e-1"/>
</o:SecurityTokenReference>
<c:Generation>0</c:Generation>
<c:Length>32</c:Length>
<c:Nonce>z3cSc/jtJ+UCF5CEQ8xsLg==</c:Nonce>
</c:DerivedKeyToken>
<saml:Assertion MajorVersion="1" MinorVersion="1" AssertionId="uuid-30365992-d9e4-46ad-9443-41b1aa1cc917" Issuer="http://schemas.xmlsoap.org/ws/2004/10/identity/issuer#self" IssueInstant="2005-06-20T00:44:35.718Z" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion">
<saml:Conditions x:Id="1" NotBefore="2005-06-20T00:44:35.500Z" NotOnOrAfter="2005-06-20T00:54:35.500Z" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://schemas.microsoft.com/2003/10/Serialization/"/>
<saml:AttributeStatement x:Id="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://schemas.microsoft.com/2003/10/Serialization/">
<saml:Subject x:Id="1">
<saml:NameIdentifier x:Id="1" Format="http://schemas.xmlsoap.org/ws/2004/10/identity#KeyThumbprint">9TGi5d7p2VFFnGtOZ5bmUwbpOJI=</saml:NameIdentifier>
<saml:SubjectConfirmation x:Id="1">
<saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:holder-of-key</saml:ConfirmationMethod>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<KeyValue>
<RSAKeyValue>
<Modulus>znzfPeulynSTfQRdMtkW3CTzR3G2T3l4YqI6Csdfq4huIEySzeCd1oEZ2aUtG/WjD1ZvgcNkaS8V6JuyU2+XGArNP/szM/KMIYDWa0vSkr1WpM+HUOK58fZXDQWTEaKzWJePMfOjUQefcg3CzK1uj1jM4pAVl6Hpv4862uIdzkWQ5SYV9mKu862Sc5RqF74KggMU3N9BzjPVWBrHzFIvJIQPsUWWRhb57N5qw2GzjPBDxK3ACKdkT/MA08Lnr4hSR/f827Zv363xN1BRinqcrfJE0GVr6/LL11qvZqaKEgd0NRnyKn+IR8VJbtpGMDcR03nZhkHFP87esFOD63zUIQ==</Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
</KeyValue>
</KeyInfo>
</saml:SubjectConfirmation>
</saml:Subject>
<saml:Attribute x:Id="1" AttributeName="http://schemas.microsoft.com/ws/2004/10/identity#E-Mail-Address" AttributeNamespace="http://schemas.microsoft.com/ws/2004/10/identity">
<saml:AttributeValue>cmort@sxip.com</saml:AttributeValue>
</saml:Attribute>
</saml:AttributeStatement>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#uuid-30365992-d9e4-46ad-9443-41b1aa1cc917">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>6EgVjHzVJvq5p8wA9CmRAa4428I=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>dHIsclXyt4S6/b485/Lw6t/0kAsJX3ctbJAtLZdSKoXiltOKLlOpnwrMESGDv6bwm3SjiadyF56MY0uWg8gqm65y8eO1o269CgQP4YB98LosaBnwzRXx63lzIp44rH6JcaOE0Cqq34P3cf5SxWC3BNaJpLfUbqrTw8wfHKIOxmc4bAaOMLMCV2QScbJQQYt1cE9b/mAtujl1cNzmGuDWVg2XyzwtE6HiPG8KvsgThDnz/ItzU2J9jfWBO7qXNDTM+EJt7LDn26HfixgxHDUm4W+wwxfhLGlER/KcNDWESOezBBd40diKpwIEALjZ/tAgLoGZPmnskFoaSLiDeeHTRQ==</SignatureValue>
<KeyInfo>
<KeyValue>
<RSAKeyValue>
<Modulus>znzfPeulynSTfQRdMtkW3CTzR3G2T3l4YqI6Csdfq4huIEySzeCd1oEZ2aUtG/WjD1ZvgcNkaS8V6JuyU2+XGArNP/szM/KMIYDWa0vSkr1WpM+HUOK58fZXDQWTEaKzWJePMfOjUQefcg3CzK1uj1jM4pAVl6Hpv4862uIdzkWQ5SYV9mKu862Sc5RqF74KggMU3N9BzjPVWBrHzFIvJIQPsUWWRhb57N5qw2GzjPBDxK3ACKdkT/MA08Lnr4hSR/f827Zv363xN1BRinqcrfJE0GVr6/LL11qvZqaKEgd0NRnyKn+IR8VJbtpGMDcR03nZhkHFP87esFOD63zUIQ==</Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
</KeyValue>
</KeyInfo>
</Signature>
</saml:Assertion>
<e:ReferenceList xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:DataReference URI="#_7"/>
</e:ReferenceList>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#_0">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>t4R8JHI9sfYljoocDZ69/1HoAJU=</DigestValue>
</Reference>
<Reference URI="#_1">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>Q25uUOzeV9Aduvtw9eG9xMMNHrI=</DigestValue>
</Reference>
<Reference URI="#_2">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>f4UZdzH8TQGemsO2i2E+jIa6XDo=</DigestValue>
</Reference>
<Reference URI="#_3">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>QFhRuh49ZnX8S4z8iKi3diz7UDE=</DigestValue>
</Reference>
<Reference URI="#_4">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>zaBQWq9U/zdzkimMsCHucawY8qc=</DigestValue>
</Reference>
<Reference URI="#_5">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue>6am03LAQSO20LZsE07ikNHHAazo=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>ZFL4QT1wu4N58VamcSyL4cJxEj3cKBCWEwNR4P06FlLKiCseyVp2SWGe1qciQCUdhZd5zQMcuUTXxlod9uN3HUPQdHZSGvvM2wTLsDnBYL7KQXgO+VHOmupGWIhI+aZiIPq1+IXv9hi5qqFb9hQ6/xB9i0iO5KZFe3bqjt67QrZDgtsFqYLT+GVkdq+4dKf+HTXsXSylm6eS5ce6gpCalTu+6XTB/8eG/kRLxFUXci4CTyipl/NLTqrFmmiln/dzPjeGrskjf2WZdmg8oXw+of46mb04fpWrE3vUqX1lfA7kdCFL3gP0bEiRgiHXOa9PhaQdOt/nt0mzfq3YHwc85w==</SignatureValue>
<KeyInfo>
<o:SecurityTokenReference>
<o:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">uuid-30365992-d9e4-46ad-9443-41b1aa1cc917</o:KeyIdentifier>
</o:SecurityTokenReference>
</KeyInfo>
</Signature>
</o:Security>
</s:Header>
<s:Body u:Id="_5">
<e:EncryptedData Id="_7" Type="http://www.w3.org/2001/04/xmlenc#Content" xmlns:e="http://www.w3.org/2001/04/xmlenc#">
<e:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
<KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
<o:SecurityTokenReference xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<o:Reference URI="#_6"/>
</o:SecurityTokenReference>
</KeyInfo>
<e:CipherData>
<e:CipherValue>lR2D1YctHtOdkC0bNrfP4BrpIOJkG5GxWVKm+LzkY7+1RKxhpL5IC1Z10ON8Vsg9+B7a7/....qRneyxtQ==</e:CipherValue>
</e:CipherData>
</e:EncryptedData>
</s:Body></s:Envelope>

Invoking InfoCard

With all that out of the way, I finally can invoke my client, and get into the InfoCard interface, as well as take a look at the resulting message enrichement

When I invoked the client, the first thing it does is validate the Identity of the service using the cert in the addessPropeties. Assuming validity, the InfoCard UI is invoked. The first thing you seen is presentation of the relying party, and potentially their terms of service, as well as prompt to either agree to their terms, or cancel the operation. I wish I had a screen shot, but there doesn't seem to be a simple means to remove a relying party from your trust list, or change its settings. I expect this will show up in future versions.

Once I accepted the terms, I'm prompted to select an InfoCard. This shows the UI for infocard actually being invoked:


Click for a larger version


A few things to notice here

1) They track which card I've previously presented, and when I did it
2) They track what the relying party already knows about me

From here, I can choose a card to submit. This talks to a local STS in the current beta, and generates a SAML assertion, which is used to enrich the SOAP call...

Now the App.config

InfoCard ends up getting invoked (at least in the Indigo use cases) via a custom binding in the services configuration file (app.config or web.config depending on selfhosting or was/iis hosted services)

The config file has 3 main sections required for InfoCard usage. The first is a custom binding. The binding section basically describes the protocol indigo will use to expose or talk to services in a declarative fasion. It ships with a number of default bindings for WS-I basic profile interop, WS-*, as well as some MSFT proprietary binary optimizations. You do have the ability to define a custom binding which gives you granular control over protocol. In order to use InfoCard, you seem to need to use a custom binding. Here is an example:


<bindings>
<customBinding>
<!-- Define custom binding for InfoCard. -->
<binding configurationName="InfoCardBinding">
<security authenticationMode="IssuedTokenForCertificate" contextMode="Session">
<federationParameters>
<tokenRequestParameters>
<xmlElement>
<wst:TokenType xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:wsid="http://schemas.xmlsoap.org/ws/2004/10/identity" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">urn:oasis:names:tc:SAML:1.0:assertion</wst:TokenType>
</xmlElement>
<xmlElement>
<wst:Claims xmlns:wsid="http://schemas.xmlsoap.org/ws/2004/10/identity" xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust">
<wsid:Claim wsid:URI="http://schemas.microsoft.com/ws/2004/10/identity#E-Mail-Address"/>
</wst:Claims>
</xmlElement>
</tokenRequestParameters>
</federationParameters>
</security>
<httpTransport/>
</binding>
customBinding>
</bindings>


This basically says that the authentication mode is IssuedTokenForCertificate which I believe indicates "Use InfoCard" It then designates the parameters which will be passed into the WS-Trust RST - in this case stating that it wants a SAML assertion with email address attribute assertion

Next, we need special behavior section which is referenced from the endpoint configuration. This indicates how to find the local certificate to exchange for the SAML assertion. This required importing the certificate into my local trusted store:


<behavior configurationName="TrustedCredentials" returnUnknownExceptionsAsFaults="true">
<channelSecurityCredentials>
<serviceX509Certificate findValue="Fabrikam" x509FindType="FindBySubjectName" storeLocation="CurrentUser" storeName="TrustedPeople" />
</channelSecurityCredentials>
</behavior>


It's not yet clear what other credential types can be used - there seem to be many options in the core Indigo APIs, but the authenticationMode of IssuedTokenForCertificate has me a bit concerned others aren't yet supported...

Finally, a addressProperties section is required:


<addressProperties identityType="Dns" identityData="Fabrikam">
<endpointHeaders>
<dsig:X509Certificate xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">MIIDwzCCAqu....==</dsig:X509Certificate>
</endpointHeaders>
</addressProperties>


I've got to say I don't understand this at all...or more to the point, don't see how it's viable. I believe what this is doing is providing the Identity of the service itself. Since this is statically declared in the clients config, it looks like a huge distribution issue. I'm sure microsoft must have something else in mind, like fetching this over ws-mex...anyone?

That pretty much covers what is required for the client and service config files - they're pretty close to the same. Next, we'll take a look at what happens when we invoke

And the Simple Indigo Client

Next, we need a simple client to go with my service.


using System;
using System.Collections.Generic;
using System.Text;

using System.Xml;
using System.ServiceModel;

namespace InfoCardClient
{

//This replicates the services contract - just raw Messages
[ServiceContract]
interface IGenericMessageChannel
{
[OperationContract(IsOneWay = true, Action = "*")]
void Send(Message msg);
}

class SimpleClient
{
public SimpleClient()
{
}

void SendMessage(IGenericMessageChannel channel, string input)
{
XmlDocument contentDocument;
contentDocument = new XmlDocument();
contentDocument.LoadXml("" + input + "");

XmlNodeReader content = new XmlNodeReader(contentDocument.DocumentElement);
MessageVersion messageVersion = MessageVersion.CreateVersion(EnvelopeVersion.Soap11);

using (Message msg = Message.CreateMessage(messageVersion, "http://tempuri.org/ISimpleService/Receive", content))
{
try
{
channel.Send(msg);
}
catch (Exception e)
{
Console.WriteLine("Exception: " + e.ToString());
}

}
}

public void Invoke( string input)
{
using (ChannelFactory channelFactory =
new ChannelFactory("InfoCardClientConfig"))
{
channelFactory.Open();
IGenericMessageChannel channel = channelFactory.CreateChannel();
SendMessage(channel, input);
channelFactory.Close();
}
}
}
}


I call this client from another class which is irrelevant to the InfoCard/Indigo magic.

My Simple Indigo Service

Now onto some real infocard work. To begin with, I developed a simple webservice and client using Indigo. This service basically displays the raw SOAP which it is sent:


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

//This is the Indigo namespace
using System.ServiceModel;
using System.Xml;

namespace InfoCardService
{
/**
Here, I'm using an interface to define the service contract.
Service contracts are explicit in Indigo, and can be distict
from application/class level contract as seen here.
*/
[ServiceContract]
interface ISimpleService
{
//A very raw service - interface accepts low level message type.
[OperationContract(IsOneWay = true)]
void Receive(System.ServiceModel.Message msg);
}


public partial class SimpleService : Form, ISimpleService
{
//selfhosting ServiceHost using generics to be types to my implementation
ServiceHost sh;

public SimpleService()
{
InitializeComponent();
}

private void button2_Click(object sender, EventArgs e)
{
sh.Close();
Application.Exit();
}

public void Receive(System.ServiceModel.Message msg)
{
MessageBox.Show("New Message:\n\n" + msg.ToString());
}

private void Start()
{
sh = new ServiceHost();
sh.Open();
}

static void Main(string[] args)
{
SimpleService service = new SimpleService();
service.Start();
Application.EnableVisualStyles();
Application.Run(service);
}

}
}

Invoking WS-Trust from Indigo

Making a WS-Trust RST Issue call from Indigo is pretty simple. I defined a custom security binding with a endpoint reference and presto...ws-trust.

To do this, I added this to the federationParameters section of a custom binding security element:

<endpoint address="http://192.168.9.10:8080/simpleservice" bindingConfiguration="WSTrustBinding" bindingSectionName="wsProfileBinding"/>

I then reference the binding from my client endpoint reference, and when I invoked my client, it makes this call:


POST /simpleservice HTTP/1.1
Content-Type: application/soap+xml; charset="utf-8" action="http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue"
Host: 192.168.9.11
Content-Length: 1304
Expect: 100-continue
Connection: Keep-Alive

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:Action>
<a:MessageID>uuid:6e984807-8946-4201-a757-2b6829a5fdb4;id=0</a:MessageID>
<a:To s:mustUnderstand="1">http://192.168.9.10:8080/simpleservice</a:To>
<a:ReplyTo>
<a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
</a:ReplyTo>
</s:Header>
<s:Body>
<t:RequestSecurityToken Context="uuid-58ae93d3-a412-4ee4-97ab-288bc880b35a-2" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust">
<t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType>
<t:BinaryExchange ValueType="http://schemas.microsoft.com/net/2004/07/secext/WS-SPNego">TlRMTVNTUAABAAAAt4IY4gAAAAAAAAAAAAAAAAAAAAAFAs4OAAAADw==</t:BinaryExchange>
<wsp:AppliesTo xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<EndpointReference xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x="http://schemas.microsoft.com/2003/10/Serialization/">
<Address>http://192.168.9.10:8080/simpleservice</Address>
</EndpointReference>
</wsp:AppliesTo>
<t:KeySize>256</t:KeySize>
</t:RequestSecurityToken>
</s:Body></s:Envelope>


Looks to be using a web serivce binding of SPNego by default. I wish I had a remote STS to play with...

The InfoCard API

The InfoCard API is pretty straight forward (and I suspect in flux). There are only really 2 classes to pay attention to:

Microsoft.InfoCards.InfoCardClient


public static System.ServiceModel.Security.GenericXmlToken GetToken(System.ServiceModel.EndpointAddress endPoint, System.Collections.Generic.IEnumerable policy, System.Xml.XmlElement requiredRemoteTokenIssuer)

public static void Manage()


(Notice no constructor)

Microsoft.InfoCards.InfoCardTokenProvider


public override System.IAsyncResult BeginGetToken(System.ServiceModel.EndpointAddress target, System.AsyncCallback callback, object state)

public override System.ServiceModel.Security.Tokens.SecurityToken EndGetToken(System.IAsyncResult result)

public override System.ServiceModel.Security.Tokens.SecurityToken GetToken(System.ServiceModel.EndpointAddress target)

public InfoCardTokenProvider()

public override bool TryApplyIssuedTokenParameters(System.ServiceModel.Security.IIssuedTokenParameters parameters)

public override bool WillGetTokenCompleteSynchronously(System.ServiceModel.EndpointAddress target)



Besides that, it's all exceptions:
Microsoft.InfoCards.InfoCardException
Microsoft.InfoCards.NoDefaultCardException
Microsoft.InfoCards.ProvisioningCommunicationException
Microsoft.InfoCards.ServiceNotStartedException
Microsoft.InfoCards.StsCommunicationException
Microsoft.InfoCards.SuppressUIFailedException
Microsoft.InfoCards.UndisclosedClaimException
Microsoft.InfoCards.UnsupportedKeyGenerationTypeException
Microsoft.InfoCards.UntrustedRecipientException
Microsoft.InfoCards.UserCancellationException

A few other intersting things show up in the Indigo APIs:

Support for SAML, Kerb, X509, UserName, Windows, and WindowsUserName Tokens

Looks like support for April 04 and Feb 05 versions of WS-Trust

Today's barksdale-ism

Saturday, June 18, 2005

Programming InfoCard - part 1. Invoking the UI

Since I'm un-employed this weekend (I'm starting a new job at Sxip Identity on Monday), I thought I'd sit down and poke around the new Microsoft.InfoCards API and Indigo.

To start with, I suppose I'd better state up front that I haven't ever used Windows as my primary Desktop OS, and this is my first dive into C# as well. Fortunately, it seems to be enough of a Java clone that the learning curve is really quick...it feels a lot like Java 1.5.

Invoking the InfoCard UI:

My first step was to get the WinFX CTP and VisualStudio Betas installed. This was pretty straightforward, but make sure you have the latest of each, as there are some linking dependencies in the .NET build that require a specific combination. Also, I'd recommend the express version of Studio, as the full version is several GB.

To start out hacking with InfoCard, I thought I'd simply invoke the InfoCard UI. The simple way to do this is to hit the ControlPanel -> Digital identities. (Note that you can start the system by running: net start "InfoCard Service" at the command prompt if the system is not started for you) The result is the following wireframe UI:



Click for a larger version


It's also quite simple to invoke this via code. To do so, you can simply use the Manage() method on Microsoft.InfoCards.InfoCardClient. Simply create a new Console application, and add a reference to the Microsoft.InfoCards assembly. Then, the following code will invoke the InfoCardUI


using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.InfoCards;

namespace ManageInfoCard
{
class Program
{
static void Main(string[] args)
{
InfoCardClient.Manage();
}
}
}


That's all it takes to invoke the InfoCard system from code. More to come....

While you wait- here are some interesting links on Infocard, and Indigo which I found useful:

Indigo Docs on Infocard
A weekend with Indigo
Andy's InfoCard Blog
Simple Indigo Client
Simple Indigo Service

Daily Barksdale-ism

I recently ran across an old book of Barksdale-isms from Netscape. I thought I'd share some of the choice ones.

Today's - The three rules of snakes:



Tuesday, June 14, 2005

Tsunami!

Tsunami Alert in San Francisco - if there is one, it's will hit the bay at 9:24 tonight..

Monday, June 13, 2005

martha's vineyard

Mara and I just got back form a week on MV. I went a little crazy with the camera, and ended up with a flickr photoset that's 140+ large. Enjoy!

Tuesday, June 07, 2005

wisco represent

My good friend hamlett passed along some must haves for proud 'sconies: Illannoy.com

chappaquiddick

Congrats to Barrett and Anne!

Thursday, June 02, 2005

netscape directory...

...has finally gone open-source!

http://directory.fedora.redhat.com/wiki/Main_Page

It's refreshing to see something positive coming out of the ashes of Netscape - between embedding IE in Netscape 8, and the low-cost ISP ads...

Monday, May 30, 2005

more traveling with mara

I finally got around to putting together a slide show of our recent Mexico trip. I just can't say enough nice things about Tulum.