比較バージョン

キー

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

1. はじめに

本メニューでは、IdPをカスタマイズします。
IdP Ver3が正常に起動している環境に対して、Ver4にアップグレードします。
設定ファイルについては、基本的には自動的にコンバートされたものを使用して認証確認まで行います。 ベースがIdP v3.2となっているところを、一度IdP v3.4にアップグレードしてからIdP v4にアップグレードします。 


...

2. 実習セミナーでは

以下の手順で作業を進めてください。以下は、本環境での関連情報となります。

...

詳細な手順については、「3.手順」を参照ください。

...

また、以下にはIdP v4の動作に必要なJava11とTomcat9のインストール手順を記載しています。

...

borderColor#cccccc
bgColor#eeeeee
borderStylesolid

...

# service tomcat stop

・Shibboleth Ver3のバックアップ

以下のように/root直下に移動して、念のためバックアップを行います。


・IdPのパッケージ

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# cd /root
# tar zcfv shibidp-v3-backup.tar.gz /opt/shibboleth-idp

・Tomcat 9のインストール

ShibbolethIdP Ver4はTomcat 7上で使用できないので、Tomcat 9をインストールします。
現在CentOS 7環境のため標準パッケージにはないので、Apache Software Foundationが配布するTomcatパッケージを使用します。
パッケージは、以下のように/root/PKG配下に配置しています。

/PKG 配下に用意しています。

shibboleth-identity-provider-3.4.7

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# cd /root/PKG
# tar zxv -C /usr/share -f apache-tomcat-9.?.??

.tar.gz

# ln -s /usr/share/apache-tomcat-9.?.?? /usr/share/tomcat

・起動スクリプトの配置

情報

ここで使用する起動スクリプトは、基礎編のインストール手順で配布しているものと同一です。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# cp /root/GETFILE/tomcat.service /etc/systemd/system

・所有者、パーミッションの設定

以下のコマンドでその他Tomcat関連の設定ファイルやディレクトリの所有者、パーミッションを設定します。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# chown -R tomcat:tomcat /usr/java/tomcat/{temp,logs,work}
# chown tomcat:tomcat /usr/java/tomcat/webapps
# chmod +t /usr/java/tomcat/webapps
# chgrp tomcat /usr/java/tomcat/conf/*.*
# chmod g+r /usr/java/tomcat/conf/*.*
# mkdir -p /usr/java/tomcat/conf/Catalina/localhost

・自動起動の設定

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# systemctl enable tomcat

補足:
以下のコマンドで自動起動設定を無効にすることができます。

# systemctl disable tomcat

・profileの修正

/etc/profileもしくは/etc/profile.d/java-tomcat.shを下記のように修正します。

...

borderColor#cccccc
bgColor#eeeeee
borderStylesolid

...

shibboleth-identity-provider-4.0.1.tar.gz

・ShibbolethIdP インストール

追加した環境変数を読み込みます。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
 # source /etc/profile

 

・httpdの設定

/etc/httpd/conf.d/virtualhost-localhost80.conf を以下の内容で作成してください。これはShibboleth IdPが提供するreload-metadata.sh等のコマンドを使った操作を可能にするためのものです。

パネル

<VirtualHost localhost:80>
ProxyPass /idp/ ajp://localhost:8009/idp/
</VirtualHost>

・server.xmlの修正

$CATALINA_BASE/conf/server.xmlを下記のように修正します。

他の用途で使用する予定がなければConnector port="8080"をコメントアウトしてください。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

<!--
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->

Connector port="8009"に以下のように追加してください。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443"
enableLookups="false" tomcatAuthentication="false" address="127.0.0.1" maxPostSize="100000" />

...

パッケージは、以下のように/root/PKG配下に配置しています。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# cd /root/PKG

IdP v3.4へのアップグレード
# unzip tar xzvf shibboleth-identity-provider-3.4.?.?tar.zipgz
# cd shibboleth-identity-provider-3.?4.?
# ./bin/install.sh

 install.shシェルスクリプトを実行すると、以下のような問い合わせがあります。
手順に従って、進めてください。


IdP v4.0へのアップグレード

# tar xzvf

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

Source (Distribution) Directory: [/root/PKG/ shibboleth-identity-provider-34.1.1]
[Enter] ←入力なし
Installation Directory: [/opt/shibboleth-idp]

