问题标签 [kentor-authservices]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
246 浏览

kentor-authservices - Kentor.AuthServices.StubIdp - 发现服务:设置为应用程序时,选定 Idp 的实体 ID 显示错误

我在服务器上设置了 Kentor AuthServices SP 和 Idp 端点。

SP:https://[域]/SP/AuthServices/SignIn Idp:https://[域]/IdP/

当 DiscoveryService 从 SignIn 页面访问时,Selected Idp 的 Entity ID 显示为https://[domain]/IdPMetadata,SP Single Logout URL 显示为https://[domain]/IdPLogout?SAMLRequest=[saml request]

我通过修改 UrlResolver.GetCombinedUrl() 解决了这个问题,使其正确显示如下... https://[domain]/IdP/Metadata https://[domain]/IdP/Logout?SAMLRequest=[saml request]

这是存储库中的错误还是我在配置中遗漏了什么?

谢谢你。

0 投票
1 回答
425 浏览

.net - 使用 Kentor 程序集单点注销

Kentor 提供了从 SP 发起单点注销的实现。但是,在最新的 Kentor 程序集中,发送注销请求的绑定始终是 HttpRedirect。

但是,身份提供者拒绝使用 HttpRedirect 绑定发送的注销请求,并希望使用 HttpPost 发送该请求。

我在 Kentor 配置部分中没有看到任何配置注销绑定的选项。有没有办法在不干扰 Kentor 代码的情况下更改注销绑定?

0 投票
1 回答
1871 浏览

angularjs - 在 MVC5 .net 框架 4.5 中使用 Saml2.0(Saml2.0 令牌由 F5 BigIp 工具生成)

Web 应用程序的当前状态: 我们有一个用 AngularJs、MVC5 设计的现有 Web 应用程序。针对我们的自定义数据库进行身份验证。

SignIn:我们确实覆盖了 Microsoft.AspNet.Identity.UserManager 和其他源类来与我们的数据库对话以获取用户相关信息。将结果添加到 System.Security.Claims.ClaimsIdentity。

传递给“Microsoft.Owin.Security.IAuthenticationManager.SignIn(params System.Security.Claims.ClaimsIdentity[] identities)

我需要什么 SSO: 我们希望使用 SAML 2.0 令牌将身份验证转移到 SSO,因为我们计划将 2 个新供应商集成到我们的 Web 应用程序中

身份提供者: 我们正在 F5 Big Ip 中实现身份提供者,它通过提供登录页面并生成 saml2 令牌来进行身份验证。我们的 Web 应用程序将被配置为服务提供者。在重定向到 Web 应用程序时,它将传递 saml2.0 令牌。

在 MVC .net 框架 4.5.2 中使用 SAML2.0 我的应用程序只需要使用 saml2.0 令牌并与现有的身份验证管道集成。 要做的事情: 来自身份提供者的元数据具有解密 saml2.0 令牌的公钥以及用于签署元数据文件的密钥

我的假设是解析 SAML 2.0 令牌的请求并验证令牌是否有效并使用属性中的数据并查询数据库以获取更多详细信息并将结果插入“System.Security.Claims.ClaimsIdentity”并使用现有的签到操作。需要弄清楚如何配置原理..我们是否还需要Microsoft.AspNet.Identity.UserManager。

研究: 在 Visual Studio 中,我们有身份和访问工具,这在 vs2013 中不存在。浏览了关于 Windows 身份基础和声明身份原则的文章 www.codeproject.com/Articles/504399/Understanding-Windows-Identity-Foundation-WIF

我知道 wif 支持 saml2.0 令牌但不支持 saml2 协议。

以下是建议使用的第三方工具 http://nzpcmad.blogspot.co.nz/2013/06/saml-saml-connectivity-toolkit.html

我不确定只是消费我需要使用其中一种工具吗?因为我们在 F5 bigip 中配置了 IDP,而不是在 .net 中设计

我发现的另一篇好文章 http://www.primaryobjects.com/2013/08/08/using-single-sign-on-with-windows-identity-foundation-in-mvc-net/

还看到了一些关于 Saml2SecurityTokenHandler 处理 saml2.0 令牌的建议。

如果有人可以指导我使用更简单的解决方案以集成到我现有的网络应用程序中,我将不胜感激。只需要使用 saml2.0 令牌并与现有的基于声明的身份验证集成。

0 投票
1 回答
1417 浏览

c# - Kentor AuthServices - SP 的 serviceCertificates (.pfx with password protected) 引发网络密码错误

错误:指定的网络密码不正确。

说明:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:指定的网络密码不正确。

原因:我只能导出受密码保护的证书“.pfx”。据我了解,“Kentor AuthServices”不支持密码保护..

据说此问题已按照以下链接关闭 https://github.com/KentorIT/authservices/issues/457

.Net 错误:这是因为设置了“X509KeyStorageFlags.MachineKeySet”标志。

我所做的只是将 .pfx 文件保存在我的解决方案中,并将服务器证书文件路径指向它。我是否需要做任何其他事情才能通过错误?

非常感谢您的帮助。

0 投票
1 回答
249 浏览

asp.net-mvc - KentorAuthServices - SHA2 的服务提供商证书错误

使用商店在我们的 .NET Mvc Web 应用程序中配置服务提供者证书。

配置时使用 =“Both”-> 表示不是用于加密/解密的有效证书配置时使用 =“签名”-> 表示异常详细信息:System.Security.Cryptography.CryptographicException:指定的提供程序类型无效。

在此处输入图像描述

