# Shib3IdpARP

Shibboleth 3 IdP attribútum szűrés beállítása

**Vonatkozó állományok:**

* `{idp.home}/conf/attribute-filter.xml`
* `{idp.home}/conf/idp.properties`

Az `{idp.home}/conf/attribute-filter.xml` állomány már tartalmaz néhány egyszerű példa beállítást. Az alábbi módosítások lehetővé teszik, hogy az attribútum feloldó által feloldott *sn* és *givenName* attribútumok az SP-k számára elérhetők legyenek. Bővítsük az állományt az alábbiak szerint.

```xml
<afp:AttributeFilterPolicyGroup id="ShibbolethFilterPolicy"
        xmlns:afp="urn:mace:shibboleth:2.0:afp"
        xmlns:basic="urn:mace:shibboleth:2.0:afp:mf:basic"
        xmlns:saml="urn:mace:shibboleth:2.0:afp:mf:saml"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="urn:mace:shibboleth:2.0:afp http://shibboleth.net/schema/idp/shibboleth-afp.xsd
                            urn:mace:shibboleth:2.0:afp:mf:basic http://shibboleth.net/schema/idp/shibboleth-afp-mf-basic.xsd
                            urn:mace:shibboleth:2.0:afp:mf:saml http://shibboleth.net/schema/idp/shibboleth-afp-mf-saml.xsd">

<!-- ... további tartalom ... -->

    <!-- ezeket az attribútumokat minden SP megkapja -->
    <afp:AttributeFilterPolicy id="mindensp">
        <afp:PolicyRequirementRule xsi:type="basic:ANY"/>

        <afp:AttributeRule attributeID="sn">
            <afp:PermitValueRule xsi:type="basic:ANY" />
        </afp:AttributeRule>
        <afp:AttributeRule attributeID="givenName">
            <afp:PermitValueRule xsi:type="basic:ANY" />
        </afp:AttributeRule>
    </afp:AttributeFilterPolicy>

    <!-- ezeket az attribútumokat csak a megadott SP kapja meg -->
    <afp:AttributeFilterPolicy id="intezmenysp1">
        <afp:PolicyRequirementRule xsi:type="basic:AttributeRequesterString" value="https://sp1.intezmenyneve.hu/shibboleth"/>

        <afp:AttributeRule attributeID="description">
            <afp:PermitValueRule xsi:type="basic:ANY"/>
        </afp:AttributeRule>
    </afp:AttributeFilterPolicy>

</afp:AttributeFilterPolicyGroup>
```

* A **14.** sor szerint minden SP-re vonatkozik a szabály.
* A **16, 19.** sorban megadott attribútumokat a 14. sor alapján minden SP látja.
* A **26.** sorban megadott SP-re vonatkozóan rendelkezünk.
* A **28.** sor szerint ez az SP megkapja a *description* attribútumot.

**Dokumentáció:**

* [https://wiki.shibboleth.net/confluence/display/IDP30/AttributeFilterConfiguration](https://wiki.shibboleth.net/confluence/display/IDP30/AttributeFilterConfiguration)
* [https://wiki.shibboleth.net/confluence/display/IDP30/AttributeFilterPolicyConfiguration](https://wiki.shibboleth.net/confluence/display/IDP30/AttributeFilterPolicyConfiguration)