[Enter] ←入力なし
A V2 Installation has been detected. Configuration will be preserved into
.v2 folders and appropriate files copied forward.
Hostname: [ex-idp-test**.gakunin.nii.ac.jp]
[Enter] ←入力なし
SAML EntityID: [https://ex-idp-test**.gakunin.nii.ac.jp/idp/shibboleth]
[Enter] ←入力なし
Attribute Scope: [gakunin.nii.ac.jp]
nii.ac.jp[Enter]

Cookie Encryption Key Password: cookiepass[Enter] ←任意のパスワード
Re-enter password: cookiepass[Enter] ←任意のパスワード
Warning: /opt/shibboleth-idp/dist does not exist.
(省略)
Rebuilding /opt/shibboleth-idp/war/idp.war ...
...done

BUILD SUCCESSFUL

展開
titleアップグレード時にインストーラが行うこと一覧(ここをクリックすると展開されます...)
  • The V2 configuration files are copied to a new directory, conf.v2

  • The packed V2 warfile is copied to a new directory, war.v2

  • The directories logs and metadata are left untouched (note that leaving the latter in place means that new example metadata for the IdP is not generated).

  • Specific legacy files that are generally compatible with V3 (attribute-resolver.xml, attribute-filter.xml, relying-party.xml) are pre-populated into the new config directory; these make up the bulk of your older configuration, save for authentication.

  • The relying-party.xml file is also copied to metadata-providers.xml

  • The rest of the configuration is populated as for a new installation.

  • Finally, services.properties is altered to enable a legacy relying party configuration.

・ldap.propertiesの修正

...

0.?.tar.gz
# cd shibboleth-identity-provider-4.0.?

# ./bin/install.sh -Didp.conf.filemode=640 -Didp.conf.credentials.filemode=640


以降は、IdP4へのアップグレード時の手順となります。
インストール自体は、基礎編に記載されている手順に沿って行います。
 → IdP v4インストール(基礎編)

ここには、TomcatからJettyに切り替えるための事前に行っておく手順を記載します。

・Tomcat 7のアンインストール

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

## Connection properties ##
#idp.authn.LDAP.ldapURL = ldap://localhost:10389
idp.authn.LDAP.ldapURL = ldap://localhost
#idp.authn.LDAP.useStartTLS = true
idp.authn.LDAP.useStartTLS = false
(省略)
#idp.authn.LDAP.baseDN = ou=people,dc=example,dc=org
idp.authn.LDAP.baseDN = o=test_o,dc=ac,c=JP
#idp.authn.LDAP.subtreeSearch = false
idp.authn.LDAP.subtreeSearch = true
(省略)
#idp.authn.LDAP.bindDN = uid=myservice,ou=system
idp.authn.LDAP.bindDN = cn=olmgr,o=test_o,dc=ac,c=JP
#idp.authn.LDAP.bindDNCredential = myServicePassword
idp.authn.LDAP.bindDNCredential = csildap

・Tomcatの設定

Tomcatを”tomcat”ユーザで実行する場合は、ログファイルを出力できるようディレクトリの所有者を変更します。
同様に、設定ファイルやメタデータの保存ディレクトリなどの所有者・パーミッションも変更します。

# yum remove tomcat

・jakarta-taglibs-standardのアンインストール

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

#

chown -R tomcat:tomcat /opt/shibboleth-idp/logs
# chgrp -R tomcat

yum remove jakarta-taglibs-standard
# rm -f /opt/shibboleth-idp/

conf
# chmod -R g+r /opt/shibboleth-idp/conf
# chgrp tomcat /opt/shibboleth-idp/metadata
# chmod g+w /opt/shibboleth-idp/metadata
# chmod +t /opt/shibboleth-idp/metadata
# chgrp tomcat /opt/shibboleth-idp/credentials/server.key
# chmod g+r /opt/shibboleth-idp/credentials/server.key

・idp.war の登録

${CATALINA_BASE}/conf/Catalina/localhost/idp.xml という新規ファイルを以下の内容で作成し、idp.warをTomcatが認識できるようにします。

edit-webapp/WEB-INF/lib/jakarta-taglibs-*

・JDK 8のアンインストール

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

<Context docBase="/opt/shibboleth-idp/war/idp.war"
         privileged="true"
         antiResourceLocking="false"
         swallowOutput="true" />

httpdとTomcatを再起動します。

# yum remove java-1.8.0-openjdk


・httpdの再起動とTomcatの起動を行います。(すでにJettyが起動している場合はstopしてから行ってください)

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# service tomcat7 stop
# service httpd restart
# service tomcat7 start

※画面のカスタマイズ方法はv2から変わっています。views/login.vm等をご参照ください。
参考:  GakuNinShare:ロゴの変更

 

・その他

Tomcat 6は不要になっていますので削除してください。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# yum erase tomcat6

3. 手順書

以下は、英語での情報が記載されたwiki.shibboleth.netのURLです。手順の詳細にご興味がある方はご参照ください。

参考: UpgradingFromV2

なお、実習セミナーでは不要としておりますが、バージョン2でバックチャネルの設定をしていた場合は IdPv3セッティング > Back-Channelの設定 に従って設定してください。

また、バージョン2にuApprove.jp等を入れていた場合は、不要な設定が残っていないかApacheの設定ファイルを確認してください。

systemctl restart httpd # systemctl start jetty


...

3. 手順書

まず、下記「IdP v3アップデートに関する情報」の「2.アップデート手順」にてIdP v3.4で動作できるところまで進めます。

その後、下記「IdP v4アップデートに関する情報」の「設定ファイルの移行について」の手順を参照し、DEPRECATEDのwarningが
出ないような状態になるよう修正を行います。認証時に出力される場合もあるため、3.4.7で起動したら認証の動作確認まで行いログを確認してください。

設定ファイルの修正が終わったら、念のため再度3.4.7で起動し認証の動作確認を行った後、DEPRECATEDのwarningが出ていないことを確認してください。

そこまで行えたら、いよいよv4へのアップグレードです。
上記Java11、Tomcat9を用意したのち、IdP v4の「アップデートの手順」に進んでください。

参考: IdPv3アップデートに関する情報IdPv4アップデートに関する情報参考: [InCommon Wiki] Upgrading to Shibboleth IdP V3


...

4. 動作確認

① 各自が使用するSPの接続確認用ページにアクセスします。

...

③ DSの所属機関の選択画面が表示されるので、各自が使用するIdPを選択します。

Ver3にアップグレードした各自が使用するIdPのログイン画面が表示されることを確認します。 (v3ではページ下部にチェックボックスが表示される部分が異なります)Ver4にアップグレードした各自が使用するIdPのログイン画面が表示されることを確認します。 (v4では同意画面の属性名に日本語が表示される部分が異なります)

⑤ Username/Passwordを入力して認証を行います。

⑥ 正しく属性受信の確認ページが表示される事を確認してください。

...

Prevnextbuttons