【问题标题】:WSO2 APIM Identity responds back username or domain/username in the NameID of a SAML SSO responseWSO2 APIM 身份在 SAML SSO 响应的 NameID 中回复用户名或域/用户名
【发布时间】:2019-04-23 12:31:16
【问题描述】:

针对 SAML2 响应的声明正在发生变化。我们使用本地声明方言从配置了 WSO2 APIM 嵌入式 IS 的 LDAP 添加声明。在 WSO2 APIM 2.5.0 和 2.6.0 的两个版本上,它都是间歇性的,有时我们会在 <saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">C99939393</saml2:NameID> 中获得我们想要的声明字段但有时它会更改为 {username} 或 {domain}/{username} 。每当我们降落到这种差异时,我们都会在 wso2carbon.log 中收到警告。 "找不到主题声明。默认为名称标识符"

任何人都可以检查它是一个已知问题还是有任何解决方法可以从 xmls 设置它?

以下是 SAML2 数据的示例。

预期的 SAML 响应:

<saml2:Subject><saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">P99939393</saml2:NameID><saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml2:SubjectConfirmationData NotOnOrAfter="2019-04-15T14:05:34.277Z" Recipient="https://xxxx.com/xx/bc/bsp/sap/xxx?sap-client=123&amp;RedirectURL=https://xxx.xx.com/sample"/></saml2:SubjectConfirmation></saml2:Subject>

实际 SAML 响应 1:

<saml2:Subject><saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">john.joe</saml2:NameID><saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml2:SubjectConfirmationData NotOnOrAfter="2019-04-15T14:05:34.277Z" Recipient="https://xxxx.com/xx/bc/bsp/sap/xxx?sap-client=123&amp;RedirectURL=https://xxx.xx.com/sample"/></saml2:SubjectConfirmation></saml2:Subject>

实际 SAML 响应 2:

<saml2:Subject><saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified">IN/john.joe</saml2:NameID><saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"><saml2:SubjectConfirmationData NotOnOrAfter="2019-04-15T14:05:34.277Z" Recipient="https://xxxx.com/xx/bc/bsp/sap/xxx?sap-client=123&amp;RedirectURL=https://xxx.xx.com/sample"/></saml2:SubjectConfirmation></saml2:Subject>

请注意,这个问题是间歇性的,有时我们会根据我们的服务提供商中设置的声明获取正确的 NameID,并表示声明配置在这方面是正确的

【问题讨论】:

    标签: authentication wso2 saml-2.0 wso2is wso2-am


    【解决方案1】:

    在服务提供者声明配置中配置为主题声明 URI 的内容是什么?有时,从 LDAP 为用户检索的声明集中似乎不存在特定声明。你能在下面检查一下。 - 如果用户为此声明增加了价值? (对我来说,这看起来像是一个自定义声明。) - 当你说它是断断续续的,是针对同一个用户还是不同的用户?

    谢谢,

    【讨论】:

    • 感谢您响应 Pushpa,我们配置为主题声明 URI 的内容是 wso2.org/claims/empID,其中 empID 是我的 LDAP 中的一个字段。在哪里检查声明集,用户为此声明增加了价值?令人惊讶的是,一旦用户尝试通过 (john.joe) 之类的用户名登录,就会报告该问题。每当他通过 IN/john.joe 登录时,就不会出现间歇性问题。
    猜你喜欢
    • 2015-06-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-30
    • 2019-07-10
    • 1970-01-01
    相关资源
    最近更新 更多