...
conf/saml-nameid.xml
<ref bean="shibboleth.SAML2PersistentGenerator" />
をアンコメントして有効にします。コード ブロック language xml title conf/aml-nameid.xml collapse true <!-- Uncommenting this bean requires configuration in saml-nameid.properties. --> <!-- --> <ref bean="shibboleth.SAML2PersistentGenerator" /> <!-- -->
conf/saml-nameid.properties
idp.persistentId.generator,
idp.persistentId.store, idp.persistentId.sourceAttributeとidp.persistentId.salt
を設定します。コード ブロック language xml title conf/saml-nameid.properties collapse true # Set to shibboleth.StoredPersistentIdGenerator for db-backed storage # and uncomment/name the PersistentIdStore bean to use idp.persistentId.generator = shibboleth.StoredPersistentIdGenerator idp.persistentId.store = PersistentIdStore # Set this to null to skip hash-based generation of first stored ID #idp.persistentId.computed = shibboleth.ComputedPersistentIdGenerator # Otherwise for computed PersistentIDs set the source attribute and salt. idp.persistentId.sourceAttribute = uid4ppersistentId idp.persistentId.salt = changethistosomethingrandom
conf/global.xml
idp.persistentId.storeの値をconf/global.xml
で定義します。コード ブロック language xml title conf/global.xml (Tomcat 7の場合) collapse true <!-- Use this file to define any custom beans needed globally. --> <bean id="shibboleth.MySQLDataSource" class="org.apache.tomcat.dbcp.dbcp.BasicDataSource" p:driverClassName="com.mysql.jdbc.Driver" p:url="jdbc:mysql://localhost:3306/shibboleth" p:username="username" p:password="password" p:maxActive="10" p:maxIdle="5" p:maxWait="15000" p:testOnBorrow="true" p:validationQuery="select 1" p:validationQueryTimeout="5" /> <bean id="PersistentIdStore" class="net.shibboleth.idp.saml.nameid.impl.JDBCPersistentIdStore" p:dataSource-ref="shibboleth.MySQLDataSource" />
コード ブロック language xml title conf/global.xml (Tomcat 8の場合) collapse true <!-- Use this file to define any custom beans needed globally. --> <bean id="shibboleth.MySQLDataSource" class="org.apache.tomcat.dbcp.dbcp2.BasicDataSource" p:driverClassName="com.mysql.jdbc.Driver" p:url="jdbc:mysql://localhost:3306/shibboleth" p:username="username" p:password="password" p:maxIdle="5" p:maxTotal="10" p:maxWaitMillis="15000" p:testOnBorrow="true" p:validationQuery="select 1" p:validationQueryTimeout="5" /> <bean id="PersistentIdStore" class="net.shibboleth.idp.saml.nameid.impl.JDBCPersistentIdStore" p:dataSource-ref="shibboleth.MySQLDataSource" />
注意info Tomcat 8の場合に、8付属のDBCP2から、
p:maxActive
およびはp:maxTotal
に、p:maxWait
を指定するとエラーとなり、Shibboleth IdPが起動しない。はp:maxWaitMillis
に変更になりました。conf/attribute-resolver.xml
とconf/attribute-filter.xml
idp.persistentId.sourceAttribute
の値をconf/attribute-resolver.xml
の//resolver:AttributeDefinition
で定義して、conf/attribute-filter.xml
で送信設定を行います。コード ブロック language xml title conf/attribute-resolver.xml collapse true <!-- ========================================== --> <!-- 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>
コード ブロック language xml title conf/attribute-filter.xml collapse true <!-- 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}
を追加します。コード ブロック language xml title conf/intercept/consent-intercept-config.xml collapse true <util:list id="shibboleth.consent.attribute-release.BlacklistedAttributeIDs"> <value>transientId</value> <value>persistentId</value> <value>eduPersonTargetedID</value> <value>%{idp.persistentId.sourceAttribute}</value> </util:list>
...