ADFS RelayState问题

问题描述 投票:1回答:1

我使用PingFederate进行SP启动的SSO和ADFS 3.0进行用户身份验证。它显示用户输入凭据的登录页面。仅当登录页面空闲10分钟或更长时间,然后当用户单击登录时,才会失败,显示以下错误消息。如果登录在10分钟之前,则没有问题。我注意到登录页面url有一个RelayState guid。在成功验证期间,它会创建MSISContext cookie以及附加到其上的RelayState指南。当它出错时,从我在网上看到的,响应回到ADFS,ADFS检查一个cookie,其中包含一个不存在的新RelayState名称。当登录页面空闲10分钟或更长时间时,我该怎么做才能解决此问题。是否有超时值可以在某处更改?

联合被动请求期间遇到错误。

附加数据

协议名称:Saml

依赖方:

异常详细信息:Microsoft.IdentityServer.Web.CookieManagers.InvalidContextException:MSIS7001:未找到被动协议上下文或无效。如果上下文存储在cookie中,则客户端提供的cookie无效。确保客户端浏览器配置为接受来自此网站的cookie并重试此请求。 Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext)上的Microsoft.IdentityServer.Web.PassiveProtocolListener.ProcessProtocolRequest(ProtocolContext protocolContext,PassiveProtocolHandler protocolHandler)上的Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolHandler.GetOriginalRequestFromResponse(ProtocolContext context,Boolean deleteCookie)上下文)

adfs
1个回答
1
投票

RelayState被添加到cookie的名称中。如果中继状态发生更改,则响应将检查具有不存在的新RelayState名称的cookie。确保它has not changed并确保您在ADFS上启用了RelayState

根据您的Windows Server版本,您可能还需要包含不同的服务属性。请参阅以下主题:

例如,Windows Server 2012 R2中的AD FS包含%systemroot%\ADFS\Microsoft.IdentityServer.Servicehost.exe.config文件。如果您正在使用它,请使用与web.config文件元素相同的语法创建一个元素:<useRelayStateForIdpInitiatedSignOn enabled="true" />。将此元素包含在Microsoft.IdentityServer.Servicehost.exe.config文件的<microsoft.identityserver.web>部分中。

https://social.technet.microsoft.com/Forums/Lync/en-US/8d692a29-92e0-47e0-be70-d7f9335ab95a/adfs-30-relay-state-issue?forum=winserverDS

https://social.msdn.microsoft.com/Forums/en-US/25239ff7-a33d-4f3e-a7a8-5a3c47d733f7/relaystate-support-in-adfs-30?forum=Geneva

https://nzpcmad.blogspot.com/2016/01/this-post-follows-on-from-idp-initiated.html

© www.soinside.com 2019 - 2024. All rights reserved.