Metadata

Da WIKI IDEM GARR.
Jump to navigation Jump to search

Il Servizio IDEM ha implementato un nuovo sistema di distribuzione dei metadata basato su MDQ che riduce drasticamente l'occupazione di memoria e i tempi di caricamento. Vedi https://mdx.idem.garr.it per le istruzioni di configurazione.

Aggregati di metadata

NOTA BENE: Gli aggregati di metadata sono da considerare deprecati e da utilizzare solo per sistemi che non supportano MDQ (vedi https://mdx.idem.garr.it).

IDEM Produzione:

https://md.idem.garr.it/metadata/idem-metadata-sha256.xml

eduGAIN e IDEM Produzione:

https://md.idem.garr.it/metadata/edugain2idem-metadata-sha256.xml

IDEM Test:

https://md.idem.garr.it/metadata/idem-test-metadata-sha256.xml

Certificato

Tutti i flussi di metadata della Federazione IDEM sono firmati con il seguente certificato:

https://md.idem.garr.it/certs/idem-signer-legacy.pem

1. Recuperare il certificato della Federazione:

2. Controllare la validità del certificato:

  • Eseguire il comando: openssl x509 -in /tmp/idem-signer-legacy.pem -fingerprint -sha1 -noout
    deve restituire: SHA1 Fingerprint=E7:EA:EC:1E:46:CB:41:F0:9B:79:C9:2D:05:81:1A:63:B6:3B:C8:E7

Istruzioni di configurazione

NOTA BENE: Gli aggregati di metadata sono da considerare deprecati e da utilizzare solo per sistemi che non supportano MDQ (vedi https://mdx.idem.garr.it).

Le istruzioni sono relative alla sola configurazione dei metadata, per guide complete sull'installazione e la configurazione di IdP e SP andare alla sezione Guide.

Shibboleth Identity Provider 3.x+ & 4.0:

  • Spostare il certificato in/opt/shibboleth-idp/credentials.
  • configurare certificato e flusso di metadata desiderato in /opt/shibboleth-idp/conf/metadata-providers.xml, ad es. per il flusso IDEM Test:
<MetadataProvider id="URLMD-IDEM-Federation" 
                  xsi:type="FileBackedHTTPMetadataProvider"
                  backingFile="%{idp.home}/metadata/idem-test-metadata-sha256.xml" 
                  metadataURL="https://md.idem.garr.it/metadata/idem-test-metadata-sha256.xml"> 
   <MetadataFilter xsi:type="SignatureValidation" requireSignedRoot="true" 
                   certificateFile="%{idp.home}/credentials/idem-signer-legacy.pem"/>
   <MetadataFilter xsi:type="RequiredValidUntil" maxValidityInterval="P10D"/>
   <MetadataFilter xsi:type="EntityRoleWhiteList"> 
      <RetainedRole>md:SPSSODescriptor</RetainedRole>
   </MetadataFilter>
</MetadataProvider>

Shibboleth Identity Provider 4.1+:

  • scaricare il certificato da https://md.idem.garr.it/certs/idem-signer-legacy.pem
  • salvarlo in una directory accessibile a Shibboleth, ad es. /opt/shibboleth-idp/credentials.
  • configurare certificato e flusso di metadata desiderato in /opt/shibboleth-idp/conf/metadata-providers.xml, ad es. per il flusso IDEM Test:
<MetadataProvider id="URLMD-IDEM-Federation" 
                  xsi:type="FileBackedHTTPMetadataProvider"
                  backingFile="%{idp.home}/metadata/idem-test-metadata-sha256.xml" 
                  metadataURL="https://md.idem.garr.it/metadata/idem-test-metadata-sha256.xml"> 
   <MetadataFilter xsi:type="SignatureValidation" requireSignedRoot="true" 
                   certificateFile="%{idp.home}/credentials/idem-signer-legacy.pem"/>
   <MetadataFilter xsi:type="RequiredValidUntil" maxValidityInterval="P10D"/>
   <MetadataFilter xsi:type="EntityRole"> 
      <RetainedRole>md:SPSSODescriptor</RetainedRole>
   </MetadataFilter>
</MetadataProvider>

Shibboleth Service Provider 2.5+

  • Spostare il certificato in /etc/shibboleth.
  • configurare certificato e flusso di metadata desiderato in shibboleth2.xml, ad es. per il flusso IDEM Produzione:
<MetadataProvider type="XML" 
                  uri="https://md.idem.garr.it/metadata/idem-metadata-sha256.xml" 
                  backingFilePath="idem-metadata-sha256.xml" reloadInterval="7200">
   <MetadataFilter type="RequireValidUntil" maxValidityInterval="864000" />
   <MetadataFilter type="Signature" certificate="/etc/shibboleth/idem-signer-legacy.pem"/>
</MetadataProvider>

Shibboleth Service Provider 3.x+

  • Spostare il certificato in /etc/shibboleth.
  • configurare certificato e flusso di metadata desiderato in shibboleth2.xml, ad es. per il flusso eduGAIN e IDEM Produzione:
<MetadataProvider type="XML" 
                  url="https://md.idem.garr.it/metadata/edugain2idem-metadata-sha256.xml" 
                  backingFilePath="edugain2idem-metadata-sha256.xml"
                  maxRefreshDelay="7200">
    <MetadataFilter type="RequireValidUntil" maxValidityInterval="864000" />
    <MetadataFilter type="Signature" certificate="/etc/shibboleth/idem-signer-legacy.pem"/>
</MetadataProvider>

simpleSAMLphp Identity Provider 1.14+

  • Spostare il certificato in /var/simplesamlphp/cert/
  • configurare certificato e flusso di metadata desiderato in /var/simplesamlphp/config/config-metarefresh.php, ad es. per il flusso IDEM Test:
<?php

$config = [
   'sets' => [
      'idem' => [
         'cron'    => ['hourly'],
         'sources' => [
                       [
                        'src' => 'https://md.idem.garr.it/metadata/idem-test-metadata-sha256.xml',
                        'certificates' => [
                           '/var/simplesamlphp/cert/idem-signer-legacy.pem',
                        ],
                        'template' => [
                           'tags'  => ['idem'],
                           'authproc' => [
                              51 => ['class' => 'core:AttributeMap', 'oid2name'],
                           ],
                        ],

                        'types' => ['saml20-sp-remote'],   // Load only SAML v2.0 SP from metadata
                       ],
                      ],
         'expireAfter' => 864000, // Maximum 10 days cache time (3600*24*10)
         'outputDir'   => 'metadata/',

         'outputFormat' => 'flatfile',
      ],
   ],
];

simpleSAMLphp Service Provider 1.14+

  • Spostare il certificato in /var/simplesamlphp/cert/
  • configurare certificato e flusso di metadata desiderato in /var/simplesamlphp/config/config-metarefresh.php, ad es. per il flusso IDEM Produzione:
<?php

$config = [
   'sets' => [
      'idem' => [
         'cron'    => ['hourly'],
         'sources' => [
                       [
                        'src' => 'https://md.idem.garr.it/metadata/idem-metadata-sha256.xml',
                        'certificates' => [
                           '/var/simplesamlphp/cert/idem-signer-legacy.pem',
                        ],
                        'template' => [
                           'tags'  => ['idem'],
                           'authproc' => [
                              51 => ['class' => 'core:AttributeMap', 'oid2name'],
                           ],
                        ],

                        'types' => ['saml20-idp-remote'],   // Load only SAML v2.0 IDP from metadata
                       ],
                      ],
         'expireAfter' => 864000, // Maximum 10 days cache time (3600*24*10)
         'outputDir'   => 'metadata/',

         'outputFormat' => 'flatfile',
      ],
   ],
];

Altri software (ADFS Toolkit, SaToSa, ecc.)

Scaricare e verificare il certificato come indicato nelle istruzioni generali. Per la configurazione dei flussi di metadata, riferirsi alle istruzioni di configurazione proprie del software utilizzato.


English version

The IDEM Service has implemented a new metadata distribution system based on the MDQ protocol that drastically reduces memory consumption and loading times. Check https://mdx.idem.garr.it for the configuration instructions.

Metadata aggregates

WARNING: Metadata aggregates are depreacted and to be used only for systems that do not support MDQ (check https://mdx.idem.garr.it).

IDEM Production:

https://md.idem.garr.it/metadata/idem-metadata-sha256.xml

eduGAIN and IDEM Production:

https://md.idem.garr.it/metadata/edugain2idem-metadata-sha256.xml

IDEM Test:

https://md.idem.garr.it/metadata/idem-test-metadata-sha256.xml

Certificate

All the IDEM Federation metadata flows are signed with the following certificate:

https://md.idem.garr.it/certs/idem-signer-legacy.pem

1. Download the Federation certificate:

  • wget https://md.idem.garr.it/certs/idem-signer-legacy.pem -O /tmp/idem-signer-legacy.pem

2. Verifiy the certificate:

  • Run the command: openssl x509 -in /tmp/idem-signer-legacy.pem -fingerprint -sha1 -noout expected value: SHA1 Fingerprint=E7:EA:EC:1E:46:CB:41:F0:9B:79:C9:2D:05:81:1A:63:B6:3B:C8:E7

Configuration instruction

WARNING: Metadata aggregates are depreacted and to be used only for systems that do not support MDQ (check https://mdx.idem.garr.it).

For full installation guide see Guide.

Shibboleth Identity Provider 3.x+ & 4.0:

  • Move the certificate to /opt/shibboleth-idp/credentials.
  • Configure the certificate and the desired metadata flow in /opt/shibboleth-idp/conf/metadata-providers.xml, for IDEM Test flow:
<MetadataProvider id="URLMD-IDEM-Federation" 
                  xsi:type="FileBackedHTTPMetadataProvider"
                  backingFile="%{idp.home}/metadata/idem-test-metadata-sha256.xml" 
                  metadataURL="https://md.idem.garr.it/metadata/idem-test-metadata-sha256.xml"> 
   <MetadataFilter xsi:type="SignatureValidation" requireSignedRoot="true" 
                   certificateFile="%{idp.home}/credentials/idem-signer-legacy.pem"/>
   <MetadataFilter xsi:type="RequiredValidUntil" maxValidityInterval="P10D"/>
   <MetadataFilter xsi:type="EntityRoleWhiteList"> 
      <RetainedRole>md:SPSSODescriptor</RetainedRole>
   </MetadataFilter>
</MetadataProvider>

Shibboleth Identity Provider 4.1+:

  • Move the certificate to /opt/shibboleth-idp/credentials.
  • Configure the certificate and the desired metadata flow in /opt/shibboleth-idp/conf/metadata-providers.xml, for IDEM Test flow::
<MetadataProvider id="URLMD-IDEM-Federation" 
                  xsi:type="FileBackedHTTPMetadataProvider"
                  backingFile="%{idp.home}/metadata/idem-test-metadata-sha256.xml" 
                  metadataURL="https://md.idem.garr.it/metadata/idem-test-metadata-sha256.xml"> 
   <MetadataFilter xsi:type="SignatureValidation" requireSignedRoot="true" 
                   certificateFile="%{idp.home}/credentials/idem-signer-legacy.pem"/>
   <MetadataFilter xsi:type="RequiredValidUntil" maxValidityInterval="P10D"/>
   <MetadataFilter xsi:type="EntityRole"> 
      <RetainedRole>md:SPSSODescriptor</RetainedRole>
   </MetadataFilter>
</MetadataProvider>

Shibboleth Service Provider 2.5+

  • Move the certificate to /etc/shibboleth.
  • Configure the certificate and the desired metadata flow in shibboleth2.xml, for example for IDEM Production flow
<MetadataProvider type="XML" 
                  uri="https://md.idem.garr.it/metadata/idem-metadata-sha256.xml" 
                  backingFilePath="idem-metadata-sha256.xml" reloadInterval="7200">
   <MetadataFilter type="RequireValidUntil" maxValidityInterval="864000" />
   <MetadataFilter type="Signature" certificate="/etc/shibboleth/idem-signer-legacy.pem"/>
</MetadataProvider>

Shibboleth Service Provider 3.x+

  • Move the certificate to /etc/shibboleth.
  • Configure the certificate and the desired metadata flow in shibboleth2.xml, for example for eduGAIN and IDEM Production flow
<MetadataProvider type="XML" 
                  url="https://md.idem.garr.it/metadata/edugain2idem-metadata-sha256.xml" 
                  backingFilePath="edugain2idem-metadata-sha256.xml"
                  maxRefreshDelay="7200">
    <MetadataFilter type="RequireValidUntil" maxValidityInterval="864000" />
    <MetadataFilter type="Signature" certificate="/etc/shibboleth/idem-signer-legacy.pem"/>
</MetadataProvider>

simpleSAMLphp Identity Provider 1.14+

  • Move the certificate to /var/simplesamlphp/cert/
  • Configure the certificate and the desired metadata flow in /var/simplesamlphp/config/config-metarefresh.php, for example for the IDEM Test flow:
<?php

$config = [
   'sets' => [
      'idem' => [
         'cron'    => ['hourly'],
         'sources' => [
                       [
                        'src' => 'https://md.idem.garr.it/metadata/idem-test-metadata-sha256.xml',
                        'certificates' => [
                           '/var/simplesamlphp/cert/idem-signer-legacy.pem',
                        ],
                        'template' => [
                           'tags'  => ['idem'],
                           'authproc' => [
                              51 => ['class' => 'core:AttributeMap', 'oid2name'],
                           ],
                        ],

                        'types' => ['saml20-sp-remote'],   // Load only SAML v2.0 SP from metadata
                       ],
                      ],
         'expireAfter' => 864000, // Maximum 10 days cache time (3600*24*10)
         'outputDir'   => 'metadata/',

         'outputFormat' => 'flatfile',
      ],
   ],
];

simpleSAMLphp Service Provider 1.14+

  • Move the certificate to /var/simplesamlphp/cert/
  • Configure the certificate and the desired metadata flow in /var/simplesamlphp/config/config-metarefresh.php, for example for the IDEM Production flow:
<?php

$config = [
   'sets' => [
      'idem' => [
         'cron'    => ['hourly'],
         'sources' => [
                       [
                        'src' => 'https://md.idem.garr.it/metadata/idem-metadata-sha256.xml',
                        'certificates' => [
                           '/var/simplesamlphp/cert/idem-signer-legacy.pem',
                        ],
                        'template' => [
                           'tags'  => ['idem'],
                           'authproc' => [
                              51 => ['class' => 'core:AttributeMap', 'oid2name'],
                           ],
                        ],

                        'types' => ['saml20-idp-remote'],   // Load only SAML v2.0 IDP from metadata
                       ],
                      ],
         'expireAfter' => 864000, // Maximum 10 days cache time (3600*24*10)
         'outputDir'   => 'metadata/',

         'outputFormat' => 'flatfile',
      ],
   ],
];

Other softwares (ADFS Toolkit, SaToSa, ecc.)

Download and verify the certificate following the general instructions. For the detailed configuration of the metadata flows, please refer to the configuration instructions of your software.