Differenze tra le versioni di "SAML-Subject-ID-Attribute"
Riga 1: | Riga 1: | ||
− | == Configurazione per Shibboleth == | + | ==Configurazione per Shibboleth== |
− | === Identity Provider (>=4.0.0) === | + | ===Identity Provider (>=4.0.0)=== |
Per abilitare il supporto ed il rilascio di <code>subject-id</code> e <code>pairwise-id</code> è necessario: | Per abilitare il supporto ed il rilascio di <code>subject-id</code> e <code>pairwise-id</code> è necessario: | ||
− | # Modificare <code>attribute-resolver.xml</code> | + | #Modificare <code>attribute-resolver.xml</code> |
− | # Modificare, se necessario, <code>attribute-filter.xml</code> (la versione di default già contiene le regole di rilascio opportune) | + | #Modificare, se necessario, <code>attribute-filter.xml</code> (la versione di default già contiene le regole di rilascio opportune) |
− | # Modificare, se necessario, <code>services.xml</code> | + | #Modificare, se necessario, <code>services.xml</code> |
− | ==== Attribute Resolver ==== | + | ====Attribute Resolver==== |
Nel file "<code>attribute-resolver.xml</code>" si deve aggiungere la definizione dei 2 nuovi attributi con:<syntaxhighlight lang="xml"> | Nel file "<code>attribute-resolver.xml</code>" si deve aggiungere la definizione dei 2 nuovi attributi con:<syntaxhighlight lang="xml"> | ||
<!-- Schema: SAML Subject ID attributes --> | <!-- Schema: SAML Subject ID attributes --> | ||
Riga 21: | Riga 21: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ==== Attribute Filter ==== | + | ====Attribute Filter==== |
Nel file "<code>attribute-filter.xml</code>", all'interno dell'elemento <code><AttributeFilterPolicyGroup></code> deve essere presente la seguente regola:<syntaxhighlight lang="xml"> | Nel file "<code>attribute-filter.xml</code>", all'interno dell'elemento <code><AttributeFilterPolicyGroup></code> deve essere presente la seguente regola:<syntaxhighlight lang="xml"> | ||
<!-- | <!-- | ||
Riga 52: | Riga 52: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ==== Services ==== | + | ====Services==== |
Nel file services.xml va abilitato l'<code>attribute-filter.xml</code> contenente le regole per il rilascio di <code>subject-id</code> e <code>pairwise-id</code><syntaxhighlight lang="xml"> | Nel file services.xml va abilitato l'<code>attribute-filter.xml</code> contenente le regole per il rilascio di <code>subject-id</code> e <code>pairwise-id</code><syntaxhighlight lang="xml"> | ||
<util:list id ="shibboleth.AttributeFilterResources"> | <util:list id ="shibboleth.AttributeFilterResources"> | ||
Riga 60: | Riga 60: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | === Service Provider (>=3.0.0) === | + | ===Service Provider (>=3.0.0)=== |
Per abilitare il supporto ed l'utilizzo di <code>subject-id</code> e <code>pairwise-id</code> è necessario: | Per abilitare il supporto ed l'utilizzo di <code>subject-id</code> e <code>pairwise-id</code> è necessario: | ||
− | # Modificare, se necessario, <code>attribute-policy.xml</code> | + | #Modificare, se necessario, <code>attribute-policy.xml</code> |
− | # Modificare <code>attribute-map.xml</code> | + | #Modificare <code>attribute-map.xml</code> |
− | # Abilitare la richiesta su IDEM Entity Registry | + | #Abilitare la richiesta su IDEM Entity Registry |
− | ==== Attribute Policy ==== | + | ====Attribute Policy==== |
Per richiedere il subject-id e pairwise-id per il proprio SP nel formato corretto:<syntaxhighlight lang="xml"> | Per richiedere il subject-id e pairwise-id per il proprio SP nel formato corretto:<syntaxhighlight lang="xml"> | ||
<AttributeRule attributeID="subject-id"> | <AttributeRule attributeID="subject-id"> | ||
Riga 78: | Riga 78: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ==== Attribute Map ==== | + | ====Attribute Map==== |
<syntaxhighlight lang="xml"> | <syntaxhighlight lang="xml"> | ||
<!-- New standard identifier attributes for SAML. --> | <!-- New standard identifier attributes for SAML. --> | ||
Riga 91: | Riga 91: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | ==== IDEM Entity Registry ==== | + | ====IDEM Entity Registry==== |
Configurare il valore del Subject-ID richiesto dalla scheda EntityAttribute di [https://registry.idem.garr.it IDEM Entity Registry] tenendo in considerazione che selezionando "Any" si riceverà prevalentemente il valore di <code>pairwise-id</code> in quanto più safe di <code>subject-id</code>. | Configurare il valore del Subject-ID richiesto dalla scheda EntityAttribute di [https://registry.idem.garr.it IDEM Entity Registry] tenendo in considerazione che selezionando "Any" si riceverà prevalentemente il valore di <code>pairwise-id</code> in quanto più safe di <code>subject-id</code>. | ||
[[File:Idem-registry-subject-id-values.png|sinistra|miniatura|300x300px]] | [[File:Idem-registry-subject-id-values.png|sinistra|miniatura|300x300px]] | ||
Riga 97: | Riga 97: | ||
− | |||
+ | ==Configurazione per SimpleSAMLphp (<=2.0.0)== | ||
− | == Riferimenti == | + | |
+ | 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]. | ||
+ | |||
+ | 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 === | ||
+ | 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>. | ||
+ | |||
+ | === Service Provider === | ||
+ | TBD | ||
+ | ==Riferimenti== | ||
https://docs.oasis-open.org/security/saml-subject-id-attr/v1.0/saml-subject-id-attr-v1.0.pdf | https://docs.oasis-open.org/security/saml-subject-id-attr/v1.0/saml-subject-id-attr-v1.0.pdf |
Versione delle 15:48, 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 (<=2.0.0)
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
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