ISBN EDISON 계산과학공학플랫폼서비스 연합인증연동기술보고서 - Apache JServ Protocol (AJP) 를이용한아파치환경의 Shibboleth Service Provider 와 Tomcat 환경의 Liferay(EDISON platform) Shibboleth Plug-in 구축및연동보고서 - 일자 부서 작성자 2017 년 10 월 23 일 슈퍼컴퓨팅본부응용연구기술개발실 장희진
[ 목차 ] 1. 설치 SW 및사전준비...3 2. CentOS 6.9 기반의 Apache 2.4.12 환경구축...7 3. SRPM 을이용한 Shibboleth SP 설치... 11 4. Shibboleth SP 설정... 16 5. Shibboleth SP 를위한아파치설정... 21 6. ID 연계확인... 22 7. AJP 를이용한 Liferay 연동설정... 24 8. Liferay Shibboleth Plugin 설치... 26 9. Liferay 연합인증연동확인... 28 2
1 설치 SW 및사전준비 1. 개요 본보고서는현재운영되고있는 EDISON 계산과학공학플랫폼서비스에 SAML() 기반의연합인증 (Identity Federation) 기술을적용하기위해, EDISON 서비스와동일환경을구축한후연합인증 SW를설치하고연동하기위한기술을정의한다. 현재 EDISON 서비스환경은이용자의서비스요청을수용하기위해전면부 (front-end) 에위치한 Apache 서버와, 후면부 (back-end) 에서서비스를넘겨받아동적페이지를포함한실제모든서비스를처리하는 Tomcat 서버가물리적으로분리되어있다. EDISON 서비스는물리적으로후면부 Tomcat 서버에서운용되며, 널리활용되는 CMS(Content Management System) 인 Liferay Portal Community Edition 6.2를이용해개발되었다. 본연구에서는이원화된동일환경을구축하고양자의통신은 Apache JServ Protocol (AJP) 프로토콜을통해통신하도록구축함으로써 EDISON 서비스와동일환경을재현하였다. 또한현재서비스중인특정 Apache 서버환경 (Apache 2.4.12) 에맞춰연합인증 SW를설치하기위해서는 YUM 기반의자동설치가불가하므로, SRPM(RPM Source) 을이용해단계적으로필요패키지및 Shibboleth SW를설치하고, Tomcat 서버에는 Liferay CE 및 Shibboleth SW와의연동을위한 Liferay의 Shibboleth Plug-in을설치함으로써전체적으로 Apache, Tomcat, Liferay, Shibboleth Service Provider가조화롭게구동되는환경을구축하였다. 이로써 EDISON 서비스와연합인증연동을위한기본적인환경구축이완료되었으며, 앞으로서비스차원에서의실제적연동을위해 EDISON 서비스와 Liferay CE 간연동을위해 Liferay Plug-in 최적화개발을진행할계획이다. 3
2. 시스템구성도 3. 설치 SW 목록 구분 SW 버전 OS CentOS 6.9 policycoreutils-python 2.0.83-30.1.el6_8.x86_64 Apache -2.4.12 httpd24-httpd-tools httpd24-httpd httpd24-mod_ssl 2.4.12-4.el6.2.x86_64 httpd24-httpd-devel Shibboleth SRPM log4shib SP 및의존 패키지 RPM log4shib-debuginfo liblog4shib1 1.0.9-3.3 4
liblog4shib-devel SRPM xerces-c xerces-c-debuginfo RPM xerces-c-bin libxerces-c-3_1 3.1.4-1.2 ibxerces-c-devel SRPM xml-security-c libxml-security-c17 RPM libxml-security-c-devel xml-security-c-bin 1.7.3-3.3 xml-security-c-debuginfo SRPM curl-openssl curl-openssl RPM curl-openssl-debuginfo libcurl-openssl 7.51.0-2.2 libcurl-openssl-devel SRPM xmltooling libxmltooling7 RPM libxmltooling-devel xmltooling-schemas 1.6.0-1.2 xmltooling-debuginfo 5
SRPM opensaml opensaml-bin RPM opensaml-debuginfo opensaml-schemas 2.6.0-1.2 libsaml-devel libsaml9 SRPM shibboleth RPM shibboleth-debuginfo shibboleth-devel 2.6.0-2.2 shibboleth Liferay & Tomcat OpenJDK Tomcat Liferay Portal 1.8.0_144 7.0.62 6.2-ce-ga6 * yum 명령어로설치할때자동으로포함되어설치되는의존패키지제외하였음 4. 사전준비 SELinux 비활성화작업이필요하다. 아래의명령어를통해 SELinux 비활성화작업을수행한다. getenforce #SELinux 상태확인 setenforce 0 #SELinux 비활성화 vi /etc/sysconfig/selinux # 영구적비활성화를위한수정 파일에서아래의내용과같이변경후저장하여 SELinux 를영구적으로비활성화한다. #SELINUX= SELINUX=permissive 6
2 CentOS 6.9 기반의 Apache 2.4.12 환경구축 CentOS-6.9 환경에기본적으로설치된아파치버전은 httpd-2.2.15 이다. 설치하려는버전은 httpd-2.4.12이므로 httpd24-httpd 패키지를이용한다. yum을이용해 ( 레파지토리를통해 ) httpd24-httpd를설치할경우 httpd-2.4.6이설치되므로 httpd-2.4.12 버전을위한 RPM 파일들을직접다운로드받아서설치한다. 해당버전 RPM 파일을로컬에다운로드한후 yum으로설치하면동일버전의의존적 SW들이함께설치된다. 이과정에서아파치 2.4 기본적인패키지들이설치되므로아파치 2.4를위한레파지토리를미리설정해두어야한다. * 여기에서는관리자계정 (root) 으로설치를진행하였다. * 본문서의 CLI 명령문을 copy & paste 할경우한글워드프로세서에의해자동변환된기능 ( 예. -- -> ) 으로인해 오류가생성될수있으므로직접명령어를입력해설치한다. 1. httpd24-httpd 레파지토리설정 curl L -s http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo > /etc/yum.repos.d/epel-httpd24.repo 2. httpd24-httpd SW(2.4.12) 다운로드 다운로드사이트 http://mirror.centos.org/centos/6/sclo/x86_64/rh/httpd24 RPM 다운로드 httpd24-httpd-2.4.12-4.el6.2.x86_64.rpm httpd24-httpd-devel-2.4.12-4.el6.2.x86_64.rpm 7
httpd24-httpd-tools-2.4.12-4.el6.2.x86_64.rpm httpd24-mod_ssl-2.4.12-4.el6.2.x86_64.rpm wget http://mirror.centos.org/centos/6/sclo/x86_64/rh/httpd24/httpd24-httpd-2.4.12-4.el6.2.x86_64.rpm wget http://mirror.centos.org/centos/6/sclo/x86_64/rh/httpd24/httpd24-httpd-devel- 2.4.12-4.el6.2.x86_64.rpm wget http://mirror.centos.org/centos/6/sclo/x86_64/rh/httpd24/httpd24-httpd-tools- 2.4.12-4.el6.2.x86_64.rpm wget http://mirror.centos.org/centos/6/sclo/x86_64/rh/httpd24/httpd24-mod_ssl- 2.4.12-4.el6.2.x86_64.rpm 3. 설치 아래의명령어를통해설치한다. yum install policycoreutils-python yum install./httpd24-httpd-tools-2.4.12-4.el6.2.x86_64.rpm yum install./httpd24-httpd-2.4.12-4.el6.2.x86_64.rpm yum install./httpd24-mod_ssl-2.4.12-4.el6.2.x86_64.rpm yum install./httpd24-httpd-devel-2.4.12-4.el6.2.x86_64.rpm 설치직후 Apache-2.4.12 환경은아래와같다. 설정파일 DocumentRoot Shibboleth SP 제한접근경로 /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf /opt/rh/httpd24/root/var/www/html/ /opt/rh/httpd24/root/var/www/html/secure/ 로그파일 /var/log/httpd24/ 8
4. 자동시작설정및구동확인 Apache-2.2 가구동중이라면중지한다. service httpd status service httpd stop Apache-2.4.12 를부팅시자동시작하도록설정하고구동한다. chkconfig httpd24-httpd on service httpd24-httpd start 웹브라우저로 http://localhost 를접속해 2.4.12 버전의정상구동을확인한다. 5. Apache SSL 설정 개인키및인증요청서를생성한다. openssl genrsa des3 out server.key 2048 openssl req new -key server.key out server.csr * Common Name 설정시호스트도메인네임으로설정한다. 개인키암호제거및인증서를생성한다. cp server.key server.key.org openssl rsa -in server.key.org -out server.key openssl x509 req -days 365 in server.csr signkey server.key -out server.crt 개인키및인증서를설치한다. cp server.crt /etc/ssl/certs/ mkdir /etc/ssl/private cp server.key /etc/ssl/private/ 아파치설정을아래와같이변경한다. 9
vi /opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf # 설정파일을열고아래내용수정 SSLCertificateFile /etc/ssl/certs/server.crt SSLCertificateKeyFile /etc/ssl/private/server.key 정상구동을확인한다. service httpd24-httpd restart 웹브라우저로 https://localhost 를접속해본다. 첫접속후 Add Exception 을눌러신뢰된사이트로등록한다. 10
3 SRPM 을이용한 Shibboleth SP 설치 * 참조 - SRPM: http://download.opensuse.org/repositories/security://shibboleth/centos_centos-6/src/ - RPM: http://download.opensuse.org/repositories/security://shibboleth/centos_centos-6/x86_64/ - 설치방법 https://venturoustech.wordpress.com/tag/amazon-linux/ https://wiki.shibboleth.net/confluence/display/shib2/nativesplinuxsrpmbuild 1. Shibboelth 레파지토리설정 curl L s 일반적으로 Shibboleth SP의경우 Shibboleth IDP와달리 yum으로간단히설치할수있다. 그러나 CentOS-6.9 및 httpd-2.2 환경에서 yum으로자동설치하게되면 built-in된아파치버전 (httpd- 2.2.15) 에맞추어설치된다. Apache-2.4.12 환경에맞게설치하려면 Shibboleth SP SW 및각종관련패키지를소스코드로부터설치하거나 SRPM(RPM Source) 으로설치하는방법이있다. 여기에서는후자의방법으로설치한다. SRPM은 RPM 파일을생성하기위한소스 RPM으로일반적으로 *.src.rpm 확장자를가진다. SRPM 설치방법은우선 1. 설치환경에맞는 RPM 파일들을생성하는단계와 2. 생성된 RPM들을이용해최종 SW를설치하는두단계로나뉜다. http://download.opensuse.org/repositories/security://shibboleth/centos_centos- 6/security:shibboleth.repo > /etc/yum.repos.d/shibboleth.repo 2. 필요패키지설치 yum install automake boost-devel chrpath doxygen gcc-c++ groff httpd-devel libidndevel openldap-devel openssl-devel redhat-rpm-config stunnel unixodbc-devel 11
3. SRPM 다운로드 log4shib-1.0.9-3.3.src.rpm xerces-c-3.1.4-1.2.src.rpm xml-security-c-1.7.3-3.3.src.rpm curl-openssl-7.56.1-1.1.src.rpm xmltooling-1.6.0-1.2.src.rpm opensaml-2.6.0-1.2.src.rpm shibboleth-2.6.0-2.2.src.rpm wget http://download.opensuse.org/repositories/security://shibboleth/centos_centos- 6/src/log4shib-1.0.9-3.3.src.rpm wget http://download.opensuse.org/repositories/security://shibboleth/centos_centos- 6/src/xerces-c-3.1.4-1.2.src.rpm wget http://download.opensuse.org/repositories/security://shibboleth/centos_centos- 6/src/xml-security-c-1.7.3-3.3.src.rpm wget http://download.opensuse.org/repositories/security://shibboleth/centos_centos- 6/src/curl-openssl-7.56.1-1.1.src.rpm wget http://download.opensuse.org/repositories/security://shibboleth/centos_centos- 6/src/xmltooling-1.6.0-1.2.src.rpm wget http://download.opensuse.org/repositories/security://shibboleth/centos_centos- 6/src/opensaml-2.6.0-1.2.src.rpm wget http://download.opensuse.org/repositories/security://shibboleth/centos_centos- 6/src/shibboleth-2.6.0-2.2.src.rpm 4. SRPM 빌드및 RPM 생성 반드시아래순서로설치한다. 각단계내에서도순서대로설치한다. SRPM(*.src.rpm) 빌드후 12
생성된 RPM 파일은아래경로에존재하므로 rpm 설치는아래경로로이동해서수행한다. * RPM 생성경로 : /root/rpmbuild/rpms/x86_64 rpmbuild 명렁어가설치되지않은경우아래와같이설치 yum install rpm-build 1 ) log4shib 설치 rpmbuild rebuild log4shib-1.0.9-3.3.src.rpm rpm ivh /root/rpmbuild/rpms/x86_64/log4shib-debuginfo-1.0.9-3.3.x86_64.rpm rpm ivh /root/rpmbuild/rpms/x86_64/liblog4shib* 2 ) xerces-c 설치 rpmbuild rebuild xerces-c-3.1.4-1.2.src.rpm rpm ivh /root/rpmbuild/rpms/x86_64/llibxerces-c-* rpm ivh /root/rpmbuild/rpms/x86_64/xerces-c* 3 ) xml-security-c 설치 rpmbuild -rebuild xml-security-c-1.7.3-3.3.src.rpm rpm ivh /root/rpmbuild/rpms/x86_64/libxml-security* rpm ivh /root/rpmbuild/rpms/x86_64/xml-security-c* 4 ) curl-openssl 설치 rpmbuild -rebuild curl-openssl-7.51.0-2.2.src.rpm rpm ivh /root/rpmbuild/rpms/x86_64/libcurl-openssl* rpm ivh /root/rpmbuild/rpms/x86_64/curl-openssl* 13
5 ) xmltooling 설치 rpmbuild -rebuild xmltooling-1.6.0-1.2.src.rpm rpm ivh /root/rpmbuild/rpms/x86_64/libxmltooling* rpm ivh /root/rpmbuild/rpms/x86_64/xmltooling* 6 ) opensaml rpmbuild -rebuild opensaml-2.6.0-1.2.src.rpm rpm ivh /root/rpmbuild/rpms/x86_64/libsaml* rpm ivh /root/rpmbuild/rpms/x86_64/opensaml* 7 ) Shibboleth SP 설치 아파치 2.4.12 에맞게환경을설정하기위해 apxs 스크립트를아래와같이변경한다. vi /opt/rh/httpd24/root/usr/bin/apxs 변경전 my $libdir = `pkg-config variable=libdir apr-1`; /* 35 line */ 변경후 my $libdir = "/opt/rh/httpd24/root/usr/lib64/"; /* 35 line */ Apache-2.4.12 에맞게빌드옵션을추가해 SRPM 을빌드한다. 14
rpmbuild --rebuild --without builtinapache D 'shib_options --with-apxs24=/opt/rh/httpd24/root/usr/bin/apxs CPPFLAGS="-I/opt/rh/httpd24/root/usr/include/httpd" --with-apr1=/opt/rh/httpd24/root/usr/bin/apr-1-config --with-apu=/opt/rh/httpd24/root/usr/bin/apu-1-config --enable-apache-24 --with-openssl=/usr/local/ssl' shibboleth-2.6.0-2.2.src.rpm RPM 설치 rpm -ivh shibboleth* 15
4 Shibboleth SP 설정 Shibboleth SP 설정파일을수정한다. vi /etc/shibboleth/shibboleth2.xml 1. ACL 설정 <!-- Status reporting service. --> <Handler type="status" Location="/Status" acl="127.0.0.1 ::1 IP_ADDR"/> 2. entityid 설정 <ApplicationDefaults entityid="https://sp_address/shibboleth" REMOTE_USER="eppn persistent-id targeted-id" attributeprefix= AJP_ > 3. SAML 메시지암호화 / 서명용 key 생성및설정 아래명령어를사용하여 Shibboleth 에서사용할서명생성 cd /etc/shibboleth openssl req -newkey rsa:4096 -new -x509 -days 365 -nodes text -out shibsp.crt keyout shibsp.key chmod 644 shibsp.keyvi shibb Shibboleth SP 설정파일에서아래부분변경 <CredentialResolver type="file" key="shibsp.key" certificate="shibsp.crt"/> 4. IDP 메타데이터설정 Shibboleth SP 설정파일에서아래와같이 KAFE 메타데이터를설정 16
<MetadataProvider type="xml" validate="true" uri="https://fedinfo.kreonet.net/signedmetadata/federation/kafetestfed/metadata.xml" backingfilepath="kafe-metadata.xml" reloadinterval="7200"> <MetadataFilter type="requirevaliduntil" maxvalidityinterval="2419200"/> <MetadataFilter type="signature" certificate="kafe-fed.crt"/> </MetadataProvider> 아래명령어로 KAFE 메타데이터인증서를다운로드받아저장 cd /etc/shibboleth wget https://fedinfo.kreonet.net/cert/kafe-fed.crt * KAFE 인증서신뢰경로추가웹브라우저를이용해아래사이트에접속후 KAFE 인증서다운로드를위한아래주소를방문해서 URL 버튼을클릭한다. Chrome 웹브라우저의경우인증서추가를위한프로그램이실행되고 "Downloading Certificate" 창에서모두 v 후 OK 버튼을클릭해신뢰경로에추가한다. * 인증서다운로드사이트 : https://coreen.kreonet.net/join Shibboleth SP 설정에 TestIdP 메타데이터추가 <MetadataProvider type="xml" validate="false" uri="https://testidp.kreonet.net/simplesaml/saml2/idp/metadata.php backingfilepath="testidpmetadata.xml" reloadinterval="7200"> </MetadataProvider> 5. SSO/Discovery 설정 17
<SSO entityid="https://testidp.kreonet.net/idp/simplesamlphp" discoveryprotocol="samlds" discoveryurl="https://ds.kreonet.net/kafe"> SAML2 SAML1 </SSO> 6. SSL 설정 <Sessions lifetime="28800" timeout="3600" relaystate="ss:mem" checkaddress="false" handlerssl="true" cookieprops="http"> 7. SP Metadata 설정수정 IdP 에 eppn 등서비스에서필요한정보를요청하기위해아래부분을찾아변경 <Handler type= MetadataGenerator Location= /Metadata signing= false > <md:attributeconsumingservice index="1"> <md:servicename xml:lang="en">liferay Test</md:ServiceName> <md:requestedattribute FriendlyName="displayName" Name="urn:oid:2.16.840.1.113730.3.1.241"/> <md:requestedattribute FriendlyName="mail" Name="urn:oid:0.9.2342.19200300.100.1.3"/> <md:requestedattribute FriendlyName="uid" Name="urn:oid:0.9.2342.19200300.100.1.1"/> <md:requestedattribute FriendlyName="orgName" Name="urn:oid:2.5.4.10"/> <md:requestedattribute FriendlyName="eppn" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.6"/> <md:requestedattribute FriendlyName="persistent-id" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.10"/> 18
<md:requestedattribute FriendlyName="schacHomeOrganization" Name="urn:oid:1.3.6.1.4.1.25178.1.2.9"/> <md:requestedattribute FriendlyName="unscoped-affiliation" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.1"/> </md:attributeconsumingservice></md:spssodescriptor> </Handler> 8. 사용자속성명설정 oid 기반의속성명인식이가능하도록 attribute-map.xml 파일을수정 vi /etc/shibboleth/attribute-map.xml <!-- SCHAC attributes, uncomment to use... --> // 아래라인활성화 <Attribute name="urn:oid:1.3.6.1.4.1.25178.1.2.9" id="schachomeorganization"/>... // 아래모든라인활성화 <Attribute name="urn:oid:2.5.4.3" id="cn"/> <Attribute name="urn:oid:2.5.4.4" id="sn"/> <Attribute name="urn:oid:2.5.4.42" id="givenname"/> <Attribute name="urn:oid:2.16.840.1.113730.3.1.241" id="displayname"/> <Attribute name="urn:oid:0.9.2342.19200300.100.1.1" id="uid"/> <Attribute name="urn:oid:0.9.2342.19200300.100.1.3" id="mail"/>... // 아래라인활성화 <Attribute name="urn:oid:2.5.4.10" id="o"/> 19
9. 사용자속성정책설정 attribute-policy.xml 에속성정책을설정 vi /etc/shibboleth/attribute-policy.xml Shibboleth SP 에서 scope 필터링을하지않을경우코멘트처리해서해당기능비활성화 <!-- Enforce that the values of schachomeorganization are a valid Scope. --> <!-- <afp:attributerule attributeid="schachomeorganization"> <afp:permitvaluerule xsi:type="saml:attributevaluematchesshibmdscope" /> </afp:attributerule> --> 20
5 Shibboleth SP 를위한아파치설정 1. Shibboleth SP 를위한아파치설정변경 Shibboleth SP 를위한아파치설정파일 (shibd.conf) 을복사한다. cp /etc/shibboleth/apache.config /opt/rh/httpd24/root/etc/httpd/conf.d/shibd.conf httpd-2.4 환경에서생성된모듈로모듈명을변경 vi shibd.conf LoadModule mod_shib /usr/lib64/shibboleth/mod_shib_24.so 2. Shibboleth 접근제한설정 <Location /secure> AuthType shibboleth # ShibCompatWith24 On ShibRequestSetting requiresession 1 require shib-session </Location> 3. 아파치설정반영 httpd-2.4 를재시작 service httpd24-httpd restart 21
6 ID 연계확인 1. Shibboleth SP 기본구동확인 shibd t 명령어로점검한다. * 아래와같은에러가발생하면시스템에원래설치된 libcurl 대신 shibboleth 설치시생성된 libcurl 을 (libcurl.so.4.4.0) 참조할 수있도록수정해야한다. 2017-10-13 06:09:51 CRIT XMLTooling.Config : libcurl lacks OpenSSL-specific options, this will greatly limit functionality 2017-10-13 06:09:51 ERROR XMLTooling.libcurl.InputStream : error while fetching https://fedinfo.kreonet.net/signedmetadata/federation/kafe-testfed/metadata.xml: (59) Unknown cipher in list: ALL:!aNULL:!LOW:!EXPORT:!SSLv2 2017-10-13 06:09:51 ERROR XMLTooling.libcurl.InputStream : on Red Hat 6+, make sure libcurl used is built with OpenSSL 이경우아래명령어를수정 cd /usr/lib64 rm libcurl.so.4 ln -s /opt/shibboleth/lib64/libcurl.so.4.4.0 libcurl.so.4 2. shibboleth SP 를구동확인 아래명령어로 shibboleth SP 를구동하고상태를확인한다. service shibd start service shibd status 정상적으로구동된다면아래사이트에서로그파일및 SP 메타데이터를확인할수있다. * Shibboleth SP 로그파일 : /var/log/shibboleth/shibd.log * Shibboleth SP 메타데이터 URL: https://localhost/shibboleth.sso/metadata 22
이후단계는연동할 Identity Provider 에서 SP 메타데이터등록및관련설정을완료한뒤수행 한다. 3. 확인 service httpd24-httpd restart service shibd restart 웹브라우저로 Shibboleth 로접근을제한한경로로접근한다. * 접근경로 : http://localhost/secure/ 웹브라우저로 Shibboleth Session 정보를확인한다. * Session 확인 URL : https://localhost/shibboleth.sso/session 23
7 AJP 를이용한 Liferay 연동설정 로컬에설치된 Shibboleth SP 가 AJP 를통해원격에설치된 Tomcat 및 Tomcat 응용 (Liferay) 에연동하기위한설정에대해기술한다. 1. AJP 모듈구동확인 shibboeth SP 아파치모듈로드확인 cd /opt/rh/http24/root/usr/sbin./apachectl M grep mod_shib AJP 아파치모듈로드확인./apachectl M grep proxy_ajp_module 2. 아파치설정 shibboleth SP 를위한아파치설정파일에 AJP 를설정 vi /opt/rh/httpd24/root/etc/httpd/conf.d/shibd.conf Shibboleth.sso ProxyPass 예외처리 <Location /Shibboleth.sso> Satisfy Any Allow from all ProxyPass! </Location> AJP 패킷사이즈설정 ProxyIOBufferSize 65536 AJP 연동응용 Proxy 설정 24
ProxyPass / ajp://liferay_ip_address:8009/ ProxyPassReverse / ajp://liferay_ip_address:8009/ shibboleth 제한설정 <Location /> AuthType shibboleth require shibboleth </Location> <Location /c/portal/login/shibboleth> AuthType shibboleth ShibRequestSetting requiresession 1 require shib-session </Location> * /c/portal/login/shibboleth 경로의경우 Shibboleth 를사용하여로그인을하기위한경로로사용. /c/portal/login 경로로설정할경우 Liferay 의로컬로그인경로를무시하게될수있음 3. 구동및테스트 service shibd restart service httpd24-httpd restart 웹브라우저로 https://ip_address/ 를접속해서원격의 liferay 응용으로연동이되면 shibboleth 로그인버튼을클릭하고 SAML 연동을확인한다. 25
8 Liferay Shibboleth Plugin 설치 첨부된 shibboleth.war 파일을 Liferay 관리자페이지에서업로드한다. * Control Panel Apps App Manager - Install Shibboleth 플러그인의설정에서플러그인을활성화 * Control Panel Configuration Authentication Shibboleth 설정명 설정내용 Shibboleth 에서설정된로그인 URL, 서비스의로그인페이 Login URL 지가커스터마이징된경우 Shibboleth 로그인을구현하기 위해서는경로를직접추가해야함 Shibboleth 로그아웃 URL, 로컬로그아웃의경우에도 Logout URL Shibboleth 를먼저로그아웃시켜야하기때문에기본값으 로 /Shibboleth.sso/Logout?return=/ 으로설정 Error URL Shibboleth 에서에러가발생할경우이동할에러페이지경 로 26
Shibboleth user eppn header IdP 로부터넘겨받은 eppn 의속성명, ID 생성, 기관명확인 을위해사용되는정보 User ID Prefix 자동으로생성할 User ID 의앞에입력될키워드 Shibboleth user email header IdP 로부터넘겨받은사용자메일주소 Shibboleth user firstname header IdP 로부터넘겨받은사용자이름, displayname 이서비스에 서표시되는사용자이름 기관명을입력하기위해생성한 Liferay User Custom Field Custom Fields Affiliation Attribute 이름, 하단의테이블에서도메인에따른기관명을설정, 도 메인을 * 로설정하는경우도메인에해당하는기관이없는 상태일때지정할기관명을설정할수있음 Logout enable Shibboleth 로그아웃기능활성화 Auto-create users 사용자가기존에존재하지않을경우자동생성 Auto-update users Shibboleth 를사용하여로그인할때마다사용자의정보를 최신상태로업데이트 27
9 Liferay 연합인증연동확인 Apache 가설치된 IP1 주소로접속하면 AJP 를통해 Tomcat 에설치된 LifeLay 로자동리다이렉션 된다. KAFE 버튼을클릭해서연합인증을이용한로그인을시도한다. 그러면아래와같이사용자인증기능을수행하는인증게이트웨이로자동접속된다. 28
아래와같이사용자가사용자정보제공에동의하면인증게이트웨이에저장된사용자속성 정보가 LifeLay 로전달된다. 이어 LifeLay 에서이용약관동의및암호설정창이나타나는데동의를클릭하고암호를설정하면 LifeLay 환경에사용자정보가등록된다. 29
이후 KAFE 로로그인하면아래와같이성공적으로로그인화면이표시된다. 30