SAML 规范:在没有用户的情况下返回 SP
SAML spec: returning to the SP without a user
我正在使用标准 SAML 2.0 SP-initiated SSO 协议进行身份验证。
通常情况下,IdP return 会向我的 SP 发送一个 samlp:Response
XML 对象,其中包含关于已验证用户的 saml:Assertion
。
SAML 规范是否允许 IdP return 对不包含用户信息的 SP 的响应?
我想处理无法完成身份验证的情况,但我们想 return 到 SP 的站点。也许 IdP 可以 return 向我们的 SP 发送某种错误或消息?现在看来,如果无法进行身份验证,用户就会被困在 IdP 的站点上。
我想他们可以直接重定向到商定的 URL,尽管那样您会丢失 RelayState 信息。那是正确的方法吗,或者 SAML 规范是否处理这种情况?
SAML2 规范处理了这个问题。 Idp 可以 return 一个 samlp:response
状态代码 Responder
意味着 idp 未能完成请求。然后可以有更详细的状态信息来说明具体原因。
但是可以在协议中处理 Idp 无法验证用户的情况。但是,我认为大多数 Idps 的行为都像您描述的那样 - 如果出现问题,请让用户继续使用 Idp。
由 OP 添加 — 这是来自 SAML spec:
<StatusCode>
[Optional]
A subordinate status code that provides more specific information on an error condition. Note that responders MAY omit subordinate status codes in order to prevent attacks that seek to probe for additional information by intentionally presenting erroneous requests.
The permissible top-level values are as follows:
urn:oasis:names:tc:SAML:2.0:status:Success
The request succeeded. Additional information MAY be returned in the and/or elements.
urn:oasis:names:tc:SAML:2.0:status:Requester
The request could not be performed due to an error on the part of the requester.
urn:oasis:names:tc:SAML:2.0:status:Responder
The request could not be performed due to an error on the part of the SAML responder or SAML authority.
urn:oasis:names:tc:SAML:2.0:status:VersionMismatch
The SAML responder could not process the request because the version of the request message was incorrect.
我正在使用标准 SAML 2.0 SP-initiated SSO 协议进行身份验证。
通常情况下,IdP return 会向我的 SP 发送一个 samlp:Response
XML 对象,其中包含关于已验证用户的 saml:Assertion
。
SAML 规范是否允许 IdP return 对不包含用户信息的 SP 的响应?
我想处理无法完成身份验证的情况,但我们想 return 到 SP 的站点。也许 IdP 可以 return 向我们的 SP 发送某种错误或消息?现在看来,如果无法进行身份验证,用户就会被困在 IdP 的站点上。
我想他们可以直接重定向到商定的 URL,尽管那样您会丢失 RelayState 信息。那是正确的方法吗,或者 SAML 规范是否处理这种情况?
SAML2 规范处理了这个问题。 Idp 可以 return 一个 samlp:response
状态代码 Responder
意味着 idp 未能完成请求。然后可以有更详细的状态信息来说明具体原因。
但是可以在协议中处理 Idp 无法验证用户的情况。但是,我认为大多数 Idps 的行为都像您描述的那样 - 如果出现问题,请让用户继续使用 Idp。
由 OP 添加 — 这是来自 SAML spec:
<StatusCode>
[Optional]A subordinate status code that provides more specific information on an error condition. Note that responders MAY omit subordinate status codes in order to prevent attacks that seek to probe for additional information by intentionally presenting erroneous requests.
The permissible top-level values are as follows:
urn:oasis:names:tc:SAML:2.0:status:Success
The request succeeded. Additional information MAY be returned in the and/or elements.
urn:oasis:names:tc:SAML:2.0:status:Requester
The request could not be performed due to an error on the part of the requester.
urn:oasis:names:tc:SAML:2.0:status:Responder
The request could not be performed due to an error on the part of the SAML responder or SAML authority.
urn:oasis:names:tc:SAML:2.0:status:VersionMismatch
The SAML responder could not process the request because the version of the request message was incorrect.