Dies ist eine alte Version des Dokuments!


Attribute Filter Konfiguration - Beispiele

Siehe Dokumentation im Shibboleth Wiki

Beispiele für Shibboleth IdP 2.4.x finden sich in der alten Online-Dokumentation.

/opt/shibboleth-idp/conf/attribute-filter.xml
<!-- Anonyme Angaben können an alle SP freigegeben werden,
     damit sind fast alle Verlagsanbieter-SPs in der Föderation 
     schon zufrieden -->
 
<AttributeFilterPolicy id="releaseToAnyone">
   <PolicyRequirementRule xsi:type="ANY" />
 
   <!-- eduPersonEntitlement nur den relevanten Wert für die Verlage -->
   <AttributeRule attributeID="eduPersonEntitlement">
      <PermitValueRule xsi:type="Value" value="urn:mace:dir:entitlement:common-lib-terms"/>
   </AttributeRule>
 
   <!-- eduPersonScopedAffiliation nur die anonymen Werte
        "member" und "library-walk-in"-->
   <AttributeRule attributeID="eduPersonScopedAffiliation">
      <PermitValueRule xsi:type="OR">
         <Rule xsi:type="Value" value="member" ignoreCase="true" /> 
         <Rule xsi:type="Value" value="library-walk-in" ignoreCase="true" /> 
      </PermitValueRule>
   </AttributeRule>
 
</AttributeFilterPolicy>

Ausführliches Beispiel, das alle Eventualitäten abdecken sollte:

/opt/shibboleth-idp/conf/attribute-filter.xml
    <AttributeFilterPolicy id="releaseToCoCo">
 
       <PolicyRequirementRule 
               xsi:type="EntityAttributeExactMatch"
               attributeName="http://macedir.org/entity-category"
               attributeValue="http://www.geant.net/uri/dataprotection-code-of-conduct/v1" />
 
       <!--onlyIfRequired="true" kann hier weggelassen werden, da ab IdPv3.2 Default--> 
 
       <AttributeRule attributeID="displayName">
          <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="eduPersonScopedAffiliation">
          <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="eduPersonAffiliation">
          <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="mail">
          <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="cn">
         <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="givenName">
         <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="sn">
          <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="eduPersonPrincipalName">
          <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="schacHomeOrganization">
         <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="schacHomeOrganizationType">
          <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="eduPersonTargetedID">
          <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
       <AttributeRule attributeID="o">
          <PermitValueRule xsi:type="AttributeInMetadata"/>
       </AttributeRule>
 
</AttributeFilterPolicy>
/opt/shibboleth-idp/conf/attribute-filter.xml
    <AttributeFilterPolicy id="releaseEverythingToClarin">
        <PolicyRequirementRule xsi:type="AND">
           <Rule xsi:type="EntityAttributeExactMatch"
                 attributeName="http://macedir.org/entity-category"
                 attributeValue="http://clarin.eu/category/clarin-member" />
           <!--
               wer sichergehen will, dass nur SPs bedient werden, die europäischen 
               Datenschutzrichtlinien genügen, nimmt noch den Code-of-Conduct dazu
               (https://www.aai.dfn.de/der-dienst/datenschutz/data-protection-code-of-conduct/)
           -->
           <Rule xsi:type="EntityAttributeExactMatch"
                 attributeName="http://macedir.org/entity-category"
                 attributeValue="http://www.geant.net/uri/dataprotection-code-of-conduct/v1" />
        </PolicyRequirementRule>
 
        <AttributeRule attributeID="eduPersonAffiliation">
           <!--onlyIfRequired="true" kann hier weggelassen werden, da ab IdPv3.2 Default-->
           <PermitValueRule xsi:type="AttributeInMetadata"/>
        </AttributeRule>
 
        <!-- entweder eduPersonPrincipalName *oder* eduPersonTargetedID-->
        <AttributeRule attributeID="eduPersonPrincipalName">
           <PermitValueRule xsi:type="AttributeInMetadata"/>
        </AttributeRule>
 
        <AttributeRule attributeID="eduPersonTargetedID">
           <PermitValueRule xsi:type="AttributeInMetadata"/>
        </AttributeRule>
 
        <AttributeRule attributeID="sn">
           <PermitValueRule xsi:type="AttributeInMetadata"/>
        </AttributeRule>
 
        <!-- einige SPs verlangen 'cn', andere 'displayName' -->
 
        <AttributeRule attributeID="cn">
           <PermitValueRule xsi:type="AttributeInMetadata"/>
        </AttributeRule>
 
        <AttributeRule attributeID="displayName">
           <PermitValueRule xsi:type="AttributeInMetadata"/>
        </AttributeRule>
 
        <AttributeRule attributeID="mail">
           <PermitValueRule xsi:type="AttributeInMetadata"/>
        </AttributeRule>
 
        <!-- einige SPs verlangen 'o', andere 'schacHomeOrganization' -->
 
        <AttributeRule attributeID="o">
           <PermitValueRule xsi:type="AttributeInMetadata"/>
        </AttributeRule>
 
        <AttributeRule attributeID="schacHomeOrganization">
           <PermitValueRule xsi:type="AttributeInMetadata"/>
        </AttributeRule>
 
        <AttributeRule attributeID="schacHomeOrganizationType">
           <PermitValueRule xsi:type="AttributeInMetadata"/>
        </AttributeRule>
 
</AttributeFilterPolicy>
/opt/shibboleth-idp/conf/attribute-filter.xml
<AttributeFilterPolicy id="releaseToRandS">
 
   <PolicyRequirementRule 
           xsi:type="EntityAttributeExactMatch"
           attributeName="http://macedir.org/entity-category"
           attributeValue="http://refeds.org/category/research-and-scholarship" />
 
   <AttributeRule attributeID="eduPersonScopedAffiliation">
       <PermitValueRule xsi:type="AttributeInMetadata"/>
   </AttributeRule>
 
   <!-- falls eduPersonPrincipalName neu vergeben werden kann,
        muss  eduPersonTargetedID mit uebertragen werden -->
   <AttributeRule attributeID="eduPersonPrincipalName">
      <PermitValueRule xsi:type="AttributeInMetadata"/>
   </AttributeRule>
 
   <AttributeRule attributeID="eduPersonTargetedID">
      <PermitValueRule xsi:type="AttributeInMetadata"/>
   </AttributeRule>
 
   <!-- entweder sn + givenName oder displayName -->
   <AttributeRule attributeID="givenName">
      <PermitValueRule xsi:type="AttributeInMetadata"/>
   </AttributeRule>
 
   <AttributeRule attributeID="sn">
      <PermitValueRule xsi:type="AttributeInMetadata"/>
   </AttributeRule>
 
   <AttributeRule attributeID="displayName">
      <PermitValueRule xsi:type="AttributeInMetadata"/>
   </AttributeRule>
 
   <AttributeRule attributeID="mail">
      <PermitValueRule xsi:type="AttributeInMetadata"/>
   </AttributeRule>
 
</AttributeFilterPolicy>
  • Zuletzt geändert: vor 9 Jahren