...
- Installation of Shibboleth SP
- Deployment of Deployment of TiqrShib (tar.gz file)
- Deployment of Related Related Library
- Modification of Libraryof Library
- Configuration of Apacheof Apache
- Configuration of TiqrShib of TiqrShib Handler in Shibboleth
- Configuration of Initial Initial Setting of TiqrShib
...
1. Installation of Shibboleth SP in IdP Server
...
Configuration of web.xml and handler.xml
(*) In the handler.xml configuration, UserPassword handler should remain. That is, UserPassword handler should not be commented out but it just be added as a new handler.
Modification in /usr/java/tomcat/webapps/idp/WEB-INF/web.xmlを修正。xml
コード ブロック |
---|
<!-- Servlet protected by container used for TiqrShib authentication --> <servlet> <servlet-name>TiqrShibAuthHandler</servlet-name> <servlet-class>tiqrshibAuthn</servlet-class> <init-param> <param-name>authnMethod</param-name> <param-value>urn:oasis:names:tc:SAML:2.0:ac:classes:MobileTwoFactorContract</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet> <servlet-mapping> <servlet-name>TiqrShibAuthHandler</servlet-name> <url-pattern>/Authn/TiqrShib</url-pattern> </servlet-mapping> |
idpのhandler.xmlに下記を設定。Modification in handler.xml of shibboleth IdP
コード ブロック |
---|
<ph:LoginHandler xsi:type="ph:ExternalAuthn" externalAuthnPath="/Authn/TiqrShib" > <ph:AuthenticationMethod>urn:oasis:names:tc:SAML:2.0:ac:classes:MobileTwoFactorContract</ph:AuthenticationMethod> </ph:LoginHandler> |
...
Configuration of Shibboleth
(1)
...
Configuration of IdP
Make Username/PasswordHandlerをデフォルトにする設定。
PasswordHandler as default handler
Addition in /usr/java/tomcat/webapps/idp/WEB-INF/web.xmlに下記を追記。xml
コード ブロック |
---|
<!-- Servlet for doing Username/Password authentication --> <servlet> <servlet-name>UsernamePasswordAuthHandler</servlet-name> <servlet-class>edu.internet2.middleware.shibboleth.idp.authn.provider.UsernamePasswordLoginServlet</servlet-class> <init-param> <param-name>authnMethod</param-name> <param-value>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet> |
Configuration in relying-party.xmlに下記を設定。xml
コード ブロック |
---|
<rp:DefaultRelyingParty provider="https://IdPサーバ/idp/shibboleth" defaultSigningCredentialRef="IdPCredential" defaultAuthenticationMethod="urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"> |
(2)
...
Configuration of SP in IdP server
Add SessionInitiator in shibboleth2.xmlへのSessionInitiator追加xml
コード ブロック |
---|
<!-- Special SessionInitiator for Tiqr!!! --> <SessionInitiator type="SAML2" Location="/TiqrShib" id="siid1" entityID="https://simptest2.nec.test/idp/shibboleth" template="bindingTemplate.html" authnContextClassRef="urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport" /> |
Addition in /etc/httpd/conf.d/shibd.confへの追加conf
コード ブロック |
---|
<Location /TiqrShib> AuthType shibboleth ShibRequestSetting requireSessionWith siid1 require valid-user </Location> |
(3)
...
Configuration of SP (Application SP which requests Tiqr authentication)
Add SessionInitiatorで、 ="urn:oasis:names:tc:SAML:2.0:ac:classes:MobileTwoFactorContract" を設定する。in SessionInitiator
コード ブロック |
---|
<SessionInitiator type="Chaining" Location="/DS" isDefault="true" id="tiqrshiblogin" authnContextClassRef="urn:oasis:names:tc:SAML:2.0:ac:classes:MobileTwoFactorContract"> <SessionInitiator type="SAML2" template="bindingTemplate.html"/> <SessionInitiator type="Shib1"/> <SessionInitiator type="SAMLDS" URL="https://DSサーバ/ds/WAYF"/> </SessionInitiator> |
7. TiqrShibの初期値設定
7. Initial Setting of TiqrShib
Initial values setting in application/Bootstrap.phpに初期値読み込みを設定。(=>作業報告書P34)php
コード ブロック |
---|
<?php class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { // retrieve tiqrshib constants protected function _initConstants() { $options = $this->getOption('constants'); if (is_array($options)) { foreach($options as $key => $value) { if(!defined($key)) { define($key, $value); } } } } protected function _initLogger() { $this->bootstrap("log"); $logger = $this->getResource("log"); Zend_Registry::set("logger", $logger); } } |
(*) tiqrshib20130329.tar.gz内のtiqrshibコードには、ログ出力コードを入れているため、上記のLogger設定も必要。
【Tiqr初期値設定】(作業報告書P33)
The above Logger function is required since tiqrshib code has log output codes.
Initial Setting of Tiqr
Modification in /var/tiqrzenddemo/application/config/application.iniの設定を修正。ini
コード ブロック |
---|
resources.tiqr.identifier = "vm2.peofiamp.nii.ac.jp" ↑サーバのFQDNを記入。↑replace as your server FQDN resources.tiqr.name = "vm2" ↑Tiqrサーバの名称(アプリ上に表示される)を記入。 resources.tiqr.logoUrl = "https://vm2.peofiamp.nii.ac.jp/icons/gakunin-logo.png" ↑アプリに表示するロゴを指定。5KBくらいのpngファイル。100KBくらいだとアプリへのロードに時間が掛る。 constants.TIQRSHIB_DOMAIN = "nii.ac.jp" ↑IdPが送るeppnのセキュリティドメイン ↓以下のLDAP設定には、attribute-resolver.xmlと同じものを設定。 constants.TIQRSHIB_LDAP_HOST = "localhost" constants.TIQRSHIB_LDAP_PORT = "389" constants.TIQRSHIB_LDAP_BASEDN = "o=test_o,dc=ac,c=JP" constants.TIQRSHIB_LDAP_BINDREQUIRESDN = "true" constants.TIQRSHIB_LDAP_USERNAME = "cn=Manager,o=test_o,dc=ac,c=JP" constants.TIQRSHIB_LDAP_PASSWORD = "password" |
...