比較バージョン

キー

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

...

  • attribute-resolver.xml

    コード ブロック
    languagexml
    titleattribute-resolver.xml
    <!-- ========================================== -->
    <!--      Data Connectors                       -->
    <!-- ========================================== -->
    <!-- Computed targeted ID connector -->
    <resolver:DataConnector xsi:type="ComputedId" xmlns="urn:mace:shibboleth:2.0:resolver:dc"
                            id="computedID"
                            generatedAttributeID="computedID"
                            sourceAttributeID="%{idp.persistentId.sourceAttribute}"
                            salt="your random string herechangethistosomethingrandom">
    <!--
                            salt="%{idp.persistentId.salt}">
    -->
        <resolver:Dependency ref="%{idp.persistentId.sourceAttribute}" />
    </resolver:DataConnector>
    注意

    Shibboleth IdP 3.1.1では、salt属性は%{idp.persistentId.salt}で置き換えられませんので、ご注意ください。

     

storedId

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

  • attribute-resolver.xml

    コード ブロック
    languagexml
    titleattribute-resolver.xml
    <!-- ========================================== -->
    <!--      Attribute Definitions                 -->
    <!-- ========================================== -->
    
    <!-- Schema: eduPerson attributes -->
    
    <!-- Attribute Definition for eduPersonTargetedID -->
    <resolver:AttributeDefinition id="eduPersonTargetedID" xsi:type="SAML2NameID" xmlns="urn:mace:shibboleth:2.0:resolver:ad"
        nameIdFormat="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
        sourceAttributeID="computedID">
        <resolver:Dependency ref="computedID" />
        <resolver:AttributeEncoder xsi:type="SAML1XMLObject" xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
                name="urn:oid:1.3.6.1.4.1.5923.1.1.1.10" />
        <resolver:AttributeEncoder xsi:type="SAML2XMLObject" xmlns="urn:mace:shibboleth:2.0:attribute:encoder"
                name="urn:oid:1.3.6.1.4.1.5923.1.1.1.10" friendlyName="eduPersonTargetedID" />
    </resolver:AttributeDefinition>
     
     
    <!-- ========================================== -->
    <!--      Data Connectors                       -->
    <!-- ========================================== -->
    
    <!-- Stored targeted ID connector -->
    <resolver:DataConnector xsi:type="StoredId" xmlns="urn:mace:shibboleth:2.0:resolver:dc"
                            id="storedID"
                            generatedAttributeID="storedID"
                            sourceAttributeID="uid"
                            salt="changethistosomethingrandom">
        <resolver:Dependency ref="myLDAP" />
        <ApplicationManagedConnection jdbcDriver="com.mysql.jdbc.Driver"
                                      jdbcURL="jdbc:mysql://localhost:3306/shibboleth?autoReconnect=true"
                                      jdbcUserName="username"
                                      jdbcPassword="password" />
    </resolver:DataConnector>
  • attribute-filter.xml

    コード ブロック
    languagexml
    titleattribute-filter.xml
    <!--  Release to sp.example.jp -->
    <afp:AttributeFilterPolicy id="PolicyforSP1ExampleJP">
        <afp:PolicyRequirementRule xsi:type="basic:AttributeRequesterString" value="https://sp.example.jp/shibboleth-sp" />
        <afp:AttributeRule attributeID="eduPersonTargetedID">
            <afp:PermitValueRule xsi:type="basic:ANY" />
        </afp:AttributeRule>
    </afp:AttributeFilterPolicy>

attribute-resolver.xmlのData ConnectorはShibboleth IdP 3の機能を用いて、global.xmlで定義したbeanとsaml-nameid.propertiesで定義したプロパティを使って書くこともできます。

  • attribute-resolver.xml

    コード ブロック
    languagexml
    titleattribute-resolver.xml
    <!-- ========================================== -->
    <!--      Data Connectors                       -->
    <!-- ========================================== -->
     
    <!-- Stored targeted ID connector -->
    <resolver:DataConnector xsi:type="StoredId" xmlns="urn:mace:shibboleth:2.0:resolver:dc"
                            id="storedID"
                            generatedAttributeID="storedID"
                            sourceAttributeID="%{idp.persistentId.sourceAttribute}"
                            salt="changethistosomethingrandom">
    <!--
                            salt="%{idp.persistentId.salt}">
    -->
        <resolver:Dependency ref="%{idp.persistentId.sourceAttribute}" />
        <BeanManagedConnection>shibboleth.MySQLDataSource</BeanManagedConnection>
    </resolver:DataConnector>
    注意

    Shibboleth IdP 3.1.1では、salt属性は%{idp.persistentId.salt}で置き換えられませんので、ご注意ください。

参考