IdP Auffrischungs-Workshop

DFN Logo




Vorbereitung

Für den Workshop benötigen wir die nachfolgend beschriebene Schulungs-VM.

Informationen zur Schulungs-VM

Für den Workshop stellen wir eine Schulungs-VM zur Verfügung. Installieren Sie diese bitte vorab und machen sich mit der VM vertraut. Als Virtualisierungssoftware empfehlen wir VirtualBox in der neuesten Version.
  1. Import des heruntergeladenen .ova-Images in Virtualbox: Datei -> Appliance importieren. Im BIOS muss Hardware-Virtualisierung angeschaltet sein.
  2. Für ein Copy & Paste ohne Gasterweiterungen können Sie diese Installationsanleitung selbstverständlich auch im Browser in der VM abrufen. Dazu finden Sie im Firefox ein Lesezeichen in der Leiste.
  3. Betriebssystem der Schulungs-VM: Debian 12
  4. Die Nutzerkennung lautet "shibboleth". Alle Passwörter lauten ebenfalls "shibboleth".
  5. Auf der VM befindet sich ein LDAP-Browser (phpLDAPadmin), der im Web-Browser (Firefox) als Lesezeichen gesetzt ist. Im Verzeichnis finden Sie sechs Test-Accounts mit verschiedenen Attributen.
  6. Zum besseren Verständnis des lokalen Setups (idp/sp1) hilft ein Blick in /etc/hosts und die Apache-Konfiguration unter /etc/apache2/sites-enabled.
  7. Die wichtigsten vorinstallierten Pakete sind Web-, Datenbank- und LDAP-Server:
Hier starten wir mit dem Workshop

Bestandsaufnahme IdP

Zurück zum Inhaltsverzeichnis

Wesentliche Komponenten der Schulungs-VM:
  1. Shibboleth IdP
  2. Shibboleth-SP
  3. LDAP-Server
  4. Apache-Webserver
  5. Webbrowser Firefox, mit Bookmarks für

Überblick Attribute-Resolver

Zurück zum Inhaltsverzeichnis

Verschaffen Sie sich einen Überblick über Attribut-Definitionen und DataConnectors.
Welche Attribute-Definitionen und DataConnectors sind vorhanden?


Überblick anzeigen
Attribute-Definitions
Attribute IDxsi:typeref
uidsimplemyLDAP
eduPersonAffiliationsimplemyLDAP
eduPersonScopedAffiliationscopedmyLDAP
eduPersonEntitlementscriptedAttribute
samlPairwiseIDscopedStoredId
eduPersonTargetedIDsaml2NameIDStoredId
Data Connectors
DataConnector IDxsi:typeAttribute
staticAttributesstaticschacHomeOrganisation, o
StoredIdStoredIDpersistentID
myLDAPLDAPDirectorygivenName,sn,mail,displayName

Überblick Attribute-Filter

Welche Filter-Regeln sind vorhanden?

Überblick anzeigen
 <!-- Datei: /opt/shibboleth-idp/conf/attribute-filter.xml -->
<!-- Release home org signifier to everybody. -->
<AttributeFilterPolicy id="alwaysRelease">
  <PolicyRequirementRule xsi:type="ANY" />
  <AttributeRule attributeID="schacHomeOrganization" permitAny="true" />
</AttributeFilterPolicy>

<!-- Release to local SPs -->
<AttributeFilterPolicy id="SPs_locals">
  <PolicyRequirementRule xsi:type="Requester" value="https://sp1.local/shibboleth" />
  <AttributeRule attributeID="eduPersonScopedAffiliation" permitAny="true" />
  <AttributeRule attributeID="sn"                         permitAny="true" />
  <AttributeRule attributeID="givenName"                  permitAny="true" />
  <AttributeRule attributeID="mail"                       permitAny="true" />
  <AttributeRule attributeID="uid"                        permitAny="true" />
  <AttributeRule attributeID="eduPersonTargetedID"        permitAny="true" />
</AttributeFilterPolicy>

Überblick relying-party

