Page tree
Skip to end of metadata
Go to start of metadata

A name identifier, represented by the <NameIdentifier> element in SAML 1 and the <NameID> element in SAML 2, is generally used to identify the subject of a SAML assertion. Name identifiers can be anything; an email address or a Kerberos principal name are common, every-day examples of such information. SAML 2 also defines more specialized identifier types with particular properties useful in federated applications.

Strictly speaking, SAML assertions don't have to contain an identifier. The subject may be implicitly identified as the bearer of the token or anybody able to demonstrate possession of a key. In SSO use cases, one reason for including an identifier is to enable the relying party to refer to the subject later, such as in a query, or a logout request. So-called "transient" identifiers that are generated uniquely for each assertion are often used to support those use cases and are a common pattern in Shibboleth deployments.

Every name identifier is associated with a format. Formats label the identifier at runtime to help applications process them appropriately. They're conceptually similar to an Attribute Name and in fact one conventional way to express a SAML Attribute as a name identifier is to encode its Name as a Format (assuming the Attribute Name is a URI).

Name identifiers can also be described by the following characteristics:

  • persistent - whether a given name identifier is intended to be used across multiple sessions. An identifier intended to be used for a single session only is called a transient identifier.
  • revocable - whether a given name identifier can be revoked. An identifier that persists over the entire lifetime of a subject's relationship with an IdP is called a permanent identifier.
  • reassignable - whether a given name identifier, once revoked, may be re-assigned to a different subject
  • opaque - whether a relying party can positively identify the subject from a given name identifier. (A UUID is an example of an opaque identifier.) An identifier that can be used to positively identify the subject is called a transparent identifier. Many email addresses and network login IDs (such as eduPersonPrincipalName) are transparent when derived from a subject's name.
  • targeted - whether a given name identifier is intended for a specific relying party (or parties) and not for anyone else. An identifier that is not targeted is a shared identifier.
  • portable - whether a given name identifier is usable across security domains.
  • global - whether a given name identifier value is globally unique. However, a name identifier may be "qualified" to ensure global uniqueness. Typically, the qualifier is the identifier of the issuer or a DNS domain associated with the issuer.

A special type of globally unique identifier is a scoped attribute, which has the form userid@scope. In practice, the scope value is a DNS domain, which ensures global uniqueness.

Here are some examples:

Identifier / AttributePersistentRevocableReassignableOpaqueTargetedPortableGlobalQualifier
SAML2 Transient NameIDNoN/AN/AYesN/AN/AYesN/A
SAML2 Persistent NameIDYesYesNoYesYesYesNoIssuer ID

eduPersonTargetedID

YesYesNoYesYesYesNoIssuer ID

eduPersonPrincipalName

YesYesYesNoNoNoYesScoped

eduPersonUniqueId

YesYesNoYesNoNoYesScoped
Social Security NumberYesNoN/ANoNoYesNoUS Citizens
Phone NumberYesYesYesNoNoNoYesN/A
OIDC public sub claimYesYesNoYesNoNoNoIssuer ID
OIDC pairwise sub claimYesYesNoYesYesNoNoIssuer ID
ORCIDYesYesNoYesNoYesYesN/A

Notes:

  1. The SAML2 Persistent name identifier and the eduPersonTargetedID attribute are functionally equivalent. Indeed, the value of the latter is precisely a SAML2 Persistent <NameID> element.
  2. The SAML2 Persistent name identifier (and hence eduPersonTargetedID) are portable in the sense that any issuer can assert a known SAML2 Persistent <NameID> element. For example, a SAML2 Persistent <NameID> can transit a SAML IdP Proxy as-is, without modification.
  3. The SAML2 Persistent name identifier and the OIDC pairwise sub claim differ with respect to the portability characteristic only. In particular, the sub claim can not transit a gateway since the iss claim is required for global uniqueness.
  4. A Phone Number is not universally portable but within the US, Phone Number is indeed a portable identifier. In fact, it is one of the few portable identifiers with no qualifier.

Attributes vs. Identifiers

In SAML, subjects are also commonly described with Attributes. In contrast to name identifiers, SAML Attributes can have multiple values and aren't necessarily usable as identifiers, but any name identifier can usually be expressed as an Attribute.

Shibboleth deployments traditionally have focused on the use of Attributes to describe subjects, and default to the use of transient name identifiers (or omitting them). Commercial SAML deployments rarely make use of Attributes and tend to use loosely or improperly specified name identifiers.

The properties above used to describe name identifiers also apply to attributes when those attributes are themselves unique identifiers for a subject. Of course, many attributes are not identifiers at all, merely data of various kinds.

Note, however, that using this mechanism does not magically convey the reversibility property on an attribute. Whichever attribute is chosen to be encoded as the name identifier must already have this property. The encoding process does, however, add the scoped property and is not something that a deployer must explicitly configure.

  • No labels

1 Comment

  1. Copying over a comment from the old NameID page from David Macdonald...

    A few references for questions around ORCiD:

    • Closing an ORCiD Account specifies that if a user closes an account then they are unable to get a new one (although a user can re-open the account if necessary) implying that ORCiD is not reassignable as per the above definition
    • Managing Dupicate IDs specifies that duplicate ORCiDs can be 'merged' through deprecation of old ones. I'm inclined to believe the deprecated identifier won't be useable as an identity after and hence 'revocable' as per the definition above