比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

...

  • conf/metadata-providers.xml

    展開
    コード ブロック
    languagexml
    titleconf/metadata-providers.xml
        <!-- -->
        <MetadataProvider id="HTTPMetadata"
                          xsi:type="FileBackedHTTPMetadataProvider"
                          backingFile="%{idp.home}/metadata/gakunin-metadata-backing.xml"
                          metadataURL="https://metadata.gakunin.nii.ac.jp/gakunin-metadata.xml">
            <MetadataFilter xsi:type="SignatureValidation" requireSignedRoot="true"
                            certificateFile="/opt/shibboleth-idp-common/credentials/gakunin-signer-2010.cer"/>
            <MetadataFilter xsi:type="RequiredValidUntil" maxValidityInterval="P15D"/>
            <MetadataFilter xsi:type="EntityRoleWhiteList">
                <RetainedRole>md:SPSSODescriptor</RetainedRole>
            </MetadataFilter>
        </MetadataProvider>
        <!-- -->
    コード ブロック
    languagediff
    titleデフォルトからの差分差分
    -    <!--
    +    <!-- -->
         <MetadataProvider id="HTTPMetadata"
                           xsi:type="FileBackedHTTPMetadataProvider"
    -                      backingFile="%{idp.home}/metadata/localCopyFromXYZHTTP.xml"
    -                      metadataURL="http://WHATEVER">
    +                      backingFile="%{idp.home}/metadata/gakunin-metadata-backing.xml"
    +                      metadataURL="https://metadata.gakunin.nii.ac.jp/gakunin-metadata.xml">
    -        <MetadataFilter xsi:type="SignatureValidation" requireSignedRoot="true">
    -            <PublicKey>
    -                MIIBI.....
    -            </PublicKey>
    -        </MetadataFilter>
    -        <MetadataFilter xsi:type="RequiredValidUntil" maxValidityInterval="P30D"/>
    +        <MetadataFilter xsi:type="SignatureValidation" requireSignedRoot="true"
    +                        certificateFile="/opt/shibboleth-idp-common/credentials/gakunin-signer-2010.cer"/>
    +        <MetadataFilter xsi:type="RequiredValidUntil" maxValidityInterval="P15D"/>
             <MetadataFilter xsi:type="EntityRoleWhiteList">
                 <RetainedRole>md:SPSSODescriptor</RetainedRole>
             </MetadataFilter>
         </MetadataProvider>
    -    -->
    +    <!-- -->
    注意

    Shibboleth IdP 3.2からSignatureValidationFilterのrequireSignedMetadataがrequireSignedRootに変更となりました。requireSignedMetadataの場合、下記のwarningメッセージが表示されます。

    書式設定済み
    2015-12-18 18:33:35,232 - WARN [net.shibboleth.idp.profile.spring.relyingparty.metadata.filter.impl.SignatureValidationParser:128] - file [/opt/shibboleth-idp/conf/metadata-providers.xml] Use of the attribute 'requireSignedMetadata' is deprecated, use 'requireSignedRoot' instead
Shibboleth IdP 3.

...

1の情報
展開

学認メタデータの読み込みはconf/metadata-providers.xmlで設定します。

  • conf/metadata-providers.xml

    コード ブロック
    languagexml
    titleconf/metadata-providers.xml
    <MetadataProvider id="HTTPMetadata"
                      xsi:type="FileBackedHTTPMetadataProvider"
                      backingFile="%{idp.home}/metadata/gakunin-metadata-backing.xml"
                      metadataURL="https://metadata.gakunin.nii.ac.jp/gakunin-metadata.xml">
    
        <MetadataFilter xsi:type="RequiredValidUntil" maxValidityInterval="P15D" />
        <MetadataFilter xsi:type="SignatureValidation"
                        requireSignedMetadata="true"
                        certificateFile="%{idp.home}/credentials/gakunin-signer-2010.cer"/>
        <MetadataFilter xsi:type="EntityRoleWhiteList">
            <RetainedRole>md:SPSSODescriptor</RetainedRole>
        </MetadataFilter>
    
    </MetadataProvider>

