【问题标题】:500 internal error with WSO2 cloudWSO2 云出现 500 内部错误
【发布时间】:2017-04-29 08:47:41
【问题描述】:

我一直在尝试将 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>

我放气,base 64 编码和 url 编码。

我尝试了不同的变化,但没有任何效果

谢谢

【问题讨论】:

  • A HTTP500 指向服务器端的错误。请联系服务器管理员。
  • 我已经做到了。没有得到回应。我希望有幸向 wso2 发送 samrequest 的人可以分享一个对他们有用的示例。

标签: wso2 saml-2.0


【解决方案1】:

该请求没有 Issuer 元素的值。为什么任何 IDP 都会接受来自身份不明的 SP 的请求?您需要使用一个值来标识 SP 并且之前在 IDP 中带外注册。

【讨论】:

  • 添加了发行人。仍然得到 500。找不到任何关于错误的线索。有任何想法吗? Thx example 授权请求>
【解决方案2】:

你能解释一下你在这里想要做什么吗?这是否通过 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 属性应更改为与您相关的。每个租户都有一个单独的 SSO 服务 URL,其格式为“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>

【讨论】:

  • 感谢您的回复。我确实创建了一个帐户,以及一个带有 assertionUrl 和预期发行者的应用程序,并下载了我使用 openSAML 解析的元数据并创建了一个 samlRequest。我以您的示例 SamlRequest 为例,并将 issuer 和 consumerUrl 更改为相关。将时间更新到当前,当我使用 SAMLRequest(包含 AuthnRequest 压缩、64 基编码和 url 编码)构造一个 HTTP 请求到我的 wso2 重定向时,我仍然得到 500。最大的问题是我得到了 500。并且找不到日志或任何导致如何进行故障排除的线索。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-05-05
  • 1970-01-01
  • 2013-03-09
  • 2017-11-06
  • 2020-07-25
  • 2013-09-04
  • 2017-11-25
相关资源
最近更新 更多