比較バージョン

キー

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

1. はじめに

本メニューでは、IdPをカスタマイズします。
IdP Ver2が正常に起動している環境に対して、Ver3にアップグレードします。
設定ファイルについては、基本的には自動的にコンバートされたものを使用して認証確認まで行います。 

 


...

2. 実習セミナーでは

以下の手順で作業を進めてください。

・Tomcat 6の停止、自動起動設定の停止

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# service tomcat6 stop
# chkconfig tomcat6 off

・Shibboleth Ver2のバックアップ

以下のように/root直下に移動して、念のためバックアップを行います。
パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

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

・Tomcat 7のインストール

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

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# cd /root/PKG
# mkdir /usr/java
# tar zxv -C /usr/java -f apache-tomcat-7.?.??.tar.gz
# ln -s /usr/java/apache-tomcat-7.?.?? /usr/java/tomcat

・起動スクリプトの配置

情報

ここで使用する /etc/rc.d/init.d/tomcat7 は新規インストール手順で配布しているものと同一です。

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# unzip tomcat7.zip
# chmod a+x tomcat7
# cp tomcat7 /etc/rc.d/init.d/

・"tomcat"ユーザで起動

起動スクリプトを修正し、"tomcat"ユーザで起動するようにします。
以下のように設定します。(/etc/rc.d/init.d/tomcat7)

...

パネル
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

# chkconfig --add tomcat7
# chkconfig --level 345 tomcat7 on
# service tomcat7 start

・profileの修正

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

...

パネル
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を下記のように修正します。

...

パネル
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" />

・ShibbolethIdP Ver3のインストール

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

...

展開
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の修正

/opt/shibboleth-idp/conf/ldap.propertiesに、参照しているLDAPの情報を設定します。

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

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid
# chown -R tomcat:tomcat /opt/shibboleth-idp/logs
# chgrp -R tomcat /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が認識できるようにします。

...

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

 

・その他

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

パネル
borderColor#cccccc
bgColor#eeeeee
borderStylesolid

# yum erase tomcat6


...

3. 手順書

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

...

参考: [InCommon Wiki] Upgrading to Shibboleth IdP V3
 


...

4. 動作確認

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

...

注意

この手順で最低限の動作はしますが、設定ファイルのメンテナンス性が非常に悪く、設定ファイルの不一致により他のページに記載のあるIdPv3に対する手順をそのまま実行することもできません。特に本番運用向けには続けて次の Shibboleth IdP の設定をVer3形式に変換 の手順を実行することをお勧めします。


Prevnextbuttons

...