提供了接入SAML 2.0单点登录的功能,支持管理员在【办公平台】模块配置SAML 2.0
常见应用场景
系统配置-办公平台页面,进行“SAML 2.0”的接入
勾选NameID则使用NameID做关联。
若未勾选NameID,输入用户信息结构体中用于映射的字段名。
基本信息:编辑框,必填,包括但不限于以下配置(json格式)
https://github.com/SAML-Toolkits/python3-saml?tab=readme-ov-file#settings
strict : If strict is True, then the Python Toolkit will reject unsigned or unencrypted messages if it expects them to be signed or encrypted. Also it will reject the messages if the SAML standard is not strictly followed. Destination, NameId, Conditions ... are validated too.
debug : Enable debug mode (outputs errors).
sp: SP Metadata 参见:Metadata for the OASIS Security Assertion Markup Language (SAML) V2.0
Idp: IdP Metadata 参见:Metadata for the OASIS Security Assertion Markup Language (SAML) V2.0
举例:
{ "strict": false, "debug": true, "sp": { "entityId": "xxx", "assertionConsumerService": { "url": "https://xxx.com/minibase/portal/api/v1/user/sso/saml2/callback", "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" }, "x509cert": "xxx", "privateKey": "xxx" }, "idp": { "entityId": "xxx", "singleSignOnService": { "url": "https://xxx.com/idp/sso/post", "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" }, "singleLogoutService": { "url": "https://xxx.com/idp/sso/redirect", "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" }, "x509cert": "xxx" }, "security": { "authnRequestsSigned": true, "logoutRequestSigned": true, "logoutResponseSigned": true, "signMetadata": true } }
用户信息字段映射
姓名:用户信息结构体姓名对应字段名,非必填。
邮箱:用户信息结构体邮箱对应字段名,非必填。
手机号:用户信息结构体手机号对应字段名,非必填。