为什么 WSO2 IS SAML2SSOAuthenticationService 返回 false? (SAML2 单点登录)
Why WSO2 IS SAML2SSOAuthenticationService is returning false? (SAML2 SSO)
场景:我在 WSO2 AS 5.2.1 上部署了一个 Jaggery 应用程序并且我有 WSO2 IS 5.0.0(服务包已激活)运行 两个服务具有 SSO 配置的提供商,一个指向 AS,另一个指向我的 Jaggery 应用程序。
我的 acs.jag 是 IS 的仪表板应用程序 运行 的副本,配置也类似:
"saml_config" : {
"SAML.IdPUrl" : "samlsso",
"SAML.IssuerID" : "my.jag.app",
"SAML.LogoutUrl" : "logout",
"SAML.EnableResponseSigning" : "true",
"SAML.EnableAssertionSigning" : "true",
"SAML.EnableRequestSigning" : "true",
"SAML.SSOAgentCredentialImplClass" : "org.wso2.carbon.identity.sso.agent.saml.SSOAgentKeyStoreCredential",
"SAML.KeyStorePassword" : "wso2carbon",
"SAML.IdPCertAlias" : "wso2carbon",
"SAML.PrivateKeyAlias": "wso2carbon",
"SAML.PrivateKeyPassword" : "wso2carbon",
"SAML.KeyStore" : "{carbon.home}/repository/resources/security/wso2carbon.jks"
}
问题:在 IDP 响应后,有效负载被提交给 SAML2SSOAuthenticationService,它总是 return false。
<ns:loginResponse xmlns:ns="http://sso.saml2.authenticator.identity.carbon.wso2.org">
<ns:return>false</ns:return>
</ns:loginResponse>
我是不是做错了什么?
[编辑]
感谢@Asela,我在 IS 日志中注意到了这一点:
问题:
ERROR {org.wso2.carbon.identity.authenticator.saml2.sso.SAML2SSOAuthenticator}
Authentication Request is rejected. SAMLResponse AudienceRestriction validation failed.
在 SAML2SSOAuthenticator class 中,错误是由断言对象设置为空,但断言对象在 jaggery 调用 SAML2SSOAuthenticationService 之前不为空。
我找到了缺少的东西。
将 Jaggery App Service Provider 中的 Claim 更改为 /role && /emailaddress,现在一切正常。
场景:我在 WSO2 AS 5.2.1 上部署了一个 Jaggery 应用程序并且我有 WSO2 IS 5.0.0(服务包已激活)运行 两个服务具有 SSO 配置的提供商,一个指向 AS,另一个指向我的 Jaggery 应用程序。
我的 acs.jag 是 IS 的仪表板应用程序 运行 的副本,配置也类似:
"saml_config" : {
"SAML.IdPUrl" : "samlsso",
"SAML.IssuerID" : "my.jag.app",
"SAML.LogoutUrl" : "logout",
"SAML.EnableResponseSigning" : "true",
"SAML.EnableAssertionSigning" : "true",
"SAML.EnableRequestSigning" : "true",
"SAML.SSOAgentCredentialImplClass" : "org.wso2.carbon.identity.sso.agent.saml.SSOAgentKeyStoreCredential",
"SAML.KeyStorePassword" : "wso2carbon",
"SAML.IdPCertAlias" : "wso2carbon",
"SAML.PrivateKeyAlias": "wso2carbon",
"SAML.PrivateKeyPassword" : "wso2carbon",
"SAML.KeyStore" : "{carbon.home}/repository/resources/security/wso2carbon.jks"
}
问题:在 IDP 响应后,有效负载被提交给 SAML2SSOAuthenticationService,它总是 return false。
<ns:loginResponse xmlns:ns="http://sso.saml2.authenticator.identity.carbon.wso2.org">
<ns:return>false</ns:return>
</ns:loginResponse>
我是不是做错了什么?
[编辑] 感谢@Asela,我在 IS 日志中注意到了这一点: 问题:
ERROR {org.wso2.carbon.identity.authenticator.saml2.sso.SAML2SSOAuthenticator}
Authentication Request is rejected. SAMLResponse AudienceRestriction validation failed.
在 SAML2SSOAuthenticator class 中,错误是由断言对象设置为空,但断言对象在 jaggery 调用 SAML2SSOAuthenticationService 之前不为空。
我找到了缺少的东西。 将 Jaggery App Service Provider 中的 Claim 更改为 /role && /emailaddress,现在一切正常。