Service Provider
SP:n on mahdollista pyytää SAML Subject-ID:tä tai Pairwise-ID:tä. Pyytäminen tehdään resurssirekisterissä SP:lle "SP Basic information" välilehdellä. Tämä lisää metadataan entiteetti attribuutti määrityksen laajennusta käyttäen (Esimerkki alla, jossa palvelu pyytää subject-id:tä)
rr.funet.fi ja metadata
<EntityDescriptor xmlns:ds="http://www.w3.org/2000/09/xmldsig#" entityID="https://rr.funet.fi/attribute-test"> <Extensions> <Extensions> <mdattr:EntityAttributes> <saml:Attribute Name="urn:oasis:names:tc:SAML:profiles:subject-id:req" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"> <saml:AttributeValue>any</saml:AttributeValue> </saml:Attribute> </mdattr:EntityAttributes> </Extensions> ...
Mahdollisia vaihtoehtoja ovat "not in use", subject-id, pairwise-id, none tai any. "Not in use" ei kirjoita metadatoihin ollenkaan kyseistä laajennusta.
Shibboleth-SP:n attribute-map
attribute-map.xml
<Attribute name="urn:oasis:names:tc:SAML:attribute:subject-id" id="subject-id"> <AttributeDecoder xsi:type="ScopedAttributeDecoder" caseSensitive="false"/> </Attribute> <Attribute name="urn:oasis:names:tc:SAML:attribute:pairwise-id" id="pairwise-id"> <AttributeDecoder xsi:type="ScopedAttributeDecoder" caseSensitive="false"/> </Attribute>
Identity Provider
Shibboleth-IdP:n mukana toimitetussa attribuutti filtterissä on säännöt näiden subject-id attribuuttien välittämiselle.
attribute-filter.xml
<!-- Example rule for honoring Subject ID requirement tag in metadata. The example supplies pairwise-id if subject-id isn't explicitly required. --> <AttributeFilterPolicy id="subject-identifiers"> <PolicyRequirementRule xsi:type="ANY" /> <AttributeRule attributeID="samlPairwiseID"> <PermitValueRule xsi:type="OR"> <Rule xsi:type="EntityAttributeExactMatch" attributeName="urn:oasis:names:tc:SAML:profiles:subject-id:req" attributeNameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" attributeValue="pairwise-id" /> <Rule xsi:type="EntityAttributeExactMatch" attributeName="urn:oasis:names:tc:SAML:profiles:subject-id:req" attributeNameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" attributeValue="any" /> </PermitValueRule> </AttributeRule> <AttributeRule attributeID="samlSubjectID"> <PermitValueRule xsi:type="EntityAttributeExactMatch" attributeName="urn:oasis:names:tc:SAML:profiles:subject-id:req" attributeNameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" attributeValue="subject-id" /> </AttributeRule> </AttributeFilterPolicy>
Esimerkki resolverista kun käytetään pairwise-id:nä storedId:tä ja subjectina eduPersonPrincipalNamea
attribute-resolver.xml
<AttributeDefinition id="samlSubjectID" xsi:type="Scoped" scope="%{idp.scope}"> <InputAttributeDefinition ref="eduPersonPrincipalName" /> </AttributeDefinition> <AttributeDefinition id="samlPairwiseID" xsi:type="Scoped" scope="%{idp.scope}"> <InputDataConnector ref="StoredIdConnector" attributeNames="storedId"/> </AttributeDefinition>