IdP端SLO功能配置

注:仅SAML2.0支持SLO功能,SAML1.0不支持。北京大学提供的IdP3.4.3、IdP3.4.7、IdP.4.1.4安装包或者安装脚本均为SAML2.0。      

 

        为了支持CARSI联盟资源目录或者其他SP发起的单点登出功能,IdP端需完成以下配置:

1.修改 /opt/shibboleth-idp/conf/idp.properties 文件

idp.session.trackSPSessions = true
idp.storage.htmlLocalStorage = true
idp.session.secondaryServiceIndex = true

2. 取消 metadata 文件/opt/shibboleth-idp/metadata/idp-metadata.xml中 SingleLogoutService 以下3行的注释。

   <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://idp.xxx.edu.cn/idp/profile/SAML2/Redirect/SLO"/>
   <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://idp.xxx.edu.cn/idp/profile/SAML2/POST/SLO"/>
   <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" Location="https://idp.xxx.edu.cn/idp/profile/SAML2/POST-SimpleSign/SLO"/>

3. 重启 tomcat(idp3.4.7) 或 jetty(idp4.1.4) 

4. 登录https://mgmt.carsi.edu.cn重新提交metadata文件。

重新提交metadata文件只可在"预上线环境"完成。已上线IdP需向carsi@pku.edu.cn发送邮件,申请回退到"调试中"状态,重新提交metadata,重新申请上线。IdP重新上线后此配置修改方可生效。

注意:IdP重新上线后,需要等待下个整点使其在整个CARSI联盟中生效。

5. 修改本idp服务器nginx配置

在Nginx的配置文件nginx.conf(/etc/nginx/nginx.conf)监听443端口的server中location /idp 添加如下配置,具体值可根据自身idp情况进行配置:

注意:如IdP服务器之前配置了负载均衡机制,需同步修改相应配置。

proxy_buffers 32 10k;
proxy_buffer_size 10k;
proxy_busy_buffers_size 20k;

6. 重启Nginx

7. 验证配置

参见https://carsi.atlassian.net/wiki/spaces/CAW/pages/115867649 中的“SLO效果展示”,验证IdP配置。

版权所有©北京大学计算中心