안녕하세요,
드디어 Discourse 사이트에 Shibboleth 연동을 완료했습니다. 방법은 간단했습니다… 알아내면요
.
-
웹 서버 하나에서 Shibboleth가 작동하도록 설정하세요 (Discourse 서버와 같을 필요는 없습니다). 이를
shib.univ.edu라고 부르겠습니다. -
Discourse SSO를 수행하기 위해
shib.univ.edu에서 디렉토리를 하나 준비하세요. 이를discourse-sso라고 부르겠습니다. -
Shibboleth를 사용하여 이 디렉토리를 보호하세요. Apache를 사용하는 경우, 보통
discourse-sso/.htaccess에 다음과 같은 내용을 추가하면 됩니다:# Shibboleth header AuthType Shibboleth ShibRequireSession On ShibApplicationId default ShibExportAssertion On require shib-user ~ ^.+@univ\.edu$ -
공식 Discourse SSO 가이드에 설명된 서명 작업을 수행하는 라이브러리를 하나 준비하세요. 저는 cviebrock/discourse-php를 사용합니다. 사용 설명서에서 복사한
sso.php를 여기에 생성하세요. -
username과email은 환경 변수eppn에 포함됩니다. 따라서 cviebrock/discourse-php(위 링크)에 설명된 사용 설명서를 따랐다면, 다음과 같이 설정하면 됩니다.// Insert your user authentication code here ... // Required and must be consistent with your application $userEmail = getenv( 'eppn' ); // Required and must be unique to your application $userId = strstr( $userEmail, '@', true ); -
공식 Discourse SSO 가이드에서 SSO를 활성화하세요.
sso url을https://shib.univ.edu/discourse-sso/sso.php를 가리키도록 설정하면 됩니다.
GI