0 投票
1 回答
677 浏览

okta - 在 SP 启动的 SAML SSO 期间预填充 Okta 用户名

我使用 Kentor AuthServices .NET 包向我的应用程序添加了对带有 Okta 的 SAML 2.0 SSO 的支持,用户完成的第一个操作是单击“使用 Okta 登录”按钮,然后使用 Kentor 生成的 SAML 请求令牌重定向到 Okta 的登录页面.

在某些情况下,用户电子邮件(Okta 中的用户名)是事先已知的,我想使用此值预先填充 Okta 登录页面上的用户名文本框。

是否可以这样做,例如通过在 SAML 请求或 cookie 中提供所需的用户名?

0 投票
1 回答
1205 浏览

asp.net-mvc-5 - Kentor Auth 服务 SAML 2.0 - 服务证书

在 MVC 应用程序中实现 SAML 2.0 的 AuthServices 库。我提供了来自身份提供者的所有详细信息,包括元数据和 SSO URl。但我无法理解什么是服务证书。我应该在这里包含什么?我必须从 App_Data 文件夹中添加哪个证书?

现在Kentor.AuthServices.Tests.pfx证书就在那里。我应该用什么代替这个证书。我正在使用来自 kentor.authservices 库的 owin中间件身份验证。我附上了 app_start c#代码如下。

提前致谢。

0 投票
1 回答
1444 浏览

asp.net-mvc - 在 MVC 应用程序中使用 Kentor Auth 服务库将 Google 实现为身份提供者(IDP)?

嗨,我正在使用 kentor 身份验证服务(Kentor 身份验证服务是一个库,它为 ASP.NET 和 IIS 网站添加了 SAML2P 支持,允许该网站充当 SAML2 服务提供商 (SP))。现在我正在使用 Google作为用于测试我的应用程序的身份提供者(使用 owin 中间件进行身份验证)。我也设置了 Google 身份提供程序。但是当我运行应用程序时,它给了我一个错误

“400。这是一个错误。无效的请求,请求 URL 中的 idpId 无效,检查 SP 端是否正确配置了 SSO URL。这就是我们所知道的。”

我用过 SingleSignOnServiceUrl= https://accounts.google.com/o/saml2/idp?idpid=xxxxxxxxx

DiscoveryServiceUrl= https://accounts.google.com/o/saml2/idp?idpid=xxxxxxxxx

上面的配置正确吗?

我在下面附加了 App_start 配置。这来自 Kentor auth 服务库。

为什么我在重定向到 google saml 页面时收到 400 错误?提前致谢

0 投票
1 回答
957 浏览

asp.net-mvc - 收到错误预期消息包含 InResponseTo“id142e8231161a4246bf345d331a7b0ace”,但没有找到。在 Kendor.AuthServices.MVC

这是我的 web.config 文件

但是在登录后重定向到我的本地主机时出现错误

“/”应用程序中的服务器错误。

预期的消息包含 InResponseTo“id0dda716c55fd41bd98d4899ca3e14036”,但没有找到。

说明:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:Kentor.AuthServices.Exceptions.Saml2ResponseFailedValidationException:预期消息包含 InResponseTo“id0dda716c55fd41bd98d4899ca3e14036”,但没有找到。

源错误:

在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。

堆栈跟踪:

[Saml2ResponseFailedValidationException:预期消息包含 InResponseTo“id0dda716c55fd41bd98d4899ca3e14036”,但没有找到。]
Kentor.AuthServices.Saml2P.Saml2Response.ReadAndValidateInResponseTo(XmlElement xml, Saml2Id expectedInResponseTo) +295
Kentor.AuthServices.Saml2P.Saml2Response..ctor(XmlElement xml expectedInResponseTo) +317
Kentor.AuthServices.WebSso.AcsCommand.Run(HttpRequestData 请求,IOptions 选项) +869
Kentor.AuthServices.Mvc.AuthServicesController.Acs() +81
lambda_method(Closure, ControllerBase, Object[]) +87
System.Web .Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary 2参数) +352 parameters) +280
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary

System.Web.Mvc.Async.<>c__DisplayClass42.b__41() +33 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass39.b__33() + 80 System.Web.Mvc.Async.<>c__DisplayClass4f.b__49() +386 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass2a.b__20() +32 System.Web.Mvc.Async.<>c__DisplayClass25.b__22(IAsyncResult asyncResult) +185
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
System.Web.Mvc.<>c__DisplayClass1d.b__18( IAsyncResult asyncResult) +27
System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +22 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar ) +22 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
System.Web.Mvc.<>c__DisplayClass8.b__3(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +22 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +657 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&同步完成)+146

这是我的 SAML 回复

0 投票
2 回答
1156 浏览

azure - 使用 OWIN 管道进行多租户身份验证

我有一个多租户应用程序,每个租户都可以为 WsFed 或 OpenIdConnect(Azure) 或 Shibboleth(Kentor) 定义自己的元数据 URl、ClientId、权限等。所有租户都存储在 DB 表中,并在 OwinStartup 中注册,如下所示:

在 Db 中启用同一提供程序(ADFS、Azure 或 Shibboleth)的多个组织时,我会收到错误消息。我试过“app.Map”来扩展它。但虽然不成功。此外,我使用以下代码注销所有提供程序(ADFS 和 Azure),但注销也失败。

提供者是我跨组织使用的唯一身份验证类型。

寻求帮助/指导。注意:每当添加新租户时,都可以回收 appdomain,不需要动态重建管道以使事情变得复杂。