Differenze tra le versioni di "SAML-Subject-ID-Attribute"
Riga 95: | Riga 95: | ||
[[File:Idem-registry-subject-id-values.png|miniatura|300x300px|alt=|nessuno]] | [[File:Idem-registry-subject-id-values.png|miniatura|300x300px|alt=|nessuno]] | ||
− | ==Configurazione per SimpleSAMLphp | + | ==Configurazione per SimpleSAMLphp== |
Il supporto ufficiale alla generazione e al rilascio di <code>subject-id</code> e <code>pairwise-id</code> in SimpleSAMLphp arriva ufficialmente dalla [https://simplesamlphp.org/docs/2.0/simplesamlphp-changelog.html#version-200 v2.0.0]. | Il supporto ufficiale alla generazione e al rilascio di <code>subject-id</code> e <code>pairwise-id</code> in SimpleSAMLphp arriva ufficialmente dalla [https://simplesamlphp.org/docs/2.0/simplesamlphp-changelog.html#version-200 v2.0.0]. | ||
Riga 103: | Riga 103: | ||
*https://simplesamlphp.org/docs/2.0/saml/authproc_subjectid.html | *https://simplesamlphp.org/docs/2.0/saml/authproc_subjectid.html | ||
− | ===Identity Provider=== | + | ===Identity Provider (<=2.0.0)=== |
Gli Identity Provider v2.x che sono stati configurati secondo i nostri [https://github.com/ConsortiumGARR/idem-tutorials/blob/master/idem-fedops/HOWTO-SimpleSAMLphp/Identity%20Provider/HOWTO%20Install%20and%20Configure%20a%20SimpleSAMLphp%20IdP%20v2.x%20on%20Debian-Ubuntu%20Linux%20with%20Composer.md idem-tutorials] per la v2.x sono già in grado di rilasciare <code>subject-id</code> e <code>pairwise-id</code>. | Gli Identity Provider v2.x che sono stati configurati secondo i nostri [https://github.com/ConsortiumGARR/idem-tutorials/blob/master/idem-fedops/HOWTO-SimpleSAMLphp/Identity%20Provider/HOWTO%20Install%20and%20Configure%20a%20SimpleSAMLphp%20IdP%20v2.x%20on%20Debian-Ubuntu%20Linux%20with%20Composer.md idem-tutorials] per la v2.x sono già in grado di rilasciare <code>subject-id</code> e <code>pairwise-id</code>. | ||
Versione delle 16:50, 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:
- Modificare
attribute-resolver.xml
- Modificare, se necessario,
attribute-filter.xml
(la versione di default già contiene le regole di rilascio opportune) - 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:
- Modificare, se necessario,
attribute-policy.xml
- Modificare
attribute-map.xml
- 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
.
Configurazione per SimpleSAMLphp
Il supporto ufficiale alla generazione e al rilascio di subject-id
e pairwise-id
in SimpleSAMLphp arriva ufficialmente dalla v2.0.0.
Nella nuova versione di SimpleSAMLphp sono stati sviluppati 2 nuovi moduli per il loro supporto:
- https://simplesamlphp.org/docs/2.0/saml/authproc_pairwiseid.html
- https://simplesamlphp.org/docs/2.0/saml/authproc_subjectid.html
Identity Provider (<=2.0.0)
Gli Identity Provider v2.x che sono stati configurati secondo i nostri idem-tutorials per la v2.x sono già in grado di rilasciare subject-id
e pairwise-id
.
Service Provider
TBD
Riferimenti
https://docs.oasis-open.org/security/saml-subject-id-attr/v1.0/saml-subject-id-attr-v1.0.pdf