...

  • conf/ldap.properties
    参照するLDAPにあわせて、Connection properties, SSL configuration, Search DN resolutionのプロパティを設定します。

    展開
    コード ブロック
    languagejava
    titleconf/ldap.properties
    ## Connection properties ##
    idp.authn.LDAP.ldapURL                          = ldap://localhost:389
    idp.authn.LDAP.useStartTLS                      = false
    #idp.authn.LDAP.useSSL                          = false
    #idp.authn.LDAP.connectTimeout                  = 3000
    
    
     
    # Search DN resolution, used by anonSearchAuthenticator, bindSearchAuthenticator
    # for AD: CN=Users,DC=example,DC=org
    idp.authn.LDAP.baseDN                           = ou=people,dc=example,dc=ac,dc=jp
    idp.authn.LDAP.subtreeSearch                    = true
    idp.authn.LDAP.userFilter                       = (uid={user})
    # bind search configuration
    # for AD: idp.authn.LDAP.bindDN=adminuser@domain.com
    idp.authn.LDAP.bindDN                           =
    idp.authn.LDAP.bindDNCredential                 =
    コード ブロック
    languagediff
    titleデフォルトからの差分差分
     ## Connection properties ##
    -idp.authn.LDAP.ldapURL                          = ldap://localhost:10389
    -#idp.authn.LDAP.useStartTLS                     = true
    +idp.authn.LDAP.ldapURL                          = ldap://localhost:389
    +idp.authn.LDAP.useStartTLS                      = false
     #idp.authn.LDAP.useSSL                          = false
     #idp.authn.LDAP.connectTimeout                  = 3000
    
    
     
     # Search DN resolution, used by anonSearchAuthenticator, bindSearchAuthenticator
     # for AD: CN=Users,DC=example,DC=org
    -idp.authn.LDAP.baseDN                           = ou=people,dc=example,dc=org
    -#idp.authn.LDAP.subtreeSearch                   = false
    +idp.authn.LDAP.baseDN                           = ou=people,dc=example,dc=ac,dc=jp
    +idp.authn.LDAP.subtreeSearch                    = true
     idp.authn.LDAP.userFilter                       = (uid={user})
     # bind search configuration
     # for AD: idp.authn.LDAP.bindDN=adminuser@domain.com
    -idp.authn.LDAP.bindDN                           = uid=myservice,ou=system
    -idp.authn.LDAP.bindDNCredential                 = myServicePassword
    +idp.authn.LDAP.bindDN                           =
    +idp.authn.LDAP.bindDNCredential                 =

...

  • conf/saml-nameid.properties
    idp.transientId.generatorをアンコメントして、値をshibboleth.StoredTransientIdGeneratorに変更します。

    展開
    コード ブロック
    languagejava
    titleconf/saml-nameid.properties
    # Set to shibboleth.StoredTransientIdGenerator for server-side transient ID storage
    idp.transientId.generator = shibboleth.StoredTransientIdGenerator
    コード ブロック
    languagediff
    titleデフォルトからの差分差分
     # Set to shibboleth.StoredTransientIdGenerator for server-side transient ID storage
    -#idp.transientId.generator = shibboleth.CryptoTransientIdGenerator
    +idp.transientId.generator = shibboleth.StoredTransientIdGenerator

...

コード ブロック
languagexml
<saml2:Subject>
    <saml2:NameID
        Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"
        NameQualifier="https://idp.example.ac.jp/idp/shibboleth"
        SPNameQualifier="https://sp1.example.jp/shibboleth-sp">_f358fb015b9b45c7d18a4a2647e79c33</saml2:NameID>

persistent-idの設定

computedId

