In order to assure that public sector relying parties are able to comply with policies that limit the identity information that they need from a CSP to specific authorized purposes, such as authentication and identity resolution, CSPs should transmit only those attributes that are explicitly requested by an RP. This blog post provides a pointer to a standards based mechanism to do this in the front channel using SAML 2.0.
Many of the front-channel SAML 2.0 federation implementations I've seen tend to be rather promiscuous in that they have defined a (sometimes) minimal and default attribute bundle for their community, and deliver it with every authenticated response. While that would work within that community, it becomes problematic if that community needs to inter-operate with a public sector RP that has very specific privacy policies that limits the information it can get from a CSP to only that which it has specifically requested.
To enable this capability, it is necessary to utilize an optional element of the SAML 2.0 protocol called the AttributeConsumingServiceIndex in an authentication request that is generated by an RP (Line 8 below):
AttributeConsumingServiceIndex (Optional) - Indirectly identifies information associated with the requester describing the SAML attributes the requester desires or requires to be supplied by the identity provider in theSAML 2.0 Core Specification
message. The identity provider MUST have a trusted means to map the index value in the attribute to information associated with the requester. [SAMLMeta] provides one possible mechanism. The identity provider MAY use this information to populate one or more elements in the assertion(s) it returns.
The key here is to define, out-of-band, the index values which are pointers to specific attribute bundles. For example:
- AttributeConsumingServiceIndex="0" - Don't send any attributes
- AttributeConsumingServiceIndex="1" - Send attribute bundle 1 (First Name, Last Name)
In an ideal scenario, you would point to and advertise each of the attribute bundles using SAML Metadata, but there is nothing stopping you from hard coding those bundles into your implementation based on out-of-band agreements (short term results with potential long term management headaches). The end result is that the RP receives only those attributes it has specifically requested per its policy.
In the above example, the RP requested index (bundle) 1 as part of the Authentication Request, which has been defined out of band to be First Name and Last Name. That in turn would result in the CSP, after authenticating the individual, issuing the following response with an Assertion consisting of both an Authentication Statement as well as an Attribute Statement:
I would be very interested in knowing which of the commercial and open source federation implementations currently support the AttributeConsumingServiceIndex capability out of the box.
Did you find this interesting? Don't miss any new posts. Sign up to automatically receive them now!
This blog post first appeared on Anil John | Blog (https://blog.aniljohn.com). The opinions expressed here are my own and do not represent my employer’s view in any way.