ARCADE 用 SP サーバ(WebDAV サーバ) 構 築 方 法 2013/11/03 Ver 1.1 作 成 ここでは ARCADE に 接 続 する SP サーバ(WebDAV サーバ)の 構 築 手 順 について 説 明 します 本 書 では OS は CentOS6.2 (64bit) で 構 築 する 手 順 を 示 します 1 OS のインストール インストーラを 起 動 して OS のインストールを 行 います 途 中 パッケージの 選 択 画 面 では Web Server を 選 択 してください インストール 後 SELinux の 設 定 を 無 効 にします vi /etc/selinux/config SELINUX=enforcing SELINUX=disabled その 他 詳 細 につきましては GakuNin ホームページ http://www.gakunin.jp/docs/fed/technical/sp/install/spinst22 を 参 考 にしてください 2 Shibboleth のインストール 設 定 GakuNin ホームページ http://www.gakunin.jp/docs/fed/technical/sp/install/spinst4 http://www.gakunin.jp/docs/fed/technical/sp/customize を 参 考 にして Shiboleth のインストールおよび SP の 設 定 を 行 ってください attribute-map.xml の eppn を edupersonprincipalname に 変 更 してください <Attribute name="urn:mace:dir:attribute-def:edupersonprincipalname" id="eppnedupersonprincipalname"> <AttributeDecoder xsi:type="scopedattributedecoder"/> </Attribute> <Attribute name="urn:oid:1.3.6.1.4.1.5923.1.1.1.6" id="eppnedupersonprincipalname"> <AttributeDecoder xsi:type="scopedattributedecoder"/> </Attribute>
3 ARCADE 用 Apache の 設 定 ARCADE 用 ディレクトリを 作 成 し Apache が 読 み 書 きできるようにします mkdir /var/www/html/arcade chown apache:apache /var/www/html/arcade /etc/httpd/conf/httpd.conf を 修 正 します ( 省 略 ).. DocumentRoot: The directory out of which you will serve your documents. By default, all requests are taken from this directory, but symbolic links and aliases may be used to point to other locations. DocumentRoot "/var/www/html/arcade" ( 省 略 ).. This should be changed to whatever you set DocumentRoot to. <Directory "/var/www/html/arcade"> Possible values for the Options directive are "None", "All", or any combination of: Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews Note that "MultiViews" must be named *explicitly* --- "Options All" doesn't give it to you. The Options directive is both complicated and important. Please see http://httpd.apache.org/docs/2.2/mod/core.htmloptions for more information. Options Indexes FollowSymLinks AllowOverride controls what directives may be placed in.htaccess files. It can be "All", "None", or any combination of the keywords:
Options FileInfo AuthConfig Limit AllowOverride Limit AuthConfig Controls who can get stuff from this server. Order allow,deny Allow from all WebDAV Restriction DAV On Shibboleth Restriction AuthType shibboleth ShibRequireSession On require valid-user </Directory> ( 省 略 ).. Specify a default charset for all content served; this enables interpretation of all content as UTF-8 by default. To use the default browser choice (ISO-8859-1), or to allow the META tags in HTML content to override this choice, comment out this directive: AddDefaultCharset UTF-8 ( 省 略 )..
/etc/sysconfig/httpd を 修 正 します By default, the httpd process is started in the C locale; to change the locale in which the server runs, the HTTPD_LANG variable can be set. HTTPD_LANG=C HTTPD_LANG=ja_JP.UTF-8 ARCADE 用 ディレクトリにダミーファイルを 置 きます touch /var/www/html/arcade/index.html /etc/httpd/conf.d/shib.conf をコメントアウトします <Location /secure> AuthType shibboleth ShibRequestSetting requiresession 1 require valid-user </Location> Apache(httpd)を 再 起 動 します
4 GakuNin map の 設 定 /etc/shibboleth/attribute-map.xml を 修 正 します 最 後 の</Attributes>の 直 前 に 以 下 の 記 述 を 追 加 してください <Attribute name="urn:oid:1.3.6.1.4.1.5923.1.5.1.1" id="ismemberof"/> /etc/shibboleth/attribute-policy.xml を 修 正 します <!-- Catch-all that pases everything else through unmolested. --> の 直 前 に 以 下 を 追 加 ください <afp:attributerule attributeid="ismemberof"> <afp:permitvaluerule xsi:type="attributeissuerstring" value="https://map.gakunin.nii.ac.jp/idp/shibboleth"/> </afp:attributerule> a.gakunin map (IdP)のメタデータを/etc/shibboleth/metadata/ gakuninmap-idp-metadata.xml に 保 存 してください <EntityDescriptor entityid="https://map.gakunin.nii.ac.jp/idp/shibboleth" xmlns="urn:oasis:names:tc: SAML:2.0:metadata"> <IDPSSODescriptor protocolsupportenumeration="urn:oasis:names:tc:saml:1.1:protocol urn:ma ce:shibboleth:1.0 urn:oasis:names:tc:saml:2.0:protocol"> <Extensions> <shibmd:scope xmlns:shibmd="urn:mace:shibboleth:metadata:1.0" regexp="false">map.g akunin.nii.ac.jp</shibmd:scope> </Extensions> <KeyDescriptor> <ds:keyinfo xmlns:ds="http://www.w3.org/2000/09/xmldsig"> <ds:x509data> <ds:x509certificate> MIIFGjCCBAKgAwIBAgIIKAeb42cBQVowDQYJKoZIhvcNAQEFBQAwfTELMAkGA1UE BhMCSlAxETAPBgNVBAcTCEFjYWRlbWUyMSowKAYDVQQKEyFOYXRpb25hbCBJbnN0 axr1dgugb2ygsw5mb3jtyxrpy3mxdtalbgnvbastbfvqs0kxidaebgnvbastf05j SSBPcGVuIERvbWFpbiBDQSAtIEcyMB4XDTExMDUwMjEwNTIwNFoXDTEzMDUzMTEx MDIwNFowgaoxCzAJBgNVBAYTAkpQMREwDwYDVQQHEwhBY2FkZW1lMjEqMCgGA1UE ChMhTmF0aW9uYWwgSW5zdGl0dXRlIG9mIEluZm9ybWF0aWNzMTwwOgYDVQQLEzND ewjlcibty2llbmnlieluznjhc3rydwn0dxjlierldmvsb3btzw50ierlcgfydg1l bnqxhjacbgnvbamtfw1hcc5nywt1bmlulm5pas5hyy5qcdccasiwdqyjkozihvcn AQEBBQADggEPADCCAQoCggEBAKzQmFgwni7QD6+ZuXDAeIiLac52FAy/TCxn0Ewl FbijzTfnMQ+pIEiXSk6cnGJvwWLOgRhhU5ISJ8K/IXFLEOubCyCoH2iwL4tG1M7d FTcmRYAq5UecRWaYR1uq8ZZv4YnIuFi9NJ19bOBEQGTBAvH4t0kVZ+w8ggseGEgx QUVQtqWc/7f4LueNV2D6ISoDzVxH6HNIlJwE0ccDKB3kunF5awfHkwl6qaZK4yk3 DEDWrvf32JPLmRWczvY7kNDZHxtFtuWkzeG5qJnCzSkddQLm3M3eroiwa1PN+LBm JA4jwkKNMgkRxQqHktBDby1+1p8X5ag8ByqbRQ7hpddHGOUCAwEAAaOCAW4wggFq MA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAdBgNVHQ4EFgQU en4pu0lki5wkb+lukp4n7k3ylcawhwydvr0jbbgwfoauewoh9xjkja7w2rxqggws RwLRDfswPgYDVR0RBDcwNYIVbWFwLmdha3VuaW4ubmlpLmFjLmpwghx2b3BsYXRm b3jtlmdha3vuaw4ubmlplmfjlmpwmgyga1udiarfmf0wtqykkomijjweaqicata/ MD0GCCsGAQUFBwIBFjFodHRwczovL3JlcG8xLnNlY29tdHJ1c3QubmV0L3NwY3Bw L2Nwcy9pbmRleC5odG1sMAwGCiqDCIybG2SHBQEwSAYDVR0fBEEwPzA9oDugOYY3 ahr0cdovl3jlcg8xlnnly29tdhj1c3qubmv0l3nwcgnhl25pas9vzgnhmi9mdwxs Y3JsLmNybDARBglghkgBhvhCAQEEBAMCBkAwDQYJKoZIhvcNAQEFBQADggEBAHyz ZBG9gaG1CW0oUsdHN1/Ip0JacMpCCMUq4kER7oCPikSJJfUcZ2D2z+z/KRM8DgIz KoNOWe+RiBx6GKw7VxdgEs66EZJbk7j8sB+s7Ahs6bWj1M9JNTuVqckemJlxjoXS
IvHDIQJFpl9kEClb7xrDgpMaaBdyyj6FtgyCF8rxfe0WyJWT74jgEPuM9UPWKJcV xozs4u6lbo/qcxwgwd6ckewrai2hmj+wnyyraubpsdaoqeysgvg1ecvnuuedppej YGV3njeh1D7nbEbNQfGi1ANuVnWdmYA3K4Q51D/KX/X6E2k+jfSszY14q0+ZNRBI 1AcZsff8LpBIg3Fr4Z4= </ds:x509certificate> </ds:x509data> </ds:keyinfo> </KeyDescriptor> /> <NameIDFormat>urn:mace:shibboleth:1.0:nameIdentifier</NameIDFormat> <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat> <SingleSignOnService Binding="urn:mace:shibboleth:1.0:profiles:AuthnRequest" Location="https://map.gakunin.nii.ac.jp/idp/profile/Shibboleth/SSO" /> <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://map.gakunin.nii.ac.jp/idp/profile/SAML2/POST/SSO" <SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://map.gakunin.nii.ac.jp/idp/profile/SAML2/Redirect/SS O" /> </IDPSSODescriptor> <AttributeAuthorityDescriptor protocolsupportenumeration="urn:oasis:names:tc:saml:1.1:proto col urn:oasis:names:tc:saml:2.0:protocol"> <Extensions> <shibmd:scope xmlns:shibmd="urn:mace:shibboleth:metadata:1.0" regexp="false">map.g akunin.nii.ac.jp</shibmd:scope> </Extensions> <KeyDescriptor> <ds:keyinfo xmlns:ds="http://www.w3.org/2000/09/xmldsig"> <ds:x509data> <ds:x509certificate> MIIFGjCCBAKgAwIBAgIIKAeb42cBQVowDQYJKoZIhvcNAQEFBQAwfTELMAkGA1UE BhMCSlAxETAPBgNVBAcTCEFjYWRlbWUyMSowKAYDVQQKEyFOYXRpb25hbCBJbnN0 axr1dgugb2ygsw5mb3jtyxrpy3mxdtalbgnvbastbfvqs0kxidaebgnvbastf05j SSBPcGVuIERvbWFpbiBDQSAtIEcyMB4XDTExMDUwMjEwNTIwNFoXDTEzMDUzMTEx MDIwNFowgaoxCzAJBgNVBAYTAkpQMREwDwYDVQQHEwhBY2FkZW1lMjEqMCgGA1UE ChMhTmF0aW9uYWwgSW5zdGl0dXRlIG9mIEluZm9ybWF0aWNzMTwwOgYDVQQLEzND ewjlcibty2llbmnlieluznjhc3rydwn0dxjlierldmvsb3btzw50ierlcgfydg1l bnqxhjacbgnvbamtfw1hcc5nywt1bmlulm5pas5hyy5qcdccasiwdqyjkozihvcn AQEBBQADggEPADCCAQoCggEBAKzQmFgwni7QD6+ZuXDAeIiLac52FAy/TCxn0Ewl FbijzTfnMQ+pIEiXSk6cnGJvwWLOgRhhU5ISJ8K/IXFLEOubCyCoH2iwL4tG1M7d FTcmRYAq5UecRWaYR1uq8ZZv4YnIuFi9NJ19bOBEQGTBAvH4t0kVZ+w8ggseGEgx QUVQtqWc/7f4LueNV2D6ISoDzVxH6HNIlJwE0ccDKB3kunF5awfHkwl6qaZK4yk3 DEDWrvf32JPLmRWczvY7kNDZHxtFtuWkzeG5qJnCzSkddQLm3M3eroiwa1PN+LBm JA4jwkKNMgkRxQqHktBDby1+1p8X5ag8ByqbRQ7hpddHGOUCAwEAAaOCAW4wggFq MA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATAdBgNVHQ4EFgQU en4pu0lki5wkb+lukp4n7k3ylcawhwydvr0jbbgwfoauewoh9xjkja7w2rxqggws RwLRDfswPgYDVR0RBDcwNYIVbWFwLmdha3VuaW4ubmlpLmFjLmpwghx2b3BsYXRm b3jtlmdha3vuaw4ubmlplmfjlmpwmgyga1udiarfmf0wtqykkomijjweaqicata/ MD0GCCsGAQUFBwIBFjFodHRwczovL3JlcG8xLnNlY29tdHJ1c3QubmV0L3NwY3Bw L2Nwcy9pbmRleC5odG1sMAwGCiqDCIybG2SHBQEwSAYDVR0fBEEwPzA9oDugOYY3 ahr0cdovl3jlcg8xlnnly29tdhj1c3qubmv0l3nwcgnhl25pas9vzgnhmi9mdwxs Y3JsLmNybDARBglghkgBhvhCAQEEBAMCBkAwDQYJKoZIhvcNAQEFBQADggEBAHyz ZBG9gaG1CW0oUsdHN1/Ip0JacMpCCMUq4kER7oCPikSJJfUcZ2D2z+z/KRM8DgIz KoNOWe+RiBx6GKw7VxdgEs66EZJbk7j8sB+s7Ahs6bWj1M9JNTuVqckemJlxjoXS IvHDIQJFpl9kEClb7xrDgpMaaBdyyj6FtgyCF8rxfe0WyJWT74jgEPuM9UPWKJcV xozs4u6lbo/qcxwgwd6ckewrai2hmj+wnyyraubpsdaoqeysgvg1ecvnuuedppej YGV3njeh1D7nbEbNQfGi1ANuVnWdmYA3K4Q51D/KX/X6E2k+jfSszY14q0+ZNRBI 1AcZsff8LpBIg3Fr4Z4= </ds:x509certificate> </ds:x509data> </ds:keyinfo> </KeyDescriptor> <AttributeService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding"
Location="https://map.gakunin.nii.ac.jp:8443/idp/profile/SAML1/SOAP/Att ributequery" /> <AttributeService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://map.gakunin.nii.ac.jp:8443/idp/profile/SAML2/SOAP/Att ributequery" /> <NameIDFormat>urn:mace:shibboleth:1.0:nameIdentifier</NameIDFormat> <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat> </AttributeAuthorityDescriptor> > > <Organization> <OrganizationName xml:lang="en">national Institute of Informatics</OrganizationName> <OrganizationName xml:lang="ja"> 国 立 情 報 学 研 究 所 </OrganizationName> <OrganizationDisplayName xml:lang="en">gakunin map (IdP)</OrganizationDisplayName <OrganizationDisplayName xml:lang="ja">gakunin map (IdP)</OrganizationDisplayName <OrganizationURL xml:lang="en">https://www.gakunin.jp/</organizationurl> </Organization> <ContactPerson contacttype="technical"> <GivenName>Takeshi</GivenName> <SurName>Nishimura</SurName> <EmailAddress>GakuNinmAP-help@nii.ac.jp</EmailAddress> </ContactPerson> </EntityDescriptor> /etc/shibboleth/shibboleth2.xml を 修 正 します GakuNin map (IdP)メタデータの 読 み 込 みを 設 定 します 他 の <MetadataProvider>の 後 に 下 記 を 追 加 してください <MetadataProvider type="xml" file="/etc/shibboleth/metadata/gakuninmap-idp-metadata.xml"/> 通 常 の 認 証 フローの 後 に eppn を 手 がかりとして GakuNin map (IdP)から ismemberof 属 性 を 取 得 するよう SimpleAggregation 設 定 を 行 います 既 存 の <AttributeResolver>の 後 に 以 下 の 記 述 を 追 加 します <AttributeResolver type="simpleaggregation" attributeid="edupersonprincipalname" format="urn:oid:1.3.6.1.4.1.5923.1.1.1.6"> <Entity>https://map.gakunin.nii.ac.jp/idp/shibboleth</Entity> <Attribute Name="urn:oid:1.3.6.1.4.1.5923.1.5.1.1" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" FriendlyName="isMemberOf"/> </AttributeResolver> Shibboleth(Shibd)を 再 起 動 してください
GakuNin map にアクセスし SP を 接 続 します コネクタ ARCADE の 管 理 者 に 招 待 いたしますので arcade-help@ ml.db.kanazawa-u.ac.jp まで 件 名 新 規 SP 接 続 申 請 としてお 送 りください いただい たメールの From アドレスに 招 待 状 を 送 付 いたします 管 理 者 に 昇 格 後 自 分 で ARCADE コネクタに SP を 接 続 していただければ 設 定 が 完 了 です map に 関 する 問 い 合 わせ GakuNinmAP-help@nii.ac.jp (@は 全 角 を 半 角 に) ARCADE に 関 する 問 い 合 わせ arcade-help@ml.db.kanazawa-u.ac.jp(@は 全 角 を 半 角 に) 参 考 自 組 織 のみファイルサーバを 公 開 する 場 合 上 記 の 方 法 では ファイルサーバは 原 則 GakuNin にログインできるユーザは 誰 でも 利 用 できる 状 態 になります 希 望 の 制 限 ( 自 組 織 のみ 利 用 可 教 職 員 のみ 利 用 可 等 )を 行 う 場 合 は SP のルートドキ ュメントディレクトリ /var/www/html/arcade/.htaccess を 作 成 します AuthType shibboleth ShibRequireSession On ShibRequireAll On require edupersonprincipalname ~.*@kanazawa-u.ac.jp$ この 設 定 では edupersonprincipalname が *@kanazawa-u.ac.jp(*は 任 意 の 英 数 字 等 ) だけが SP にアクセスでき その 他 のユーザからは ARCADE 上 で 参 照 できません つまり この 例 では 金 沢 大 学 のユーザのみ 許 可 することができます