...
- Shibboleth Identity Providerは、
$IDP_HOME$
(例: /opt/shibboleth-idp
) にインストールされているものとします。Tomcatは、$CATALINA_HOME$
(例: /usr/java/tomcat
) にインストールされているものとし、$CATALINA_BASE$
(例: $CATALINA_HOME$
)にIdPインスタンスの設定がされているものとします。 - Tomcatではなく、Jettyがインストールされているものとします。
- uApprove JP は、
$UAPPROVE_INSTALL$
(例: /usr/local/src/uApproveJP-#version#
) にダウンロード、展開されているものとします。
...
パネル |
---|
borderColor | silver |
---|
titleBGColor | white |
---|
borderStyle | solid |
---|
title | $IDP_HOME$/conf/services.xml |
---|
|
...
<!--
This collection of resources differs slightly in that it should not include the file extension.
Message sources are internationalized, and Spring will search for a compatible language extension
and fall back to one with only a .properties extension.
--> <util:list id="shibboleth.MessageSourceResources"> <value>%{idp.home}/messages/uApproveJP</value> <value>%{idp.home}/messages/messages</value> <value>%{idp.home}/system/messages/messages</value> </util:list>
...
|
1.5 設定のカスタマイズ
$IDP_HOME$/conf/idp.properties
に、以下の変更を行います。idp.consent.allowPerAttribute
とidp.consent.compareValues
の値をtrue
に設定してください:
...
パネル |
---|
borderColor | silver |
---|
bgColor | white |
---|
title | $IDP_HOME$/conf/global.xml |
---|
|
... <bean id="shibboleth.FallbackLanguages" parent="shibboleth.CommaDelimStringArray" c:_0="#{'%{idp.ui.fallbackLanguages:}'.trim()}" />
<util<util:map idmap id="shibboleth.CustomViewContext"> <entry key="OptionalAttributeFunction"> <bean class="jp.gakunin.idp.consent.logic.impl.OptionalAttributeFunction" /> </entry> <entry key="AttributeIntendedUseFunction"> <bean class="jp.gakunin.idp.consent.logic.impl. AttributeIntendedUseFunction" p:defaultLanguages-ref="shibboleth.FallbackLanguages" /> </entry> </util:map>... AttributeIntendedUseFunction" p:defaultLanguages-ref="shibboleth.FallbackLanguages" /> </entry> </util:map>
...
|
警告 |
---|
Shibboleth IdP 4.1以降では、以下の2つのファイルの変更(services-system.xml およびattribute-release-beans.xml )についてファイルの場所が変更になっております。以下の手順で idp-conf-impl-4.1.x.jar ファイルを上書きしてください。 展開 |
---|
| /opt/shibboleth-idp/dist/webapp/WEB-INF/lib/idp-conf-impl-4.1.?.jar を適当な空のディレクトリでunzipしまして、中の net/shibboleth/idp/conf/services-system.xml および net/shibboleth/idp/flows/intercept/attribute-release-beans.xml につきまして、下記記載の通り修正を行ってください。 再度全体をzipしてidp-conf-impl-4.1.?.jar(?の部分はバージョン番号で置き換え)というファイル名にして元のファイルを上書きしてください。 |
|
$IDP_HOME$/system/conf/services-system.xml
に、以下の変更を行います。id="shibboleth.AttributeFilterService"
のbean
定義の<constructor-arg name="strategy">
を以下のように変更してください:
...
書式設定済み |
---|
# ls $CATALINA_BASE$/conf/Catalina/localhost/idp.xml
ls: cannot access /usr/java/tomcat/conf/Catalina/localhost/idp.xml: そのようなファイルやディレクトリはありません
# cp $IDP_HOME$/war/idp.war $CATALINA_BASE$/webapps/ |
Tomcatを再起動しますJettyを再起動します:
書式設定済み |
---|
# systemctl restart tomcatjetty |
2 高度なデプロイ
この節では高度な設定についてのトピックを取り上げます。
...
2.1.4. idp.consent.StorageServiceの設定変更でidp.sesssionconsent.StorageService
に設定したshibboleth.JPAStorageService
を定義します。
...
パネル |
---|
borderColor | silver |
---|
bgColor | white |
---|
title | $IDP_HOME$/conf/global.xml |
---|
|
<!-- 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.commons.dbcp2.BasicDataSource"
p:driverClassName="com.mysql.jdbc.Driver"
p:url="jdbc:mysql://localhost:3306/shibboleth"
p:username="shibboleth"
p:password="shibpassword"
p:maxTotal="10"
p:maxIdle="5"
p:maxWaitMillis="15000"
p:testOnBorrow="true"
p:validationQuery="select 1"
p:validationQueryTimeout="5" />
|
2.1.6.
...
Jettyの再起動
Tomcatを再起動しますJettyを再起動します:
書式設定済み |
---|
# systemctl restart tomcatjetty |
2.2 テンプレート
テンプレートのカスタマイズ
$IDP_HOME$/views/
にある Velocityテンプレートファイル 、 $IDP_HOME$/edit-webapp/
にあるCSS や画像ファイルは自由にカスタマイズすることができます。 Velocity を用いているので容易にカスタマイズ出来るようになっています。
...
このルールは<PermitValueRule xsi:type="uajpmf:AttributeInMetadata">
のように記述します。以下のオプショナルな属性を使用できます:
onlyIfRequired | 必須とマークされた属性のみ送信を許可し、オプションとマークされたものは送信しないブーリアンフラグです。 デフォルト値は true です。 |
matchIfMetadataSilent | メタデータに <AttributeConsumingService> がない場合にオプションとマークするかどうかを決定するブーリアンフラグです。 デフォルト値は false です。 |
onlyIfChecked | オプションとマークされた属性の送信を利用者が許可/拒否できるかどうかを示すブーリアンフラグです。 false の時の動作は Shibboleth IdP 3.2.0 以降の AttributeInMetadata と同一になり、オプションとマークされた属性も必須とマークされた属性と同様にチェックボックスなしで表示されます。 デフォルト値は false です。 |
AttributeInMetadata
マッチファンクションを使用した<PermitValueRule>
の書き方は下記のようになります:
パネル |
---|
borderColor | silver |
---|
bgColor | white |
---|
|
<PermitValueRule xsi:type="uajpmf:AttributeInMetadata" onlyIfRequired="false"
onlyIfChecked="true"/> |
オプションとマークされた属性をチェックボックスつきで表示します。チェックボックスをチェックしたときだけ送信します。
...
この属性は<ResquestedAttribute>
にて定義します:
uajpmd:description | 属性の使用用途の文字列です。 |
uajpmd:descrption
を使用した<RequestedAttribute>
の設定例:
...
<uajpmd:RequestedAttributeExtension>
は以下の必須属性と一つ以上の<uajpmd:
Description>
と共に設定します:
uajpmd:FriendlyName | 関連づけたい<RequestedAttribute> のFriendlyName 属性の値です。 |
<uajpmd:Description>
には属性の使用用途を記述します。<uajpmd:RequestedAttributeExtension>
は以下の必須属性と共に設定します:
<uajpmd:RequestedAttributeExtension>
の設定例:
...