Differenze tra le versioni di "SAML-Subject-ID-Attribute"

Da WIKI IDEM GARR.
Jump to navigation Jump to search
(Creata pagina con "Doc: https://docs.oasis-open.org/security/saml-subject-id-attr/v1.0/saml-subject-id-attr-v1.0.pdf == Configurazione per Shibboleth == === Identity Provider (>=4.0.0) === Per...")
 
Riga 1: Riga 1:
Doc: https://docs.oasis-open.org/security/saml-subject-id-attr/v1.0/saml-subject-id-attr-v1.0.pdf
 
 
 
== Configurazione per Shibboleth ==
 
== Configurazione per Shibboleth ==
  
Riga 97: Riga 95:
 
[[File:Idem-registry-subject-id-values.png|sinistra|miniatura|300x300px]]
 
[[File:Idem-registry-subject-id-values.png|sinistra|miniatura|300x300px]]
 
<br />
 
<br />
 +
 +
 +
== Configurazione per SimpleSAMLphp ==
 +
 +
 +
== Riferimenti ==
 +
 +
https://docs.oasis-open.org/security/saml-subject-id-attr/v1.0/saml-subject-id-attr-v1.0.pdf

Versione delle 16:23, 3 ago 2023

Configurazione per Shibboleth

Identity Provider (>=4.0.0)

Per abilitare il supporto ed il rilascio di subject-id e pairwise-id è necessario:

  1. Modificare attribute-resolver.xml
  2. Modificare, se necessario, attribute-filter.xml (la versione di default già contiene le regole di rilascio opportune)
  3. Modificare, se necessario, services.xml

Attribute Resolver

Nel file "attribute-resolver.xml" si deve aggiungere la definizione dei 2 nuovi attributi con:

<!-- Schema: SAML Subject ID attributes -->
 
<AttributeDefinition id="samlPairwiseID" xsi:type="Scoped" scope="%{idp.scope}">
    <InputDataConnector ref="computed" attributeNames="computedId" />
</AttributeDefinition>
 
<AttributeDefinition id="samlSubjectID" xsi:type="Scoped" scope="%{idp.scope}">
    <InputDataConnector ref="myLDAP" attributeNames="%{idp.persistentId.sourceAttribute}" />
</AttributeDefinition>

Attribute Filter

Nel file "attribute-filter.xml", all'interno dell'elemento <AttributeFilterPolicyGroup> deve essere presente la seguente regola:

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

Services

Nel file services.xml va abilitato l'attribute-filter.xml contenente le regole per il rilascio di subject-id e pairwise-id

<util:list id ="shibboleth.AttributeFilterResources">
   <value>%{idp.home}/conf/attribute-filter.xml</value>
   <ref bean="IdemAttributeFilterFull"/>
</util:list>

Service Provider (>=3.0.0)

Per abilitare il supporto ed l'utilizzo di subject-id e pairwise-id è necessario:

  1. Modificare, se necessario, attribute-policy.xml
  2. Modificare attribute-map.xml
  3. Abilitare la richiesta su IDEM Entity Registry

Attribute Policy

Per richiedere il subject-id e pairwise-id per il proprio SP nel formato corretto:

<AttributeRule attributeID="subject-id">
   <PermitValueRuleReference ref="ScopingRules"/>
</AttributeRule>

<AttributeRule attributeID="pairwise-id">
   <PermitValueRuleReference ref="ScopingRules"/>
</AttributeRule>

Attribute Map

<!-- New standard identifier attributes for SAML. -->

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

IDEM Entity Registry

Configurare il valore del Subject-ID richiesto dalla scheda EntityAttribute di IDEM Entity Registry tenendo in considerazione che selezionando "Any" si riceverà prevalentemente il valore di pairwise-id in quanto più safe di subject-id.

Idem-registry-subject-id-values.png



Configurazione per SimpleSAMLphp

Riferimenti

https://docs.oasis-open.org/security/saml-subject-id-attr/v1.0/saml-subject-id-attr-v1.0.pdf