computedIdでの設定を下記に示します。

  • conf/saml-nameid.xml
    <ref bean="shibboleth.SAML2PersistentGenerator" /> をアンコメントして有効にします。

    展開
    コード ブロック
    languagexml
    titleconf/saml-nameid.xml
            <!-- Uncommenting this bean requires configuration in saml-nameid.properties. -->
            <!-- -->
            <ref bean="shibboleth.SAML2PersistentGenerator" />
            <!-- -->
    コード ブロック
    languagediff
    title差分
             <!-- Uncommenting this bean requires configuration in saml-nameid.properties. -->
    -        <!--
    +        <!-- -->
             <ref bean="shibboleth.SAML2PersistentGenerator" />
    -        -->
    +        <!-- -->
  • conf/saml-nameid.properties
    idp.persistentId.generatorのデフォルトはComputedIdの設定のため、idp.persistentId.sourceAttributeidp.persistentId.saltのみを設定します。

    展開
    コード ブロック
    languagejava
    titleconf/saml-nameid.properties
    # Persistent IDs can be computed on the fly with a hash, or managed in a database
    
    # For computed IDs, set a source attribute and a secret salt:
    idp.persistentId.sourceAttribute = uid
    #idp.persistentId.useUnfilteredAttributes = true
    # Do *NOT* share the salt with other people, it's like divulging your private key.
    #idp.persistentId.algorithm = SHA
    idp.persistentId.salt = changethistosomethingrandom
    
    # To use a database, use shibboleth.StoredPersistentIdGenerator
    コード ブロック
    languagediff
    title差分
     # Persistent IDs can be computed on the fly with a hash, or managed in a database
    
     # For computed IDs, set a source attribute and a secret salt:
    -#idp.persistentId.sourceAttribute = changethistosomethingreal
    +idp.persistentId.sourceAttribute = uid
     #idp.persistentId.useUnfilteredAttributes = true
     # Do *NOT* share the salt with other people, it's like divulging your private key.
     #idp.persistentId.algorithm = SHA
    -#idp.persistentId.salt = changethistosomethingrandom
    +idp.persistentId.salt = changethistosomethingrandom
     
     # To use a database, use shibboleth.StoredPersistentIdGenerator
  • conf/attribute-resolver.xml
    idp.persistentId.sourceAttributeの値をconf/attribute-resolver.xml//resolver:AttributeDefinitionで定義します。

    展開
    コード ブロック
    languagexml
    titleconf/attribute-resolver.xml
        <!-- ========================================== -->
        <!--      PersistentId Definition               -->
        <!-- ========================================== -->
    
        <!-- Attribute Definition for %{idp.persistentId.sourceAttribute} -->
        <resolver:AttributeDefinition id="%{idp.persistentId.sourceAttribute}" xsi:type="ad:Simple"
            sourceAttributeID="uid">
            <resolver:Dependency ref="myLDAP" />
        </resolver:AttributeDefinition>
     
    コード ブロック
    languagediff
    title差分
    +    <!-- ========================================== -->
    +    <!--      PersistentId Definition               -->
    +    <!-- ========================================== -->
    +
    +    <!-- Attribute Definition for %{idp.persistentId.sourceAttribute} -->
    +    <resolver:AttributeDefinition 

...

  • id="%{idp.persistentId.sourceAttribute}" xsi:type="ad:Simple"
    +        

...

  • sourceAttributeID="

...

  • uid">
    +        

...

  • <resolver:Dependency ref="myLDAP" />
    +    </resolver:AttributeDefinition>
Shibboleth IdP 3.1の情報
展開

persistent-idの設定

...

computedIdでの設定を下記に示します。

  • conf/saml-nameid.xml
    <ref bean="shibboleth.SAML2PersistentGenerator" />

