简体   繁体   English

SAML重定向

[英]SAML redirection

We have a situation in SAML. 我们在SAML中遇到了情况。 We are the service providers and it is SP-initiated . 我们是服务提供商,它是SP发起的。 we have 2 websites - landing SP website and actual SP website. 我们有2个网站-登陆SP网站和实际SP网站。 Landing SP website just has a landing page , which will have link to actual SP website. 登陆SP网站只有一个登陆页面,该页面将链接到实际的SP网站。 Requirement is to have both landing SP website and actual SP website work with one IDP website( in most natural way, one can expect). 要求使登陆SP网站和实际SP网站都可以与一个IDP网站(最自然的方式,一个可以预期)一起工作。 So the following requirements should fulfill. 因此,应满足以下要求。

  1. If user initiates requests for landing SP website and lets say, user was authenticated already then the user token should be validated when the user clicks on the link in landing SP website to Actual SP site. 如果用户启动了登陆SP网站的请求,并说用户已经通过身份验证,则当用户单击登陆SP网站中到实际SP站点的链接时,应该验证用户令牌。 We can do custom coding for this but wanted to limit to SAML protocol setup. 我们可以为此进行自定义编码,但希望限制为SAML协议设置。 Please let me know how it can be done in SAML setup . 请让我知道如何在SAML设置中完成此操作。 What configuration can be done at IDP and Actual SP website to achieve this. 可以在IDP和Actual SP网站上进行哪些配置以实现此目的。

  2. If user comes to actual SP website via landing SP website link, after being authenticated in IDP and he bookmarks the url of actual SP website. 如果用户通过登陆SP网站链接进入实际SP网站,则在IDP中进行身份验证后,他会将实际SP网站的URL标记为书签。 After signing out(session out) and then signing in again at IDP, how will the IDP send the user directly to actual SP website( when only landing SP website can be mentioned as SP in IDP). 退出(会话退出)然后再次在IDP上登录后,IDP将如何将用户直接定向到实际的SP网站(当只有登陆的SP网站在IDP中可以称为SP时)。 Is there any way to tell about this second IDP url(actual SP website) at IDP. 有什么方法可以在IDP上告知第二个IDP URL(实际SP网站)。 I saw AsssertionConsumerURL and Audience in metadata as close match to deal with this problem but I see problem with both. 我看到元数据中的AsssertionConsumerURL和Audience紧密匹配,可以解决此问题,但是我发现两者都有问题。 AsssertionConsumerURL supports only one url and Audience requires condition, how will you compose condition for this case. AsssertionConsumerURL仅支持一个url,并且Audience需要条件,在这种情况下您将如何编写条件。

I run a federated system of 20,000+ SAML IDPs and a number of related websites, as well as working with various identity management standards committees. 我运行的联合系统包含20,000多个SAML IDP和许多相关网站,并与各种身份管理标准委员会合作。

My answer is assuming you are working in a federated environment where you will be providing the SAML metadata for your system to another party that runs an IDP. 我的回答是假设您正在联合环境中工作,在该环境中,您将向运行IDP的另一方提供系统的SAML元数据。

To communicate to IDPs that you have multiple endpoints as the same entity, you will want to include both AssertionConsumerService URLs in your entity's SAML metadata. 为了与拥有多个终结点的IDP进行通信,您需要将两个AssertionConsumerService URL都包含在实体的SAML元数据中。 See SAML 2.0 - Multiple AssertionConsumerService in SP and line 748 http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf . 请参阅SP中的SAML 2.0-Multiple AssertionConsumerService和第748行http://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf

Audience is a slightly different thing to check. 受众群体需要检查的东西稍有不同。 To implement SAML secure from various attacks, the IDP will use the audience to communicate the parties to which the user is being authenticated. 为了实现免受各种攻击的SAML安全,IDP将使用听众与要认证用户的各方进行通信。 See http://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf §4.1.4.2 and §4.1.4.3 for the use of the audience value. 有关受众价值的使用,请参见http://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf§4.1.4.2和§4.1.4.3。 https://fusionsecurity.blogspot.com/2011/08/5-minutes-or-less-on-saml-audiences.html seems a reasonable gloss. https://fusionsecurity.blogspot.com/2011/08/5-minutes-or-less-on-saml-audiences.html似乎很合理。

SP initiated means the user begins the flow at the SP. 已启动SP,表示用户从SP开始流程。 I'm going to give some examples because i'm not certain your requirements of a second landing page are entirely necessary. 我将举一些例子,因为我不确定您对第二个登陆页面的要求是否完全必要。

Assume an application at https://example.com/ . https://example.com/上假设一个应用程序。 The landing page at https://example.com/ does not require any authentication and has a "login" link. https://example.com/上的登录页面不需要任何身份验证,并具有“登录”链接。 There are pages at, say, https://example.com/catalog/[ID] , which can be viewed by unauthenticated users AND authenticated users (also with "login" button when not authenticated). 某些页面位于https://example.com/catalog/[ID]上 ,未经身份验证的用户和经过身份验证的用户都可以查看(未经身份验证时也可以使用“登录”按钮)查看。 Finally there are pages at https://example.com/profile/[ID] that can only be accessed by authenticated users. 最后, https://example.com/profile/ [ID]上的页面只能由经过身份验证的用户访问。

For authentication, define one acs https://example.com/acs.html . 为了进行身份验证,请定义一个acs https://example.com/acs.html

I'll add here that we expect a customer to have multiple IDPs -- educational institutions and hospitals and federal agencies often support users from different sources. 在这里我要补充一点,我们希望客户拥有多个IDP-教育机构,医院和联邦机构通常会为来自不同来源的用户提供支持。 We have a "WAYF" or "Where are you from?" 我们有“ WAYF”或“您来自哪里?” page that allows a user to select an IDP if the customer has multiple IDPs. 如果客户有多个IDP,则该页面允许用户选择IDP。

The "ideal" flow starts with a user at the landing page, moving to a catalog page, eventually logging in, and then visiting a profile. “理想”流程从用户在登录页面开始,移动到目录页面,最终登录,然后访问配置文件。 However, they may bookmark a profile. 但是,他们可以为个人资料添加书签。

When the user follows that bookmark to the a page that requires authentication, the code initates a SAML request to the IDP (going through the WAYF if needed) and saves state so that when the user is returned to the ACS with a successful authentication, they can be returned to the profile page. 当用户将书签跟随到需要身份验证的页面时,该代码向IDP发起SAML请求(如果需要,通过WAYF)并保存状态,以便当用户通过成功身份验证返回ACS时,他们可以返回到个人资料页面。

This is discussed at §4.1.5. §4.1.5中对此进行了讨论。 Usability https://kantarainitiative.github.io/SAMLprofiles/saml2int.html#_metadata_and_trust_management . 可用性https://kantarainitiative.github.io/SAMLprofiles/saml2int.html#_metadata_and_trust_management

I think this addresses your questions although my example considers the landing page part of the same website. 我认为这解决了您的问题,尽管我的示例考虑了同一网站的目标网页部分。 I'm a little unclear as to your separate website requirement. 对于您单独的网站要求,我还不清楚。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM