...
conf/saml-nameid.xml
<ref bean="shibboleth.SAML2PersistentGenerator" />
をアンコメントして有効にします。展開 コード ブロック language xml title conf/saml-nameid.xml <!-- Uncommenting this bean requires configuration in saml-nameid.properties. --> <!-- --> <ref bean="shibboleth.SAML2PersistentGenerator" /> <!-- -->
コード ブロック language diff title 差分 <!-- Uncommenting this bean requires configuration in saml-nameid.properties. --> - <!-- + <!-- --> <ref bean="shibboleth.SAML2PersistentGenerator" /> - --> + <!-- -->
conf/saml-nameid.properties
idp.persistentId.generator
のデフォルトはComputedId
の設定のため、idp.persistentId.sourceAttribute
とidp.persistentId.salt
のみを設定します。idp.persistentId.salt
には他人が推測できないランダムな値を指定してください。古いIdPから設定を引き継ぐ場合は同じ値を指定してください。展開 コード ブロック language java title conf/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 = XXXXXXXXXXXXXXXXXXXXXXXXXXX # To use a database, use shibboleth.StoredPersistentIdGenerator
コード ブロック language diff 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 = XXXXXXXXXXXXXXXXXXXXXXXXXXX # To use a database, use shibboleth.StoredPersistentIdGenerator
conf/attribute-resolver.xml
idp.persistentId.sourceAttribute
の値をで指定した属性がLDAPで定義されているのみでconf/attribute-resolver.xml
の//resolver:AttributeDefinition
で定義します。で定義されていない場合は、PersistentIdGenerator
から参照できませんので以下のように定義します。他の用途に使用しない場合resolver:AttributeEncoder
の2行は不要です。展開 コード ブロック language xml title conf/attribute-resolver.xml <!-- Schema: Core schema attributes--> <!-- --> <resolver:AttributeDefinition xsi:type="ad:Simple" id="uid" sourceAttributeID="uid"> <resolver:Dependency ref="myLDAP" /> <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:uid" encodeType="false" /> <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:0.9.2342.19200300.100.1.1" friendlyName="uid" encodeType="false" /> </resolver:AttributeDefinition> <!--
コード ブロック language diff title 差分 <!-- Schema: Core schema attributes--> - <!-- + <!-- --> <resolver:AttributeDefinition xsi:type="ad:Simple" id="uid" sourceAttributeID="uid"> <resolver:Dependency ref="myLDAP" /> <resolver:AttributeEncoder xsi:type="enc:SAML1String" name="urn:mace:dir:attribute-def:uid" encodeType="false" /> <resolver:AttributeEncoder xsi:type="enc:SAML2String" name="urn:oid:0.9.2342.19200300.100.1.1" friendlyName="uid" encodeType="false" /> </resolver:AttributeDefinition> + <!--
...
展開 | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
computedIdでの設定を下記に示します。
|
...
展開 | |||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
conf/c14n/subject-c14n.xml
conf/c14n/subject-c14n.xml
の<ref bean="c14n/SAML2Persistent" />
をアンコメントします。展開 コード ブロック language xml title conf/c14n/subject-c14n.xml <!-- Handle a SAML 2 persistent ID, provided a stored strategy is in use. --> <ref bean="c14n/SAML2Persistent" />
コード ブロック language diff title 差分 <!-- Handle a SAML 2 persistent ID, provided a stored strategy is in use. --> - <!-- <ref bean="c14n/SAML2Persistent" /> --> + <ref bean="c14n/SAML2Persistent" />
画面のカスタマイズ3.1時点の情報
ロゴの変更3.1時点の情報
ロゴをデフォルトのOur Identity Providerから機関のロゴに変更する手順は下記の通りです。
ロゴファイル
organization-logo.png
をedit-webapp/images/
以下に配置します。書式設定済み $ ls edit-webapp/images/ dummylogo-mobile.png dummylogo.png organization-logo.png
messages/error-messages.properties
のidp.logo
を上記1.で配置したファイル名に変更します。 なお、ファイル名は/images/
から始めます。また、idp.logo.alt-text
を変更します。コード ブロック language xml title messages/error-messages.properties collapse true idp.logo = /images/organization-logo.png idp.logo.alt-text = Organization logo
bin/build.sh
を実行して、war/idp.war
を作り直します。書式設定済み $ sudo -u tomcat env JAVA_HOME="${JAVA_HOME}" bin/build.sh Installation Directory: [/opt/shibboleth-idp] Rebuilding /opt/shibboleth-idp/war/idp.war ... ...done BUILD SUCCESSFUL Total time: 16 seconds
メッセージの多言語化3.1時点の情報
表示するメッセージを英語から日本語などに変更する場合は、下記の3つのメッセージファイルを用意します。文字コードはUTF-8である必要があります。
...
Shibboleth IdP 3には、uApprove相当のユーザ同意機能があります。uApprove JPとの違いはShibboleth IdP 3のユーザ同意機能とuApprove JPとの相違点を参照してください。
ユーザ同意の情報をMySQLに保存する設定3.1時点の情報
StorageRecordsテーブルの作成
コード ブロック language sql title MySQL collapse true 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の場合) collapse true <!-- 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" />
コード ブロック language xml title conf/global.xml (Tomcat8の場合) collapse true <!-- 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.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" />
情報 Tomcat 8付属のDBCP2から、
p:maxActive
はp:maxTotal
に、p:maxWait
はp:maxWaitMillis
に変更になりました。conf/idp.properties
コード ブロック language xml title conf/idp.properties collapse true # 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
属性毎に同意を得る設定3.1時点の情報
conf/idp.properties
idp.consent.allowPerAttribute
をtrue
に設定することで、属性毎にチェックボックスを付加することができます。コード ブロック language xml title conf/idp.properties collapse true idp.consent.allowPerAttribute = true
注意 SPの必須属性にもチェックボックスが表示されるため、利用者がSPの必須属性のチェックを外して属性を送信しなかった場合にSPの利用できない可能性があります。SPの必須属性にもチェックボックスが表示されるため、利用者がSPの必須属性のチェックを外して属性を送信しなかった場合にSPを利用できない可能性があります。
送信済み属性の属性値が変化した場合に再同意を得る設定3.1時点の情報
conf/idp.properties
コード ブロック language xml title conf/idp.properties collapse true # Whether attribute values and terms of use text are compared idp.consent.compareValues = true
...