...
service.xml に学認申請システムからattribute-filter.xmlをダウンロードするための設定を追加します。 configurationResourcePollingFrequency には再読み込みする間隔、 url には https://office.gakunin.nii.ac.jp/ProdFed/export/attribute_filter/申請書ベースID 、 file にはダウンロードしたファイルを保存するためのパスを指定してください。例として、学認IdP(申請書ベースID:PI0025JP)のattributer-filterをIdPのconfディレクトリ配下に60分おきにダウンロードするための設定を以下に 示します。PI0025JP の部分を置き換えてください。
パネル ...
<srv:Service id="shibboleth.AttributeFilterEngine" xsi:type="attribute-afp:ShibbolethAttributeFilteringEngine"
configurationResourcePollingFrequency="PT60M">
<srv:ConfigurationResource file="/opt/shibboleth-idp/conf/attribute-filter.xml" xsi:type="resource:FilesystemResource"/>
<srv:ConfigurationResource xsi:type="resource:FileBackedHttpResource"
url="https://office.gakunin.nii.ac.jp/ProdFed/export/attribute_filter/PI0025JP?target=uapprovejpuapprovejp221"
file="/opt/shibboleth-idp/conf/attribute-filter-fromoffice-backing.xml" />
</srv:Service>...
Tomcatを再起動して、設定を反映します。
書式設定済み $ sudo service tomcat6 restart
注意 この方法では、Tomcatを非root権限で動かしている場合は、confディレクトリに新規ファイルを書き込めない可能性があります。その場合は
file
に指定するファイルをあらかじめ作成し、ownerを変更するなどの事前準備が必要となります。
例(ユーザtomcatで動かしている場合):書式設定済み $ ls -ld /opt/shibboleth-idp/conf drwxr-xr-x 2 root root 4096 10月 8 17:50 /opt/shibboleth-idp/conf $ sudo touch /opt/shibboleth-idp/conf/attribute-filter-fromoffice-backing.xml $ sudo chown tomcat:tomcat /opt/shibboleth-idp/conf/attribute-filter-fromoffice-backing.xml
...
学認申請システムから自機関のIdP向けのattribute-filterをダウンロードします。wgetコマンドの引数には https://office.gakunin.nii.ac.jp/ProdFed/export/attribute_filter/申請書ベースID を指定します。例として、学認IdP(申請書ベースID:PI0025JP)のattributer-filterをダウンロードするときのコマンドを以下に示します。PI0025JP の部分を置き換えてください。
パネル $ wget https://office.gakunin.nii.ac.jp/ProdFed/export/attribute_filter/PI0025JP?target=uapprovejp221
ダウンロードしたattribute-filter.xmlを任意のディレクトリに移動します。例として、IdPのconfディレクトリに移動し、ファイル名を attribute-filter-fromoffice.xml に変更しています。
パネル $ sudo mv PI0025JP\?target=uapprovejp /opt/shibboleth-idp/conf/attribute-filter-fromoffice.xml
service.xml にダウンロードしたattribute-filterを読み込む設定を追加します。configurationResourcePollingFrequency には再読み込みする間隔、 file にはダウンロードしたファイルのパスを指定してください。例として、上でattributer-filterを60分おきに読み込むための設定を以下に示します。
パネル ...
<srv:Service id="shibboleth.AttributeFilterEngine" xsi:type="attribute-afp:ShibbolethAttributeFilteringEngine"
configurationResourcePollingFrequency="PT60M"
>
<srv:ConfigurationResource file="/opt/shibboleth-idp/conf/attribute-filter.xml" xsi:type="resource:FilesystemResource"/>
<srv:ConfigurationResource file="/opt/shibboleth-idp/conf/attribute-filter-fromoffice.xml" xsi:type="resource:FilesystemResource"/>
</srv:Service>...
Tomcatを再起動して、設定を反映します。
書式設定済み $ sudo service tomcat6 restart
警告 この方法ではattribute-filterダウンロードの部分は自動化されませんので、定期的に手動で実行するなり、後述2.の操作後に実行するなり、cronで実行するなりして、
attribute-filter-fromoffice.xml
を置き換えてください。
...