Die Datei relying-party.xml definiert, welche Protokolle/Profiles ein IdP anbietet und erlaubt maßgeschneiderte Einstellungen für verschiedene SPs. Zu unterscheiden sind die drei Beans:
  • shibboleth.UnverifiedRelyingParty
  • shibboleth.DefaultRelyingParty
  • shibboleth.RelyingPartyOverrides
  • Verschaffen Sie sich einen Überblick über die vorhandenen Inhalte dieser Beans.

    Überblick anzeigen
     <!-- Datei: /opt/shibboleth-idp/conf/relying-party.xml -->
      <bean id="shibboleth.UnverifiedRelyingParty" parent="RelyingParty">
        <property name="profileConfigurations">
          <list>
            <!-- <bean parent="SAML2.SSO" p:encryptAssertions="false" /> -->
          </list>
        </property>
      </bean>
    
      <bean id="shibboleth.DefaultRelyingParty" parent="RelyingParty">
          <property name="profileConfigurations">
            <list>
              <!-- SAML 1.1 and SAML 2.0 AttributeQuery are disabled by default. -->
              <!--
              <ref bean="Shibboleth.SSO" />
              <ref bean="SAML1.AttributeQuery" />
              <ref bean="SAML1.ArtifactResolution" />
                -->
              <bean parent="SAML2.SSO" p:postAuthenticationFlows="#{{'attribute-release'}}" p:nameIDFormatPrecedence="#{{'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent', 'urn:oasis:names:tc:SAML:2.0:nameid-format:transient'}}" />
                <ref bean="SAML2.ECP" />
                <ref bean="SAML2.Logout" />
                  <!--
                  <ref bean="SAML2.AttributeQuery" />
                  -->
                  <ref bean="SAML2.ArtifactResolution" />
              </list>
          </property>
      </bean>

    Loglevel

    FÜr die Dauer dieses Workshops wird das Loglevel erhöht:
    <!-- Datei: /opt/shibboleth-idp/conf/logback.xml -->
      <variable name="idp.loglevel.idp" value="DEBUG" />
      <variable name="idp.loglevel.ldap" value="WARN" />
      <variable name="idp.loglevel.messages" value="DEBUG" />
      <variable name="idp.loglevel.encryption" value="DEBUG" />
      <variable name="idp.loglevel.opensaml" value="INFO" />
      <variable name="idp.loglevel.props" value="INFO" />
      <variable name="idp.loglevel.httpclient" value="INFO" />
    
    Stoßen Sie das Neuladen des Servlets manuell an:
    touch /opt/shibboleth-idp/war/idp.war
    

    Attribut-Übertragung

    Welche Attribute werden bei einem Login auf SP1 und SP2 übertragen. Verlassen Sie sich nicht ausschließlich auf die Anzeige im Browser beim User-Consent. Prüfen Sie im Log-File die Assertion.
    Dazu suchen Sie in der Log-Datei /opt/shibboleth-idp/logs/idp-process.log nach Assertion before encryption.
    Hier finden Sie die vom IdP an den SP übertragenen Attribute, sowie die NameID im Format urn:oasis:names:tc:SAML:2.0:nameid-format:transient.

    Assertion SP1
    <!-- Datei: /opt/shibboleth-idp/logs/idp-process.log -->
        <?xml version="1.0" encoding="UTF-8"?><saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_c7ccec23382116735f43f2b7e6abc982" IssueInstant="2026-01-22T10:17:57.778Z" Version="2.0">
        <saml2:Issuer>https://idp.local/idp/shibboleth</saml2:Issuer>
        <saml2:Subject>
            <saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" NameQualifier="https://idp.local/idp/shibboleth" SPNameQualifier="https://sp1.local/shibboleth"xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">LSPX4Z4UJWIXKWFONRF5YUY75YTQ5TL2
            <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
              <saml2:SubjectConfirmationData Address="127.0.0.1" InResponseTo="_e7012caa5fda31c05824f4a2845ad070" NotOnOrAfter="2026-01-22T10:22:57.800Z" Recipient="https://sp1.local/Shibboleth.sso/SAML2/POST"/>
            </saml2:SubjectConfirmation>
        </saml2:Subject>
        <saml2:Conditions NotBefore="2026-01-22T10:17:57.778Z" NotOnOrAfter="2026-01-22T10:22:57.778Z">
            <saml2:AudienceRestriction>
                <saml2:Audience>https://sp1.local/shibboleth</saml2:Audience>
            </saml2:AudienceRestriction>
        </saml2:Conditions>
        <saml2:AuthnStatement AuthnInstant="2026-01-22T10:17:51.863Z" SessionIndex="_8f9a906bafe493d92cc8707909dc95eb">
            <saml2:SubjectLocality Address="127.0.0.1"/>
            <saml2:AuthnContext>
                <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml2:AuthnContextClassRef>
            </saml2:AuthnContext>
        </saml2:AuthnStatement>
        <saml2:AttributeStatement>
            <saml2:Attribute FriendlyName="schacHomeOrganization" Name="urn:oid:1.3.6.1.4.1.25178.1.2.9" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                <saml2:AttributeValue>local</saml2:AttributeValue>
            </saml2:Attribute>
            <saml2:Attribute FriendlyName="eduPersonScopedAffiliation" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.9" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                <saml2:AttributeValue>student@local</saml2:AttributeValue>
                <saml2:AttributeValue>member@local</saml2:AttributeValue>
            </saml2:Attribute>
            <saml2:Attribute FriendlyName="givenName" Name="urn:oid:2.5.4.42" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                <saml2:AttributeValue>Anna</saml2:AttributeValue>
            </saml2:Attribute>
            <saml2:Attribute FriendlyName="uid" Name="urn:oid:0.9.2342.19200300.100.1.1" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                <saml2:AttributeValue>anna</saml2:AttributeValue>
            </saml2:Attribute>
            <saml2:Attribute FriendlyName="mail" Name="urn:oid:0.9.2342.19200300.100.1.3" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                <saml2:AttributeValue>anna.schmidt@uni.de</saml2:AttributeValue>
            </saml2:Attribute>
            <saml2:Attribute FriendlyName="eduPersonTargetedID" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.10" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                <saml2:AttributeValue>
                    <saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" NameQualifier="https://idp.local/idp/shibboleth" SPNameQualifier="https://sp1.local/shibboleth">LSPX4Z4UJWIXKWFONRF5YUY75YTQ5TL2</saml2:NameID>
                </saml2:AttributeValue>
            </saml2:Attribute>
            <saml2:Attribute FriendlyName="sn" Name="urn:oid:2.5.4.4" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                <saml2:AttributeValue>Schmidt</saml2:AttributeValue>
            </saml2:Attribute>
        </saml2:AttributeStatement>
    </saml2:Assertion>
      

    Assertion SP2
    <!-- Datei: /opt/shibboleth-idp/logs/idp-process.log -->
          <?xml version="1.0" encoding="UTF-8"?><saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_2e601cd9c678ea0aa6d2de6a0151fd0c" IssueInstant="2026-01-22T10:18:22.533Z" Version="2.0">
        <saml2:Issuer>https://idp.local/idp/shibboleth</saml2:Issuer>
        <saml2:Subject>
            <saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" NameQualifier="https://idp.local/idp/shibboleth" SPNameQualifier="https://sp2.local/shibboleth" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">QI3P4IOWTZDFLPPISAFD7TYAJLXA5GRX</saml2:NameID>
            <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
                <saml2:SubjectConfirmationData Address="127.0.0.1" InResponseTo="_9adf8c3893cb82c8758a2e5200b3e8fa" NotOnOrAfter="2026-01-22T10:23:22.551Z" Recipient="https://sp2.local/Shibboleth.sso/SAML2/POST"/>
            </saml2:SubjectConfirmation>
        </saml2:Subject>
        <saml2:Conditions NotBefore="2026-01-22T10:18:22.533Z" NotOnOrAfter="2026-01-22T10:23:22.533Z">
            <saml2:AudienceRestriction>
                <saml2:Audience>https://sp2.local/shibboleth</saml2:Audience>
            </saml2:AudienceRestriction>
        </saml2:Conditions>
        <saml2:AuthnStatement AuthnInstant="2026-01-22T10:18:18.582Z" SessionIndex="_6f0771619be64724cbd984657f7289ea">
            <saml2:SubjectLocality Address="127.0.0.1"/>
            <saml2:AuthnContext>
                <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml2:AuthnContextClassRef>
            </saml2:AuthnContext>
        </saml2:AuthnStatement>
        <saml2:AttributeStatement>
            <saml2:Attribute FriendlyName="schacHomeOrganization" Name="urn:oid:1.3.6.1.4.1.25178.1.2.9" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                <saml2:AttributeValue>local</saml2:AttributeValue>
            </saml2:Attribute>
        </saml2:AttributeStatement>
    </saml2:Assertion>
        

    Aufwärmübung

    Zurück zum Inhaltsverzeichnis

    Aufgabe

    Definieren Sie eine zusätzliche Filterregel:
    Das Attribut eduPersonEntitlement wird immer übergeben, sofern es den Wert urn:mace:dir:entitlement:common-lib-terms (Bibliotheksnutzung) hat.

    Template AttributeFilterPolicy:
    <!-- Template AttributeFilterPolicy -->
        <AttributeFilterPolicy id="example1">
          <PolicyRequirementRule xsi:type="Requester" value="https://sp.example.org"/>
          <AttributeRule attributeID="mail">
            <PermitValueRule xsi:type="ANY"/>
          </AttributeRule>
    
    Im Template kommen die Rule Types Requester und ANY zum Einsatz.
    Weitere Rule Types werden hier erläutert: weitere Rule Types

    Zur Lösungsfindung helfen Ihnen folgende Fragen:
    1. PolicyRequirementRule
    2. AttributeRule

    Lösung

    Lösung
    <!-- Bibliotheksnutzung -->
        <AttributeFilterPolicy id="lib-entitlement-policy">
          <PolicyRequirementRule xsi:type="ANY"/>
              <AttributeRule attributeID="eduPersonEntitlement">
                <PermitValueRule xsi:type="Value" value="urn:mace:dir:entitlement:common-lib-terms"/>
              </AttributeRule>
        </AttributeFilterPolicy>   
    

    Überprüfen Sie die Filterregel, indem Sie einen Login auf SP1 und SP2 durchführen.

    Übung 1 - eduPersonAffiliation

    Zurück zum Inhaltsverzeichnis

    Aufgabe

  • Nur Angehörige (member) sollen Zugriff auf Bibliotheksinhalte erhalten
  • Zur Autorisierung soll das Attribut eduPersonAffiliation bereit gestellt werden
  • für die Erzeugung von eduPersonAffiliation soll das Attribut ou verwendet werden
  • Herangehensweise Attribute-Definition

    Nehmen Sie an, das Attribut eduPersonAffiliation wird nicht vom LDAP geliefert.

    Schritt 1 - vorhandene Attribute-Definition für eduPersonAffiliation auskommentieren/entfernen

    Dafür kommentieren Sie als erstes die Attribute-Definition in der Datei attribute-resolver.xml aus:
    <!--/opt/shibboleth-idp/conf/attribute-resolver.xml -->
      <AttributeDefinition xsi:type="Simple" id="eduPersonAffiliation">
        <InputDataConnector ref="myLDAP" attributeNames="eduPersonAffiliation" />
      </AttributeDefinition> 
    


    Schritt 2 - Attribute-Definition für ou anlegen

    Das Attribut eduPersonAffiliation soll mit Werten aus dem Attribut ou erzeugt/gemappt werden.
    Das Attribut ou ist zwar im LDAP vorhanden, wird aber in der attribute-resolver.xml noch nicht definiert.
    Damit Sie ou verwenden können, müssen Sie es definieren.
    Orientieren Sie sich bei der Attribute-Definition an der auskommentierten Definition von eduPersonAffiliation

    Schritt 3 - Mapping ou zu eduPersonAffiliation

    Informieren Sie sich im DFN-Wiki über das Attribut eduPersonAffiliation und die in Frage kommenden Werte dieses Attributs.

    Sie werden feststellen, dass diese Werte nicht aus dem LDAP kommen.
    Finden Sie ein geeignetes Mapping von ou auf eduPersonAffiliation

    Nachfolgend finden Sie die Tabelle mit dem Mapping.


    Tabelle Zuordnung ou-->eduPersonAffiliation
    GruppeoueduPersonAffiliation
    Mitarbeitendeou=Mitarbeitendestaff
    Studierendeou=Studierendestudent
    Lehrendeou=Lehrendefaculty
    Gaesteou=Gaesteaffiliate
    Externeou=Externe


    Schritt 4 - Attribute-Definition für eduPersonAffiliation vom Type mapped

    Template:
    <!--/opt/shibboleth-idp/conf/attribute-resolver.xml -->
      <AttributeDefinition xsi:type="Mapped" id="mappedAttribute">
        <InputAttributeDefinition ref="myLDAP" attributeNames="sourceAttr"/>
        <ValueMap>
          <ReturnValue>mappedValue1</ReturnValue>
          <SourceValue>sourceValue1</SourceValue>
        <ValueMap/>
        <DefaultValue passThru="true"/>
      </AttributeDefinition> 
    

    Lösung Attribute-Definition

    Attribute-Definition
    <!-- Datei: /opt/shibboleth-idp/conf/attribute-resolver.xml -->
        <AttributeDefinition xsi:type="Simple" id="ou">
          <InputDataConnector ref="ou"/>
        </AttributeDefinition>
        <!-- eduPersonAffiliation als Mapping auf ou -->
    <AttributeDefinition xsi:type="Mapped" id="eduPersonAffiliation">
      <InputAttributeDefinition ref="ou"/>
        <ValueMap>
          <ReturnValue>student</ReturnValue>
          <SourceValue>Studierende</SourceValue>
        </ValueMap>
        <ValueMap>
          <ReturnValue>staff</ReturnValue>
          <SourceValue>Mitarbeitende</SourceValue>
        </ValueMap>
        <ValueMap>
          <ReturnValue>faculty</ReturnValue>
          <SourceValue>Lehrende</SourceValue>
        </ValueMap>
        <ValueMap>
          <ReturnValue>affiliate</ReturnValue>
          <SourceValue>Gaeste</SourceValue>
        </ValueMap>
        <ValueMap>
          <ReturnValue>member</ReturnValue>
          <SourceValue>Studierende</SourceValue>
          <SourceValue>Mitarbeitende</SourceValue>
          <SourceValue>Lehrende</SourceValue>
        </ValueMap>
    </AttributeDefinition>
    

    Herangehensweise Attribute-Filter

    Die in der Aufwärmübung erstellte Regel muss geändert werden:
    <!--/opt/shibboleth-idp/conf/attribute-filter.xml -->
      <!-- Bibliotheksnutzung -->
      <AttributeFilterPolicy id="lib-entitlement-policy">
        <PolicyRequirementRule xsi:type="ANY"/>
            <AttributeRule attributeID="eduPersonEntitlement">
              <PermitValueRule xsi:type="Value" value="urn:mace:dir:entitlement:common-lib-terms"/>
            </AttributeRule>
      </AttributeFilterPolicy>   
    
    Zur Lösungsfindung helfen Ihnen folgende Fragen:
    1. PolicyRequirementRule
    2. AttributeRule
    Hier noch einmal der Link zu den Rule Types

    Lösung Attribute-Filter

    Attribute-Filter
    <!--/opt/shibboleth-idp/conf/attribute-filter.xml -->
        <!-- Bibliotheksnutzung -->
        <AttributeFilterPolicy id="lib-entitlement-policy">
          <PolicyRequirementRule xsi:type="Value" attributeID="eduPersonAffiliation" value="member" caseSensitive="false"/>
          <AttributeRule attributeID="eduPersonEntitlement">
           <PermitValueRule xsi:type="Value" value="urn:mace:dir:entitlement:common-lib-terms"/>
          </AttributeRule>
        </AttributeFilterPolicy>   
    

    Überprüfen Sie, ob die Filterregel funktioniert.

    Übung 2 - Required Attributes

    Zurück zum Inhaltsverzeichnis

    SP-Verantwortliche deklarieren benötigte Attribute in den Metadaten. Der IdP kann diese Angaben auswerten und bei der Attributfreigabe berücksichtigen.

    Aufgabe

    Erweitern Sie die Regeln für die lokalen SPs. Attribute sollen nur übermittelt werden, wenn in den Metadaten die Option isRequired="true gesetzt ist.
    Doku zur AttributeFilterPolicyConfiguration im shib-Wiki (Reference --> XML Attributes)

    Herangehensweise

    Folgende bestehende Regel soll geändert werden:
    <!--/opt/shibboleth-idp/conf/attribute-filter.xml -->
      <!-- Release an additional attribute to an SP -->
      <AttributeFilterPolicy id="SPs_locals">
        <PolicyRequirementRule xsi:type="Requester" value="https://sp1.local/shibboleth"/>
            <AttributeRule attributeID="eduPersonScopedAffiliation" permitAny="true"/>
            <AttributeRule attributeID="sn"                         permitAny="true"/>
            <AttributeRule attributeID="givenName"                  permitAny="true"/>
            <AttributeRule attributeID="mail"                       permitAny="true"/>
            <AttributeRule attributeID="uid"                        permitAny="true"/>
            <AttributeRule attributeID="eduPersonEntitlement"       permitAny="true"/>
            <AttributeRule attributeID="eduPersonTargeted"          permitAny="true"/>
      </AttributeFilterPolicy>   
    
    Zur Lösungsfindung helfen Ihnen folgende Fragen:

    Lösung

    Attribute-Filter
    <!--/opt/shibboleth-idp/conf/attribute-filter.xml -->
          <!-- Release an additional attribute to an SP -->  
          <AttributeFilterPolicy id="SPs_locals">
            <PolicyRequirementRule xsi:type="Requester" value="https://sp1.local/shibboleth" />
              <AttributeRule attributeID="eduPersonScopedAffiliation" permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="sn" permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="givenName"permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="mail"                       permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="uid"                        permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="eduPersonEntitlement"       permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="eduPersonTargeted"          permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
            </AttributeFilterPolicy>       
      

    Überprüfen Sie das Funktionieren des Attribute-Filters durch Anmelden an SP1 und SP2. Werfen Sie auch einen Blick in die Metadaten und finden Sie heraus, welche Attribute als required angegeben sind.

    Entity Attributes & Categories

    Zurück zum Inhaltsverzeichnis

    Ausführliche Informationen zu Entity Attributes und Entity Categories finden Sie im DFN_Wiki

    Übung 3 - Anbindung des IdP an das DFN edu-ID System

    Zurück zum Inhaltsverzeichnis

    Infos zu edu-ID sind hier zu finden.

    Aufgabe

    Richten Sie auf dem IdP die Unterstützung für edu-ID ein. Der Test kann auf SP2 durchgeführt werden. Laut Metadaten nimmt dieser SP bereits an edu-ID teil.

    Herangehensweise

    Stellen Sie fest, welche Attribute benötigt werden und erweitern Sie ggf. die Attribut-Definitionen.

    Attribut-Bundle

    obligatorisch, sofern vorhanden, sind folgende Attribute:
  • eduPersonAffiliation
  • samlPairwiseID
  • givenName
  • sn
  • mail
  • schacHomeOrganisation
  • eduPersonAssurance

  • optional sind weitere Attribute:
  • displayName
  • schacPlaceOfBirth
  • schacDateOfBirth
  • eduPersonEntitlement
  • eduPersonOrcid
  • l
  • o
  • potstalCode
  • schacCountryOfResidence
  • schacPersonalUniqueCode
  • street

  • Für die neu zu erstellende Filterregel können Sie folgendes Template verwenden:
    <!-- Policy gilt nur für Entitäten mit bestimmtem Entity-Category-Attribut -->  
      <AttributeFilterPolicy id="examplePolicy">
        <PolicyRequirementRule xsi:type="EntityAttributeExactMatch"
                                  attributeName="http://macedir.org/entity-category"
                                  attributeValue="http://example.org/category/example-category"/>
    
    <!-- Attribute und deren Freigaben -->                        
          <AttributeRule attributeID="attribute1" permitAny="true">
            <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
          </AttributeRule>
          <AttributeRule attributeID="attribute2" permitAny="true">
            <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="false"/>
          </AttributeRule>
        </AttributeFilterPolicy>       
    

    Lösung

    toDo
    Attribute-Filter für edu-ID
    <!-- .... -->  
          <AttributeFilterPolicy id="SPs_locals">
            <PolicyRequirementRule xsi:type="Requester" value="https://sp1.local/shibboleth" />
              <AttributeRule attributeID="eduPersonScopedAffiliation" permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="sn" permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="givenName"permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="mail"                       permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="uid"                        permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="eduPersonEntitlement"       permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
              <AttributeRule attributeID="eduPersonTargeted"          permitAny="true">
                <PermitValueRule xsi:type="AttributeInMetadata" onlyIfRequired="true"/>
              </AttributeRule>
            </AttributeFilterPolicy>