比較バージョン

キー

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

...

  • StorageRecordsテーブルの作成

    コード ブロック
    languagesql
    titleMySQL
    collapsetrue
    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

    persistent-idの設定で定義したshibboleth.MySQLDataSourceを参照する形でshibboleth.JPAStorageServiceを定義します。persistent-idの設定を設定していない場合は合わせて設定を行ってください。が設定済みの場合、shibboleth.MySQLDataSourceの定義は不要です。

    コード ブロック
    languagexml
    titleconf/global.xml (Tomcat7の場合)
    collapsetrue
    <!-- 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="shibboleth.MySQLDataSource" />
            <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="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" />
  • conf/idp.properties

    コード ブロック
    languagexml
    titleconf/idp.properties
    collapsetrue
    # Set to "shibboleth.StorageService" or custom bean for alternate storage of consent
    idp.consent.StorageService = shibboleth.JPAStorageService
     
    # Maximum number of consent storage records
    # Set to -1 for unlimited server-side storage
    idp.consent.maxStoredRecords = -1

...