作为 Web SSO 服务提供商,我应该支持哪些 SAML 绑定?经过身份验证的用户的信息是如何传回给我的?
What SAML bindings should I support as a web SSO Service Provider? How is the authenticated user!s info passed back to me?
我有一个类似于 How To Become a SAML Service Provider 的问题,但它遗漏了一些我想澄清的部分。
SAML SSP 配置文件规范描述了几种可能的绑定,并指出使用取决于 SP 和 IdP 设置。
The SAML Conformance and Profiles specifications identify the SAML
bindings that can legally be used with these two messages.
Specifically, an Authentication Request message can be sent from an SP
to an IdP using either the HTTP Redirect Binding, HTTP POST Binding,
or HTTP Artifact Binding. The Response message can be sent from an IdP
to an SP using either the HTTP POST Binding or the HTTP Artifact
Binding. For this pair of messages, SAML permits asymmetry in the
choice of bindings used. That is, a request can be sent using one
binding and the response can be returned using a different binding.
The decision of which bindings to use is typically driven by
configuration settings at the IdP and SP systems. Factors such as
potential message sizes, whether identity information is allowed to
transit through the browser (if not the artifact binding may be
required) , etc. must be considered in the choice of bindings.
我的第一个问题:作为服务提供商,我是否可以自由选择 SP -> IdP 绑定中的任何一个,它可以与任何 IdP 一起工作,或者我应该在我的实现中将其配置为可配置的并支持所有绑定? (注意:我可能会集成一个现有的 saml 库来帮助我的生活,但我应该知道我应该在我的界面上允许和支持哪些配置选项。)
第二个问题是关于身份验证成功后从 IdP 返回的 SamlResponse。据我了解,SAML 只是告诉我用户已成功通过 IdP 进行身份验证。因此,我希望在响应中返回一些用户标识符,例如我可以从本地用户数据库或 LDAP 查询的 uid、用户名或电子邮件地址,以及 运行 特定于应用程序的授权逻辑。
我如何向 IdP 询问我需要的用户标识符,how/where 会返回吗?我在 Wikipedia example
中看不到与此相关的内容
根据您的 SAML-IdP 和 SP 服务器支持的绑定,您可以选择绑定对的任意组合。通常,所有主要的 SAML-IdP 都支持 SAML 规范中指定的大部分绑定。您还必须考虑安全性和性能。 Artifact 更安全,但需要两次往返才能完成 SAML-Authn 过程,因为它在发送和接收 SAML 消息时进行后端调用通信(不同于 POST 或重定向)。如果您的 SAML-IdP 和 SP 服务器支持绑定配置,那么您可以在运行时使用这些绑定。
NameID格式标识IdP和SP之间的用户,由IdP在SAML Assertion中发送。它可以是 emailAddress、未指定的、瞬态的、持久的和其他一些。查看 SAML Spec 中的 (8.3) 名称标识符格式标识符部分了解更多详细信息。您还可以请求 IdP 在 SAML 断言中发送用户属性(存在于 IdP 身份存储中)。
我有一个类似于 How To Become a SAML Service Provider 的问题,但它遗漏了一些我想澄清的部分。
SAML SSP 配置文件规范描述了几种可能的绑定,并指出使用取决于 SP 和 IdP 设置。
The SAML Conformance and Profiles specifications identify the SAML bindings that can legally be used with these two messages. Specifically, an Authentication Request message can be sent from an SP to an IdP using either the HTTP Redirect Binding, HTTP POST Binding, or HTTP Artifact Binding. The Response message can be sent from an IdP to an SP using either the HTTP POST Binding or the HTTP Artifact Binding. For this pair of messages, SAML permits asymmetry in the choice of bindings used. That is, a request can be sent using one binding and the response can be returned using a different binding. The decision of which bindings to use is typically driven by configuration settings at the IdP and SP systems. Factors such as potential message sizes, whether identity information is allowed to transit through the browser (if not the artifact binding may be required) , etc. must be considered in the choice of bindings.
我的第一个问题:作为服务提供商,我是否可以自由选择 SP -> IdP 绑定中的任何一个,它可以与任何 IdP 一起工作,或者我应该在我的实现中将其配置为可配置的并支持所有绑定? (注意:我可能会集成一个现有的 saml 库来帮助我的生活,但我应该知道我应该在我的界面上允许和支持哪些配置选项。)
第二个问题是关于身份验证成功后从 IdP 返回的 SamlResponse。据我了解,SAML 只是告诉我用户已成功通过 IdP 进行身份验证。因此,我希望在响应中返回一些用户标识符,例如我可以从本地用户数据库或 LDAP 查询的 uid、用户名或电子邮件地址,以及 运行 特定于应用程序的授权逻辑。 我如何向 IdP 询问我需要的用户标识符,how/where 会返回吗?我在 Wikipedia example
中看不到与此相关的内容根据您的 SAML-IdP 和 SP 服务器支持的绑定,您可以选择绑定对的任意组合。通常,所有主要的 SAML-IdP 都支持 SAML 规范中指定的大部分绑定。您还必须考虑安全性和性能。 Artifact 更安全,但需要两次往返才能完成 SAML-Authn 过程,因为它在发送和接收 SAML 消息时进行后端调用通信(不同于 POST 或重定向)。如果您的 SAML-IdP 和 SP 服务器支持绑定配置,那么您可以在运行时使用这些绑定。
NameID格式标识IdP和SP之间的用户,由IdP在SAML Assertion中发送。它可以是 emailAddress、未指定的、瞬态的、持久的和其他一些。查看 SAML Spec 中的 (8.3) 名称标识符格式标识符部分了解更多详细信息。您还可以请求 IdP 在 SAML 断言中发送用户属性(存在于 IdP 身份存储中)。