wif

How to track expired WIF fedauth cookies?

被刻印的时光 ゝ 提交于 2019-12-03 08:18:33
I have an interesting problem with trying to keep track of expired WIF authentication sessions/cookies. As a bit of background: the site is MVC 3, uses Windows Identity Foundation (WIF) that has a trust with an ADFS server as an STS. The entire site is protected by SSL. The STS has the token expiry set to 60 minutes. When a user signs out manually, we just simply call the SignOut method on the FedAuth module: FederatedAuthentication.WSFederationAuthenticationModule.SignOut(false); This of course removes the FedAuth cookies, but here's where the problem starts. If I capture those cookies with

Authenticating against AD FS from a .Net 4.5 Console App

馋奶兔 提交于 2019-12-03 07:48:24
I'm in the process of getting my head round using AD FS to authenticate a user in a .NET 4.5 app. I can't find any examples of requesting/receiving the token from a console app and converting that token into a ClaimsPrinciple. The only examples I can find are WCF configuration based and I would really like to see the actual code that can do this in it's simplest form. I've installed AD FS and think I've got it configured ready to receive requests. I've created a relying party, given it a key and assigned a couple of claims to it. Can anyone point me in the right direction or what I need to do

How does the “ASP.Net Identity” compare with “Windows Identity Foundation”? [closed]

久未见 提交于 2019-12-03 07:03:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I found this nice article that shows the evolution of the ASP.Net identity frameworks: http://www.asp.net/identity/overview/getting-started/introduction-to-aspnet-identity However, I'm interested in how the Windows Identity Framework (WIF) fits into the picture with the new ASP.Net Identity Framework. Are they

WIF- ID1014: The signature is not valid. The data may have been tampered with

旧城冷巷雨未停 提交于 2019-12-03 06:53:40
I've been using WIF to authenticate our new website, the STS is based upon the starter-sts implementation. To enable this to work correctly on out load balanced environment I've used the following in the global.asax to override the default certificate behaviour. void onServiceConfigurationCreated(object sender, ServiceConfigurationCreatedEventArgs e) { List<CookieTransform> sessionTransforms = new List<CookieTransform>(new CookieTransform[] { new DeflateCookieTransform(), new RsaEncryptionCookieTransform(e.ServiceConfiguration.ServiceCertificate), new RsaSignatureCookieTransform(e

RequestSecurityToken using windows credentials and .net 4.5 WIF

こ雲淡風輕ζ 提交于 2019-12-03 06:44:11
Can anyone point to sample code for actively issuing a RequestSecurityToken using the NT credentials of the Thread.CurrentPrincipal as ClaimsPrincipal ? The scenario is an asp.net web app with windows authentication enabled (so there is an authenticated WindowsIdentity). My desire is to call the STS actively rather than enabling passiveRedirect, and to do this using the .Net 4.5 identity libraries. Most code samples, such as Claims Helper for Windows Phone or Using an Active STS set the credentials with a username/pwd input and UserNameWSTrustBinding. I thought the solution might involve

Wrong Thread.CurrentPrincipal in async WCF end-method

半城伤御伤魂 提交于 2019-12-03 06:30:42
I have a WCF service which has its Thread.CurrentPrincipal set in the ServiceConfiguration.ClaimsAuthorizationManager . When I implement the service asynchronously like this: public IAsyncResult BeginMethod1(AsyncCallback callback, object state) { // Audit log call (uses Thread.CurrentPrincipal) var task = Task<int>.Factory.StartNew(this.WorkerFunction, state); return task.ContinueWith(res => callback(task)); } public string EndMethod1(IAsyncResult ar) { // Audit log result (uses Thread.CurrentPrincipal) return ar.AsyncState as string; } private int WorkerFunction(object state) { // perform

Active and Passive Federation in WIF

拟墨画扇 提交于 2019-12-03 05:51:20
问题 I am trying to understand the difference between Active and Passive federation in WIF. It appears that one would use an Active Federation if the Relying Party (RP) is a WCF Service instead of an ASP.NET application and a Passive Federation if the RP is an ASP.NET application. Is this accurate? So, in a scenario in which an ASP.NET application uses a WCF in the backend, the MS articles suggest using a 'bootstrap' security token that is obtained by the ASP.NET app using an ActAs STS and this

How to convert SAML XML token string to either SecurityToken or ClaimsPrincipal instance?

不羁岁月 提交于 2019-12-03 05:40:46
问题 My context: .Net RESTful web service Client (mixed platforms, technologies, lib capabilities) has obtained a SAML token Trying to accept the token for authentication/authorization in the REST service in HTTP Authorization / X-Authorization header as query parameter Will also support SWT later, but need to get SAML tokens going Details: I have a SAML token in a string: <saml:Assertion xmlns:saml="..." ...> ..etc... </> In an HttpModule, I want to convert this into a ClaimsPrincipal so that my

Message: ID4243: Could not create a SecurityToken. A token was not found in the token cache and no cookie was found in the context

匆匆过客 提交于 2019-12-03 03:31:41
We're getting the exact same error as in this thread ... in our production environment. [ WIF Security Token Caching Does anybody have a fix to this error ? Message: ID4243: Could not create a SecurityToken. A token was not found in the token cache and no cookie was found in the context. Here is some info about our setup: • We‘re using built-in Windows Identity Framework with .NET Framework 4.5.1 • The problem is almost always associated with changing from RelyingParty#X over to RelyingParty#Y ( e.g. the moment user clicks the RP#Y he‘s SIGNED OUT without asking for it ) – when he logs in

Is it possible to get ACS claims without editing web.config?

自闭症网瘾萝莉.ら 提交于 2019-12-03 03:10:05
Is it possible to set up the realm URL, claim types, etc for azure ACS without editing the web.config? Can you set up these required elements programmatically somehow? EDIT: Specifically I want to get rid of this: <federatedAuthentication> <wsFederation passiveRedirectEnabled="true" issuer="https://mynamespace.accesscontrol.windows.net/v2/wsfederation" realm="http://localhost:81/" requireHttps="false" /> </federatedAuthentication> Basically, I don't want the realm being specified in the web config, but rather in code somewhere. I've tried overriding ClaimsAuthenticationManager and commenting