You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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ä) 

<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.

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ä targeted-id: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>
  





  • No labels