...
Shibboleth IdP 3には、uApprove相当のユーザ同意機能があります。uApprove JPとの違いはShibboleth IdP 3のユーザ同意機能とuApprove JPとの相違点を参照してください。
ユーザ同意の情報をMySQLに保存する設定
StorageRecordsテーブルの作成
StorageRecordsテーブルを作成します。展開 コード ブロック language sql title MySQL CREATE TABLE `StorageRecords` ( `context` varchar(255) NOT NULL, `id` varchar(255) NOT NULL, `expires` bigint(20) DEFAULT NULL, `value` longtext NOT NULL, `version` bigint(20) NOT NULL, PRIMARY KEY (`context`,`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
conf/global.xml
shibboleth.JPAStorageService
を定義します。persistent-idの設定(storedId)が設定済みの場合、重複となるためMyDataSource
の定義は不要です。展開 コード ブロック language xml title conf/global.xml (Tomcat7の場合) <!-- Use this file to define any custom beans needed globally. --> <bean id="shibboleth.JPAStorageService" class="org.opensaml.storage.impl.JPAStorageService" p:cleanupInterval="%{idp.storage.cleanupInterval:PT10M}" c:factory-ref="shibboleth.JPAStorageService.entityManagerFactory" /> <bean id="shibboleth.JPAStorageService.entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="packagesToScan" value="org.opensaml.storage.impl" /> <property name="dataSource" ref="MyDataSource" /> <property name="jpaVendorAdapter" ref="shibboleth.JPAStorageService.JPAVendorAdapter" /> <property name="jpaDialect"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" /> </property> </bean> <bean id="shibboleth.JPAStorageService.JPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" p:database="MYSQL" /> <bean id="MyDataSource" 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" />
conf/idp.properties
idp.consent.StorageService
を上記 をconf/global.xml
で定義したshibboleth.JPAStorageService
に変更します。展開 コード ブロック language xml title conf/idp.properties # Set to "shibboleth.StorageService" or custom bean for alternate storage of consent idp.consent.StorageService = shibboleth.JPAStorageService
コード ブロック language diff title 差分 # Set to "shibboleth.StorageService" or custom bean for alternate storage of consent -#idp.consent.StorageService = shibboleth.ClientPersistentStorageService +idp.consent.StorageService = shibboleth.JPAStorageService
...