- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试使用 SharePoint 2016 设置 [Thinktecture] Identity Server 3。但是,在用户通过身份验证后,我遇到了 SharePoint 和 Identity Server 3 之间的无限循环。 IdServer 日志中没有错误。如果有人能查看我下面的步骤,我将不胜感激。
我从 Self-Host with WS-Federation sample 开始, 并修改以添加新的依赖方。 Identity Server 本身运行在与 SharePoint 完全独立的服务器上,跨 Internet,使用公共(public) DNS 注册主机名:
const string url = "https://mydevserver.example.com:44333/core";
using (WebApp.Start<Startup>(url))
{
Console.WriteLine("\n\nServer listening at {0}. Press enter to stop", url);
Console.ReadLine();
}
new RelyingParty
{
Name = "SharePoint 2016 Trial",
Realm = "urn:idserver:sp16trial",
Enabled = true,
ReplyUrl = "https://mysharepointserver.example.com/_trust/",
TokenType = TokenTypes.Saml11TokenProfile11,
TokenLifeTime = 1,
ClaimMappings = new Dictionary<string, string>
{
{ "email", ClaimTypes.Email },
{ "sub", ClaimTypes.NameIdentifier },
{ "name", ClaimTypes.Name },
{ "given_name", ClaimTypes.GivenName },
{ "surname", ClaimTypes.Surname }
}
}
我导航到 https://mydevserver.example.com:44333/core/wsfed/metadata
并将其保存为 XML 文件,我将其暂时放在 SharePoint 服务器上。从 XML 文件中,我提取公共(public) X509 证书并将其保存为 temp.cer
文件与下面的 Powershell 脚本位于同一文件夹中。
$realm = "urn:idserver:sp16trial"
$signinurl = "https://mydevserver.example.com:44333/core/wsfed"
$description ="My Test Identity Server 3"
[xml]$fedmdXml = Get-Content metadata.xml
$cert = Get-PfxCertificate -FilePath temp.cer
asnp *sh*
$name = "IdSrv"
New-SPTrustedRootAuthority -Name $name -Certificate $cert | Out-Null
$map1 = New-SPClaimTypeMapping "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "Email" –SameAsIncoming
$map2 = New-SPClaimTypeMapping "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" -IncomingClaimTypeDisplayName "Role" -SameAsIncoming
New-SPTrustedIdentityTokenIssuer -Name $name -Description $description -Realm $realm -ImportTrustCertificate $cert -ClaimsMappings $map1,$map2 -SignInUrl $signinurl -IdentifierClaim $map1.InputClaimType
我导航到 SharePoint 中央管理 并将新的可信提供程序 连接到 Web 应用程序。
在 Sharepoint 中央管理中,我通过 Sharepoint 用户政策 授权用户“bobsmith@example.com”。
我导航到 https://mysharepointserver.example.com
我被重定向到登录页面 https://mydevserver.example.com:44333/core/login?signin=<guidhere>
正如预期的那样。
我以用户身份登录 bob
,但随后在 SharePoint 和 Identity Server 之间触发了无限循环。这是来自 IdSvr 日志:
Server listening at https://mydevserver.example.com:44333/core. Press enter to stop
02/26/2017 22:29:53 -08:00 [INF] (IdentityServer3.WsFederation.WsFederationController)
Start WS-Federation request
02/26/2017 22:29:53 -08:00 [DBG] (IdentityServer3.WsFederation.WsFederationController)
AbsoluteUri: [https://mydevserver.example.com:44333/core/wsfed?wa=wsignin1.0&wtrealm=urn%3aidserver%3asp16trial&wctx=https%3a%2f%2fmysharepointserver.example.com%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F]
02/26/2017 22:29:53 -08:00 [DBG] (IdentityServer3.WsFederation.WsFederationController)
PublicUri: [https://mydevserver.example.com:44333/core/wsfed?wa=wsignin1.0&wtrealm=urn:idserver:sp16trial&wctx=https:%2f%2fmysharepointserver.example.com%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F]
02/26/2017 22:29:53 -08:00 [INF] (IdentityServer3.WsFederation.WsFederationController)
WsFederation signin request
02/26/2017 22:29:53 -08:00 [INF] (IdentityServer3.WsFederation.Validation.SignInValidator)
Start WS-Federation signin request validation
02/26/2017 22:29:53 -08:00 [INF] (IdentityServer3.WsFederation.WsFederationController)
Redirecting to login page
02/26/2017 22:29:53 -08:00 [DBG] (IdentityServer3.Core.Configuration.Hosting.MessageCookie`1)
Protecting message: {"ReturnUrl":"https://mydevserver.example.com:44333/core/wsfed?wa=wsignin1.0&wtrealm=urn%3aidserver%3asp16trial&wctx=https%3a%2f%2fmysharepointserver.example.com%2f_layouts%2f15%2fAuthenticate.aspx%3fS
ource%3d%252F","AcrValues":[],"Created":636237737932988392}
02/26/2017 22:29:53 -08:00 [INF] (IdentityServer3.Core.Endpoints.AuthenticationController)
Login page requested
02/26/2017 22:29:53 -08:00 [DBG] (IdentityServer3.Core.Endpoints.AuthenticationController)
signin message passed to login: {
"ReturnUrl": "https://mydevserver.example.com:44333/core/wsfed?wa=wsignin1.0&wtrealm=urn%3aidserver%3asp16trial&wctx=https%3a%2f%2fmysharepointserver.example.com%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F",
"ClientId": null,
"IdP": null,
"Tenant": null,
"LoginHint": null,
"DisplayMode": null,
"UiLocales": null,
"AcrValues": [],
"Created": 636237737932988392
}
02/26/2017 22:29:53 -08:00 [INF] (IdentityServer3.Core.Endpoints.AuthenticationController)
rendering login page
02/26/2017 22:30:01 -08:00 [INF] (IdentityServer3.Core.Endpoints.AuthenticationController)
Login page submitted
02/26/2017 22:30:01 -08:00 [INF] (IdentityServer3.Core.Endpoints.AuthenticationController)
Login credentials successfully validated by user service
02/26/2017 22:30:01 -08:00 [INF] (IdentityServer3.Core.Endpoints.AuthenticationController)
Calling PostAuthenticateAsync on the user service
02/26/2017 22:30:01 -08:00 [INF] (IdentityServer3.Core.Endpoints.AuthenticationController)
issuing primary signin cookie
02/26/2017 22:30:01 -08:00 [INF] (IdentityServer3.Core.Endpoints.AuthenticationController)
redirecting to: https://mydevserver.example.com:44333/core/wsfed?wa=wsignin1.0&wtrealm=urn:idserver:sp16trial&wctx=https:%2f%2fmysharepointserver.example.com%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F
02/26/2017 22:30:01 -08:00 [INF] (IdentityServer3.WsFederation.WsFederationController)
Start WS-Federation request
02/26/2017 22:30:01 -08:00 [DBG] (IdentityServer3.WsFederation.WsFederationController)
AbsoluteUri: [https://mydevserver.example.com:44333/core/wsfed?wa=wsignin1.0&wtrealm=urn%3aidserver%3asp16trial&wctx=https%3a%2f%2fmysharepointserver.example.com%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F]
02/26/2017 22:30:01 -08:00 [DBG] (IdentityServer3.WsFederation.WsFederationController)
PublicUri: [https://mydevserver.example.com:44333/core/wsfed?wa=wsignin1.0&wtrealm=urn:idserver:sp16trial&wctx=https:%2f%2fmysharepointserver.example.com%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F]
02/26/2017 22:30:01 -08:00 [INF] (IdentityServer3.WsFederation.WsFederationController)
WsFederation signin request
02/26/2017 22:30:01 -08:00 [INF] (IdentityServer3.WsFederation.Validation.SignInValidator)
Start WS-Federation signin request validation
02/26/2017 22:30:01 -08:00 [INF] (IdentityServer3.WsFederation.Validation.SignInValidator)
End WS-Federation signin request validation
{
"Realm": "urn:idserver:sp16trial",
"RelyingPartyName": "SharePoint 2016 Trial",
"ReplyUrl": "https://mysharepointserver.example.com/_trust/"
}
02/26/2017 22:30:01 -08:00 [INF] (IdentityServer3.WsFederation.ResponseHandling.SignInResponseGenerator)
Creating WS-Federation signin response
02/26/2017 22:30:01 -08:00 [DBG] (IdentityServer3.WsFederation.Hosting.CookieMiddlewareTrackingCookieService)
Retrieving values of cookie IdSvr.WsFedTracking
02/26/2017 22:30:01 -08:00 [DBG] (IdentityServer3.WsFederation.Hosting.CookieMiddlewareTrackingCookieService)
Cookie IdSvr.WsFedTracking does not exist
02/26/2017 22:30:01 -08:00 [DBG] (IdentityServer3.WsFederation.Hosting.CookieMiddlewareTrackingCookieService)
Adding https://mysharepointserver.example.com/_trust/ to IdSvr.WsFedTracking cookie
02/26/2017 22:30:01 -08:00 [DBG] (IdentityServer3.WsFederation.Results.SignInResult)
Returning WS-Federation signin response
02/26/2017 22:30:02 -08:00 [INF] (IdentityServer3.WsFederation.WsFederationController)
Start WS-Federation request
02/26/2017 22:30:02 -08:00 [DBG] (IdentityServer3.WsFederation.WsFederationController)
AbsoluteUri: [https://mydevserver.example.com:44333/core/wsfed?wa=wsignin1.0&wtrealm=urn%3aidserver%3asp16trial&wctx=https%3a%2f%2fmysharepointserver.example.com%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F]
02/26/2017 22:30:02 -08:00 [DBG] (IdentityServer3.WsFederation.WsFederationController)
PublicUri: [https://mydevserver.example.com:44333/core/wsfed?wa=wsignin1.0&wtrealm=urn:idserver:sp16trial&wctx=https:%2f%2fmysharepointserver.example.com%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F]
02/26/2017 22:30:02 -08:00 [INF] (IdentityServer3.WsFederation.WsFederationController)
WsFederation signin request
02/26/2017 22:30:02 -08:00 [INF] (IdentityServer3.WsFederation.Validation.SignInValidator)
Start WS-Federation signin request validation
02/26/2017 22:30:02 -08:00 [INF] (IdentityServer3.WsFederation.Validation.SignInValidator)
End WS-Federation signin request validation
{
"Realm": "urn:idserver:sp16trial",
"RelyingPartyName": "SharePoint 2016 Trial",
"ReplyUrl": "https://mysharepointserver.example.com/_trust/"
}
02/26/2017 22:30:02 -08:00 [INF] (IdentityServer3.WsFederation.ResponseHandling.SignInResponseGenerator)
Creating WS-Federation signin response
02/26/2017 22:30:02 -08:00 [DBG] (IdentityServer3.WsFederation.Hosting.CookieMiddlewareTrackingCookieService)
Retrieving values of cookie IdSvr.WsFedTracking
02/26/2017 22:30:02 -08:00 [DBG] (IdentityServer3.WsFederation.Hosting.CookieMiddlewareTrackingCookieService)
https://mysharepointserver.example.com/_trust/ already exists in IdSvr.WsFedTracking cookie
02/26/2017 22:30:02 -08:00 [DBG] (IdentityServer3.WsFederation.Results.SignInResult)
Returning WS-Federation signin response
02/26/2017 22:30:03 -08:00 [INF] (IdentityServer3.WsFederation.WsFederationController)
Start WS-Federation request
知道我错过了什么吗?
最佳答案
您正面临无限重定向,因为您将依赖方的 ReplyUrl 设置为信任页面,而这是不正确的。
ReplyUrl应该是登录成功后身份服务器重定向到的URL。
这应该是您的依赖方的正确逻辑:
ReplyUrl = "https://mysharepointserver.example.com/"
您需要在客户端类中设置信任 URL:
RedirectUris = { "https://mysharepointserver.example.com/_trust/" },
关于c# - Identity Server 3 作为 SharePoint 2013/2016 的 Ws-Fed 身份提供者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42479434/
我在 keras-vis 中使用 visualize_activation 函数: from vis.visualization import visualize_activation, visual
我正在尝试了解 SSO 概念以及它们如何适合我的情况,但我已经有点陷入困境了。假设我们使用 Azure AD、Ping Identity 或类似的东西,我们希望启用社交登录(谷歌帐户/facebook
我发现了这个关于 print activation maps 的 GitHub 示例。代码非常简单。我所做的只是复制粘贴该函数。 def get_activations(model, model_in
我试图显示网络中中间层的输出,我使用了以下代码: from keras import models layer_outputs = [layer.output for layer in w_extra
当我运行此代码时: x = tf.placeholder(tf.int32, shape=(None, 3)) with tf.Session() as sess: feed_dict = d
在调查联合身份验证时,我遇到了 SAML 旁边的协议(protocol):HTTP-FED。 奇怪的是,我找不到该协议(protocol)的任何技术文档。 这是什么?它是否像我怀疑的那样,是一种用于
我正在使用 Fed Ex Shipping Web Service,但在运行应用程序时出现以下错误。 无法获得礼遇率。 我正在使用 Fed Ex 测试帐户和 FedEx 电表号码。我正在使用 ship
我对 php 非常陌生,我一直在玩 highcharts 来学习图表软件。我正在尝试运行 this来自数据库的图表演示,但可变时间的代码让我陷入困境。有人可以帮忙吗? 这是来自 highcharts
我正在处理现有的构建脚本,其中脚本文件包含这些(某些部分)作为构建过程的一部分,我需要运行这个脚本文件。 #!/bin/sh if [ -z $1 ]; then help elif [
有没有办法在 Tensorflow 中同时提供和获取同一变量?如果不是,为什么不允许这样做? 我收到此错误: StatusNotOK: Invalid argument: Reshape:0 is b
我正在为基于 .NET 的应用程序配置 ADFS,并尝试决定是使用 WS-Fed 还是 SAML 作为登录协议(protocol)。两者都满足我的要求。 我计划在几个月内通过基于 Java 的应用程序
我发现了 rust 并且很难处理生命周期。 例如,我正在对 GUI 进行一些试验: #[macro_use]extern crate native_windows_gui as nwg; use nw
我正在尝试运行一段代码,告诉我在人类跌倒检测中跌倒和未跌倒的次数,但我收到错误: input_1:0 is both fed and fetch . 我尝试单独运行它,但从未成功。 from kera
如果我使用了一些错误或模棱两可的术语,我深表歉意。 请如果我这样做,请纠正我。 我有一个相当新的 ASP.NET 4.6 MVC 5 应用程序,它使用 claim 通过 进行身份验证WsFederat
我正在尝试使用 SharePoint 2016 设置 [Thinktecture] Identity Server 3。但是,在用户通过身份验证后,我遇到了 SharePoint 和 Identity
我正在尝试编译我从 Qt git 中提取的当前“稳定”版本。问题是当它尝试使用 uic(UI 编译器)时,我的路径变量以某种方式被破坏并且它找不到路径上的 icu 库,但是如果我将库放在与 uic 相
WS-Trust、WS-Fed 和 SAML 1.1/2.0 协议(protocol)之间有什么区别? 当 SAML 在 WS-Trust 和 WS-Fed 协议(protocol)中用作安全 tok
我尝试将 Web SSO 与 WS-Federation 结合使用,以从 ASP.NET MVC 5 应用程序获取外部 IDP。 在此场景中,ASP.NET 应用程序是服务提供者。 对于登录,我想使用
我是一名优秀的程序员,十分优秀!