SAML 身份验证请求中是否允许使用属性?

发布于 2024-07-13 13:40:29 字数 588 浏览 6 评论 0原文

是否可以在 SAML 身份验证请求中发送属性?

<samlp:AuthnRequest
   xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
   xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
   ID="aaf23196-1773-2113-474a-fe114412ab72"
   Version="2.0"
   IssueInstant="2004-12-05T09:21:59Z"
   AssertionConsumerServiceIndex="0"
   AttributeConsumingServiceIndex="0">
   <saml:Issuer>https://sp.example.com/SAML2</saml:Issuer>
   <samlp:NameIDPolicy
     AllowCreate="true"
     Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"/>
 </samlp:AuthnRequest>

Is it possible to send attributes in a SAML authentication request?

<samlp:AuthnRequest
   xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
   xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
   ID="aaf23196-1773-2113-474a-fe114412ab72"
   Version="2.0"
   IssueInstant="2004-12-05T09:21:59Z"
   AssertionConsumerServiceIndex="0"
   AttributeConsumingServiceIndex="0">
   <saml:Issuer>https://sp.example.com/SAML2</saml:Issuer>
   <samlp:NameIDPolicy
     AllowCreate="true"
     Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient"/>
 </samlp:AuthnRequest>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

智商已欠费 2024-07-20 13:40:29

从技术上讲,是的,这是可能的,因为 AuthnRequest 可以包含 Extensions 元素,其中可以包含任何内容 - 请参阅 SAML“核心”规范:AuthnRequest(第 3.4.1 节)源自 RequestAbstractType(第 3.2.1 节),它具有可选的扩展。 发送者和接收者必须就以这种方式发送的数据的语法和语义达成一致。

我看不到更“传统”的方法来做到这一点,因为属性通常位于断言中,而不是 AuthnRequests 中。

Technically, yes, it is possible, since AuthnRequest can contain an Extensions element, which can contain anything - see the SAML 'core' spec: AuthnRequest (section 3.4.1) is derived from RequestAbstractType (section 3.2.1) which has an optional Extensions. The sender and recipient would have to agree on the syntax and semantics of data sent this way.

I can't see a more 'conventional' way to do this, since Attributes are usually in Assertions, rather than AuthnRequests.

め可乐爱微笑 2024-07-20 13:40:29

在某些情况下,属性将成为身份验证请求的一部分。
这样我们就可以从请求中获取该属性名称来构造响应断言。

因为服务提供商通过比较属性名称来验证响应。我们可以以 Salesforce 作为服务提供商为例,同样的情况也会发生。

There is a case where attributes are to be part of auth request.
so that we can get that attribute name from request to construct response assertion with the same.

because service provider validates the response by comparing the attribute names.we can take the example of Salesforce as service provider, where the same happens.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文