WSO2云出现500内部错误

时间:2017-04-29 08:47:42

标签: wso2 saml-2.0

我一直在尝试将SAML与WSO2云集成。 我和其他供应商有过一些成功的经验,比如onelogin,okta,ping one。

但是我用wso2得到了一个模糊的500错误。 我尝试的每个请求都会出现500错误。

我不需要太多 - 只是一个适用于WSO2的SAMLRequest格式。 例如,现在我正在通过:

<?xml version="1.0" encoding="UTF-8"?>
<saml2p:AuthnRequest ID="z9dac5520-d4a4-4da9-b71a-483948c1655c" IssueInstant="2017-04-29T08:40:39.677Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0" xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion"/>
<saml2p:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"/>
</saml2p:AuthnRequest>

我defalate,base 64编码和url编码。

我尝试了不同的变化,但没有任何作用

谢谢

2 个答案:

答案 0 :(得分:1)

请求没有Issuer元素的值。为什么任何IDP都会接受来自未识别SP的请求?您需要使用一个标识SP的值,以及之前使用IDP在带外注册的值。

答案 1 :(得分:1)

你能解释一下你在这里要做的事吗?是否通过wso2云为您的某个应用程序启用基于SAML的身份验证?如果是这种情况,您需要登录到Identity Cloud [1]并按照[2]中的描述配置服务提供商。然后,只有您可以将SAML请求发送到Identity Cloud进行身份验证。

[1] https://identity.cloud.wso2.com
[2] https://docs.wso2.com/display/IdentityCloud/Configuring+SSO+for+Custom+Applications

将服务提供商配置为接受先前链接中所述的SAML请求后,您可以将标准SAML请求发送到Identity Cloud。下面给出样本SAML请求。请注意,应该将AssertionConsumerServiceURL,Destination,Issuer属性更改为relavant。每个租户都会获得一个单独的SSO服务网址,其格式为“https://identity.cloud.wso2.com/identity/t/ {TenantDomain}”。这将是SAML请求中“目标”的值。

<samlp:AuthnRequest AssertionConsumerServiceURL="http://apps.com/travelocity/home.jsp"
                Destination="https://identity.cloud.wso2.com/identity/t/demo1org"
                ForceAuthn="false"
                ID="a9b1b4992f048bb1004677207cc97097a73e47cdaf4ba21360ef8cf38dc76702"
                IsPassive="false"
                IssueInstant="2017-05-02T12:59:45.409Z"
                ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
                Version="2.0"
                xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
                >
    <samlp:Issuer xmlns:samlp="urn:oasis:names:tc:SAML:2.0:assertion">wso2App1-wso2org-1.0</samlp:Issuer>
    <saml2p:NameIDPolicy AllowCreate="true"
                         Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent"
                         SPNameQualifier="Issuer"
                         xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"
                         />
    <saml2p:RequestedAuthnContext Comparison="exact"
                                  xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol"
                                  >
            <saml:AuthnContextClassRef xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
    </saml2p:RequestedAuthnContext>