gpt4 book ai didi

binding - SAML 请求 - 声明多个协议(protocol)绑定(bind)

转载 作者:行者123 更新时间:2023-12-02 09:36:10 26 4
gpt4 key购买 nike

我已经实现了一个 SAML 服务提供程序来支持 ASP.Net Web 门户的单点登录,该门户是在客户端站点上配置的收缩包装软件,并且必须能够与任何符合 SAML 的身份提供程序进行交互。

我的断言消费者服务 (ACS) 页面将通过 GET 和 POST 方法接受 SAML 响应。

据我了解 SAML 协议(protocol),SAML 请求 ProtocolBinding 属性指定响应支持哪些协议(protocol)。目前,我的请求指定了 HTTP 重定向绑定(bind)。不过,我想声明我支持 HTTP-Redirect (GET) 和 HTTP-POST (POST)。在搜索了比我想重申的更多的 SAML 文档后,我无法找到用于声明多个支持的协议(protocol)绑定(bind)的语法(或者它是否有效)。

虽然我可以使此声明可配置,但我的首选是声明这两个绑定(bind),以便身份提供程序无需额外配置我的门户即可工作。

下面是我的身份验证请求的示例。请,如果有人知道为 ProtocolBinding 声明 HTTP-Redirect 和 HTTP-POST 的方法,我将非常感谢您的输入!

<?xml version="1.0" encoding="utf-8"?>
<samlp:AuthnRequest
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
ID="[AUTHN_ID]"
Version="2.0"
IssueInstant="[ISSUE_INSTANT]"
ProtocolBinding="urn:oasis:names.tc:SAML:2.0:bindings:HTTP-Redirect"
ProviderName="[PROVIDER_NAME]"
AssertionConsumerServiceURL="[ACS_URL]">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
PortalEntityID
</saml:Issuer>
<samlp:NameIDPolicy
AllowCreate="true"
Format="urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" />
</samlp:AuthnRequest>

预先感谢任何可以提供帮助的人!

最佳答案

AuthnRequest 上的 ProtocolBinding 属性用于指定 IdP 在发送 SAML 响应 XML 时使用的预期绑定(bind)。 HTTP-Redirect 不是此处使用的有效选项,因为 URL 查询字符串可能存在长度限制; SAML 响应(尤其是已签名的响应)可能会相当长。我将引用 SAML 规范 [SAMLProf]:

...the identity provider issues a <Response> message to be delivered by the user agent to the service provider. Either the HTTP POST or HTTP Artifact binding can be used to transfer the message to the service provider through the user agent. The message may indicate an error or will include (at least) an authentication assertion. The HTTP Redirect binding MUST NOT be used, as the response will typically exceed the URL length permitted by most user agents.

关于binding - SAML 请求 - 声明多个协议(protocol)绑定(bind),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1863450/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com