通过Shibboleth接入校建资源
提交申请:
请参照内容模板 准备服务介绍,邮件发送给carsi@pku.edu.cn。由CARSI专家组评估该服务是否适合接入,请等待审核。
技术调试前需做的准备:
1.请根据 校建资源加入CARSI步骤 确定资源接入方式,OAuth2或者Shibboleth。
2.请仔细阅读 CARSI基本调试要求(CARSI Basic Debugging Requirements)。
收到审核通过通知后:
收到审核通过的通知后,SP可以开始技术调试。技术调试前,全资格会员管理员可以在会员单位自服务系统(https://mgmt.carsi.edu.cn )为待接入资源的技术人员创建子账号。后续技术调试和参数配置可在子账号下进行。子账号创建方法:登录CARSI会员自服务系统,在“我的CARSI,子账号管理”页面,点击创建子账号,添加待接入资源技术人员为管理员,为其指定所需的系统权限。可指定子账号管理员只可操作和配置本SP相关内容,不可见学校管理其他功能页面。学校管理员有权限看到本校所有SP信息。
技术调试:
1. 在学校端CARSI管理员页面添加SP
登录 CARSI会员自服务系统。
在“我的CARSI->SP管理”中,选择“添加SP”,按照提示完成添加 SP并上传metadata文件。
添加完SP后,该SP即合并到CARSI联盟的预上线环境metadata中:https://www.carsi.edu.cn/carsimetadata/carsifed-metadata-pre.xml。
请将此metadata加入到SP本地的MetadataProvider中,可参考以下步骤进行配置:
a. 将SSO配置为CARSI的SAMLDS服务:
<SSO discoveryProtocol="SAMLDS" discoveryURL="https://dspre.carsi.edu.cn/ds/index.html">
SAML2
</SSO> |
b. 添加CARSI的metadata到MetadataProvider中:
<MetadataProvider type="XML" url="https://www.carsi.edu.cn/carsimetadata/carsifed-metadata-pre.xml"
backingFilePath="/etc/shibboleth/carsifed-metadata-pre.xml" legacyOrgNames="true" reloadInterval="600" >
</MetadataProvider> |
这是一个新安装SP的环境配置,仅供参考:
#通过yum源的方式安装(install through yum)
[root@www ~]# wget http://download.opensuse.org/repositories/security://shibboleth/CentOS_7/security:shibboleth.repo -P /etc/yum.repos.d
[root@www ~]# yum install shibboleth
[root@www ~]# systemctl start shibd
[root@www ~]# systemctl enable shibd
[root@www ~]# systemctl restart httpd
#配置SP受保护资源目录(config producted dir)
[root@www ~]# vi /etc/httpd/conf.d/shib.conf
#line 49
<Location /secure> /secure 指的是受保护资源的目录,按照需要自行修改 protected dir, change it based on your demand
#配置SP entityID(config SP Entity ID)
[root@www ~]# vi /etc/shibboleth/shibboleth2.xml
#将(replace):
ApplicationDefaults entityID="https://sp.example.org/shibboleth"
#改为(with):
ApplicationDefaults entityID="https://[sp域名]/shibboleth"
#将(replace)
<SSO entityID="https://idp.example.org/idp/shibboleth" discoveryProtocol="SAMLDS" discoveryURL="https://ds.example.org/DS/WAYF">
SAML2
</SSO>
#改为(with)
<SSO discoveryProtocol="SAMLDS" discoveryURL="https://dspre.carsi.edu.cn/ds/index.html">
SAML2
</SSO>
#在<ApplicationDefaults>代码块内增加(/etc/shibboleth/carsifed-metadata-pre.xml为待生成的metadata备份文件) Add in <ApplicationDefaults> block(/etc/shibboleth/carsifed-metadata-pre.xml is the backup metadata file to be generated)
<MetadataProvider type="XML" url="https://www.carsi.edu.cn/carsimetadata/carsifed-metadata-pre.xml"
backingFilePath="/etc/shibboleth/carsifed-metadata-pre.xml" legacyOrgNames="true" reloadInterval="600" >
</MetadataProvider>
[root@www ~]# systemctl start shibd
[root@www ~]# systemctl enable shibd
[root@www ~]# systemctl restart httpd |
2.在预上线环境进行认证测试
访问待测试SP应用的CARSI登录链接,参考文档IdP4:访问CARSI资源门户 (通过浏览器)的步骤,使用联盟提供的测试IdP及其账号(发送邮件到carsi@pku.edu.cn获取),在预上线环境测试SP服务。可根据SP访问控制的需要,检查IdP用户属性是否正常。
3.SP服务页面标明是CARSI会员
CARSI联盟建议会员单位在SP服务主页面或用户登录页面,以醒目方式(如放置logo)标明我单位为CARSI 身份联盟会员或提供独立的CARSI登录入口。参见 使用CARSI logo。
4.CARSI产品环境试运行
请参照模板(用户访问指南&IdP添加指南模板(User Visit Guide & IdP Appending Guide templates))准备两份文档。
准备好以后,请发送邮件给 carsi@pku.edu.cn,申请在CARSI产品环境上线试运行,并将上述2份文档作为附件提供。我们会根据您提供的文档验证登录流程,确认无误后执行上线试运行操作。请注意如CARSI登录仅在您的测试环境可以试用的话,请一并告知我们您的测试网址。
5.切换到生产环境,试运行测试
收到上线成功邮件,意味着该SP metadata已合并到CARSI联盟的线上环境metadata中:https://www.carsi.edu.cn/carsimetadata/carsifed-metadata.xml。您需将SP的MetadataProvider从同步预上线环境metadata文件 https://www.carsi.edu.cn/carsimetadata/carsifed-metadata-pre.xml 修改为同步该文件, 将所有引用预上线环境的DS(https://dspre.carsi.edu.cn/ds/index.html)的地方改为引用线上环境DS (https://ds.carsi.edu.cn/ds/index.html)。
6.SP试运行期间需完成:
SP试运行期间,请按照CARSI SP申请和接入流程 (CARSI SP joining process)中的第九步进行对接。
备注:
CARSI联盟IdP可支持属性参见https://www.carsi.edu.cn/docs/attribute_profile_zh.pdf。其中eduPersonScopedAffiliation属性取值,相较于默认安装SP增加了一个other@scope取值,SP可使用该取值支持与IdP的特殊约定,根据需要调整/etc/shibboleth/attribute-policy.xml配置文件,接受该取值,比如:
<afp:PermitValueRule id="eduPersonAffiliationValues" xsi:type="OR">
<Rule xsi:type="AttributeValueString" value="faculty"/>
<Rule xsi:type="AttributeValueString" value="student"/>
<Rule xsi:type="AttributeValueString" value="staff"/>
<Rule xsi:type="AttributeValueString" value="alum"/>
<Rule xsi:type="AttributeValueString" value="member"/>
<Rule xsi:type="AttributeValueString" value="affiliate"/>
<Rule xsi:type="AttributeValueString" value="employee"/>
<Rule xsi:type="AttributeValueString" value="other"/>
</afp:PermitValueRule> |
Related content
版权所有©北京大学计算中心