问题标签 [sts-securitytokenservice]
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.
asp.net-mvc - IdentityManager(自定义 STS)
更新:配置中没有错误!错误是我错过了放置证书。现在我收到此错误:ID2057:无法为没有私钥的证书构造 X509SigningCredentials 实例。参数名称:令牌 :)
我正在尝试按照本指南制作 CustomSTS: Chris Klug
当我在 IIS 7 上使用 url: http ://identitymanager.dev/ 运行我的 customSTS 时,一切正常。我登录并被重定向到 customSTS 的主控制器。
但问题是当我使用我的依赖应用程序时。
它重定向到这个网址:
我收到此错误消息: 未找到主题名称 cn=IdentityManager.dev 的证书
问题是当我检查 mmc.exe 时,我有一个名为 IdentityManager.dev 的证书(对于我的用户帐户)。
堆栈跟踪:
这是我的 customSTS 的 web.config:
这是我的 FederationMetaData:
这是我的 RELYING 应用程序 web.config:
依赖联邦元数据:
security - 多个应用程序不同步的 WIF STS
假设我有两个 Web 应用程序和一个 STS 服务: 1. 可以向用户授予权限的管理门户。2. 用户可以根据这些权限做事的销售门户。
现在假设我有 STS,它向销售门户提供 8 小时到期的安全令牌。令牌包含包含有关用户权限等信息的声明。
现在想象一个场景,其中删除了用户的管理门户权限并将更改保存到数据库中。由于用户已使用尚未过期的安全令牌登录到销售门户,销售门户将不会知道权限已被删除。
问题是 - 如何处理这种情况。对我来说,我在这里看到的唯一解决方案是完全删除 STS,但我正在寻找一种更智能的方法来处理这个问题。
有没有更好的方法来解决这个不同步的问题?
wcf - 陷入身份验证重定向循环 - STS/WIF
使用 VS2012 .Net Framework 4.5,我使用身份和访问插件创建了一个带有本地 STS 的 WCF 服务应用程序。我的目标是能够使用浏览器进行身份验证。到目前为止我做了什么:
- 添加了 WSFAM 和 SAM 模块。
- 使用 Fiddler 确保我得到正确的重定向
- 确保已创建 FedAuth[] cookie。
在创建 cookie (SAM) 之后,我再次被重定向回 STS。这就是我陷入循环的地方。
WCF 和 Web 服务对我来说很新,如果我详细说明了太多,请见谅......
这是我的 web.config:
提琴手
响应 #10108 - 设置 FedAuth cookie 并重定向到资源
Request #10109 - 使用给定的 cookie 请求重定向的资源。
响应 #10109 - 结果 401,在 #10111 再次重定向到 STS
.net - 如何使用 X509SecurityToken 作为 ActAs 令牌并验证调用者是否拥有私钥?
我已经实现了一个 STS,它允许客户端使用 X509 证书进行身份验证。WIF(现在内置在 .NET 4.5 中)有一个X509SecurityToken
类似乎非常适合这种情况。就我而言,我还想传递一个ActAs令牌,但在我看来,虽然 ActAs 令牌是经过验证的(通过不同的令牌处理程序集合),但对于X509SecurityToken
,此验证并不能证明调用者拥有私钥,就像将令牌用作消息凭据时一样。
有没有办法解决?我如何要求 ActAs 令牌证明它具有私钥?
wcf - 使用 STS 和 WCF 时遇到不安全或不正确安全的故障异常问题
我正在使用几个使用 WIF 和 STS 提供程序保护的 WCF 服务(全部使用开箱即用的 Microsoft 代码和示例)。这些服务都是使用 .NET 3.5 构建的,并且最近都更新到了 .NET 4.0。与服务关联的所有.dll 也已更新到 4.0。这些服务多年来一直按原样工作,直到我更新了框架版本。
现在的问题是,当调用由 STS WCF 服务保护的 WCF 服务时,在将令牌传递回调用由 STS 保护的 WCF 服务的客户端应用程序后会生成错误:
从另一方收到不安全或不正确安全的故障。有关故障代码和详细信息,请参阅内部 FaultException。
HResult -2146233087
{“处理消息中的安全令牌时出错。”}
服务器堆栈跟踪:在 System.ServiceModel.Channels.SecurityChannelFactory
1.SecurityRequestChannel.ProcessReply(Message reply, SecurityProtocolCorrelationState correlationState, TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory
1.SecurityRequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout) at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan超时) 在 System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout) 在 System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout) 在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 在 System .ServiceModel.Channels.ServiceChannel.OnOpen(时间跨度超时)
在 System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 在 System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout) 在 System.ServiceModel.Channels。 ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade) at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins , Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy。InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)在 [0] 处重新抛出异常:在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 在 MyProject.IMyService 的 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)。 GetInfo() 在 MyProject.Proxy.GetInfo() 在 c:\Projects\Proxy.cs:line 36
深入挖掘它还显示:
InvalidSecurityToken作为 InnerException.Code.Subcode.Name 属性值。
因此,我查看了以下内容,这些都表明系统上的时钟存在问题,但都没有奏效:
http://blogs.msdn.com/b/dhrubach/archive/2009/12/14/9936037.aspx
从另一方收到不安全或安全错误。(使用 SAML 时)
http://blogs。 msdn.com/b/xiaowen/archive/2009/03/26/tip-add-a-clock-skew-to-prevent-some-security-faults.aspx?Redirected=true
我已附加到这些服务中的调试器并尝试遍历代码,但找不到罪魁祸首。有谁知道我可能在哪里不对?
编辑:有趣的是 STS 服务中 WIF 的困难部分进行身份验证工作!我已打开日志记录并捕获以下内容:
我还打开了 WCF 登录.config
以查看 .svc 文件,但它们没有产生任何指出问题的错误信息。就像 STS 说:“嘿,您已通过身份验证,我们通过了您并生成了令牌,现在我们完成了!” 似乎调用客户端不喜欢令牌。然而,这一直有效,直到我更改了框架版本。据我所知,从 3.5 -> 4.0 开始,WIF 没有任何重大变化,但较大的变化发生在 4.5 中,其中 WIF 被集成到框架中。
所以所有的授权都有效,只是我想客户接受的令牌有问题吗?
single-sign-on - .net 4.5 中 FederatedPassiveSignInStatus 控件的平等控制是什么?
我为单点登录编写了 STS(安全令牌服务)。但我使用了 .net 4 以及 Microsoft.IdentityModel 和 Microsoft.IdentityModel.Web.Controls。现在我想将我的代码转换为 .net 4.5,但没有用于处理“FederatedPassiveSignInStatus”控件的命名空间。这个问题应该怎么做以及解决方案是什么?谢谢
certificate - 为什么我会收到此错误:“IssuerNameRegistry 无法识别安全令牌的发行者”
当我想使用自定义 STS 运行我的应用程序时(我已经编写了它并且它运行良好),首先我得到这个错误:
IssuerNameRegistry 无法识别安全令牌的颁发者
我测试了这个错误的所有解决方案,但我仍然有这个错误。
我添加了“TrustedIssuerNameRegistery”类并将其设置在 web.config 中。
这是 web.config 设置:
然后我得到这个错误:
我什至安装了“ValidatingIssuerNameRegistry” dll 并在 web.config 中注册了它,但我又遇到了第一个错误。
为什么我经常收到这个错误?它有什么问题?我还能做什么?如果你愿意,我也可以给你我的源代码。
asp.net - WS-Federation 真正做了什么(深入并通过一个简单易懂的例子)?
我已经阅读了一些关于 WS-Federation 的文本,但我无法理解。我有一些疑问 :
- 如果没有 WS-Federation 会发生什么?
- 单点登录有什么帮助?
- WS-Trust 和 WS-Federation 有什么区别?
我只想在现实世界中以非常简单易懂的样本来回答!我读了很多,但我无法深入理解
谢谢
c# - 为什么我的 STS 客户端会出现此错误?“无法解析 'type' 属性的值。验证 'issuerNameRegistry 的 type 属性...”
我经常遇到这个错误,我的努力没有任何结果。错误 :
ID8030: 'type' 属性的值无法解析。请验证 'issuerNameRegistry type="Webapp1.TrustedIssuerNameRegistry,webapp1" 元素的 type 属性是否正确。
这是我的 TrustedIssuerNameRegistry 类:
这是我的 web.config 配置:
asp.net-mvc-4 - VS2013 & MVC 4 -How to setup thinktecture Embedded STS
I am running a project that used the local STS in VS2012 after upgrading to 2013. Now I find out that VS2013 doesn't have a builtin STS server anymore. Looking for alternatives I found this
http://www.nuget.org/packages/Thinktecture.IdentityModel.EmbeddedSts/
I follow the instructions here https://github.com/thinktecture/Thinktecture.IdentityModel/wiki/EmbeddedSts
But it doesn't seem to work. I'm guessing I have to add a Route to my MVC routes or somekind of ignore or something to get it working right.
So has anyone got it working with MVC?