...

  •  をアンコメントして有効にします。

    コード ブロック
    languagexml
    titleconf/saml-nameid.xml
    collapsetrue
    <!-- Uncommenting this bean requires configuration in saml-nameid.properties. -->
    <!-- -->
    <ref bean="shibboleth.SAML2PersistentGenerator" />
    <!-- -->
  • conf/saml-nameid.properties
    idp.persistentId.generatorのデフォルトはComputedIdの設定のため、idp.persistentId.sourceAttributeidp.persistentId.saltのみを設定します。

    コード ブロック
    languagesass
    titleconf/saml-nameid.properties
    collapsetrue
    # Set to shibboleth.StoredPersistentIdGenerator for db-backed storage
    # and uncomment/name the PersistentIdStore bean to use
    #idp.persistentId.generator = shibboleth.ComputedPersistentIdGenerator
    
    # Otherwise for computed PersistentIDs set the source attribute and salt.
    idp.persistentId.sourceAttribute = uid4persistentId
    idp.persistentId.salt = changethistosomethingrandom
  • conf/attribute-resolver.xmlconf/attribute-filter.xml
    idp.persistentId.sourceAttributeの値をconf/attribute-resolver.xml//resolver:AttributeDefinitionで定義して、conf/attribute-filter.xmlで送信設定を行います。

    コード ブロック
    languagexml
    titleconf/attribute-resolver.xml
    collapsetrue
    <!-- ========================================== -->
    <!--      PersistentId Definition               -->
    <!-- ========================================== -->
    
    <!-- Attribute Definition for %{idp.persistentId.sourceAttribute} -->
    <resolver:AttributeDefinition id="%{idp.persistentId.sourceAttribute}" xsi:type="ad:Simple"
        sourceAttributeID="uid">
        <resolver:Dependency ref="myLDAP" />
    </resolver:AttributeDefinition>
    コード ブロック
    languagexml
    titleconf/attribute-filter.xml
    collapsetrue
    <!--  Release to anyone -->
    <afp:AttributeFilterPolicy id="PolicyforAnyone">
        <afp:PolicyRequirementRule xsi:type="basic:ANY" />
    
        <afp:AttributeRule attributeID="%{idp.persistentId.sourceAttribute}">
            <afp:PermitValueRule xsi:type="basic:ANY" />
        </afp:AttributeRule>
    
    </afp:AttributeFilterPolicy>
  • conf/intercept/consent-intercept-config.xml
    ユーザ同意画面にて%{idp.persistentId.sourceAttribute}を表示しないように、//util:list[@id="shibboleth.consent.attribute-release.BlacklistedAttributeIDs"]%{idp.persistentId.sourceAttribute}を追加します。

    コード ブロック
    languagexml
    titleconf/intercept/consent-intercept-config.xml
    collapsetrue
    <util:list id="shibboleth.consent.attribute-release.BlacklistedAttributeIDs">
        <value>transientId</value>
        <value>persistentId</value>
        <value>eduPersonTargetedID</value>
        <value>%{idp.persistentId.sourceAttribute}</value>
    </util:list>

storedId3.1時点の情報

注意

IdP 3.1.2までのstoredIdにはrace conditionの問題があり、 IdP 3.2.0からstoredid周りに大きな変更が入ります。

...

なお、この機能はShibboleth IdP 3ではDeprecated Featuresとなっています。

computedId

computedIdでの設定を下記に示します。Shibboleth IdP 2と同じ設定で送信可能です。

...

  • conf/idp.properties

    設定できるプロパティ名はconf/logback.confの先頭を参照してください。

    展開
    コード ブロック
    languagejava
    titleconf/idp.properties
    # Logging Level
    idp.loglevel.idp=DEBUG
    idp.loglevel.messages=DEBUG
    idp.loglevel.encryption=DEBUG
    コード ブロック
    languagediff
    titleデフォルトからの差分差分
    +# Logging Level
    +idp.loglevel.idp=DEBUG
    +idp.loglevel.messages=DEBUG
    +idp.loglevel.encryption=DEBUG

...