wif

How to authenticate a request from a c# application to a WIF enabled ASP.NET WebApi application using a SAML assertion

混江龙づ霸主 提交于 2019-12-03 21:45:41
I have setup ThinkTecture identity server as a STS, Have setup a web api project, and used the "identity and access" tool in visual studio and pointed it to my federation metadata to enable federated authentication using WIF. This is what the related portion of web.config looks like: <system.identityModel> <identityConfiguration saveBootstrapContext="true"> <audienceUris> <add value="http://localhost:41740/" /> </audienceUris> <securityTokenHandlers> <add type="System.IdentityModel.Tokens.SamlSecurityTokenHandler, System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken

Programatically Configuring federatedAuthentication element in microsoft.identityModel on asp.net application

我们两清 提交于 2019-12-03 15:17:43
I am trying to programatically generate the following configuration contained inside the microsoft.identityModel configuration. <federatedAuthentication> <wsFederation passiveRedirectEnabled="false" requireHttps="true" issuer="https://IssuedByFoo.com" realm="http://Foo.com/" /> <cookieHandler requireSsl="true" path="/" /> </federatedAuthentication> So far I have not been able to successfully configure this. I have tried setting the following in application_Start but I get an error message when I try to federate "ID5002: The Issuer property on the FederatedPassiveSignIn control must be set to

Secure WebAPI with a JWT

≡放荡痞女 提交于 2019-12-03 14:35:15
I'm trying to write a mobile application that will get data from a webapi rest based site. The site should be secured via ACS (as there can be multiple identity providers). My mobile app is currently querying the following url https://xx.accesscontrol.windows.net/v2/metadata/IdentityProviders.js?protocol=javascriptnotify&realm=http://xx.azurewebsites.net/&version=1.0 to get a list of IPs. I then allow the user to choose an IP, and then using a web browser control I show them a login. Once the user has logged in I capture the response and extract the token, but now I'm not really sure what I

How do you pass a (Claims) security Token to a WIF enable WCF service

给你一囗甜甜゛ 提交于 2019-12-03 13:54:27
I am curious to find out how we could possibly send a Security token from a WIF application that has already been authenticate to a WIF enabled WCF Service. Any assistance will be appriciated The answer is not simple but the following steps constitute the 'recommended pattern' and are documented in the following MSDN article: Identity Delegation with AD FS 2.0 Step-by-Step Guide In summary Allow you web application access to a special token (Bootstrap Token) that can be used to request services on behalf of the user who has authenticated using an STS by adding an item in the web.config:

How to hold the cookies claims updated with MCV5/OWIN

浪子不回头ぞ 提交于 2019-12-03 13:23:30
We’re working on an OWIN MVC5 project. We use an own implementation of IUserStore<T> to integrate the user-management which is part of our companies framework. So far this works fine. We want to provide role membership and other security configuration through claims. I have seen (and quickly tested) the ways of either implementing IUserClaimStore<T> or of attaching a ClaimsIdentityFactory to the UserManager. In both scenarios, I see the issue that the claims are stored in the user’s cookie and when a role or another claim changes behind the web app (through another application which directly

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

蓝咒 提交于 2019-12-03 12:53:24
问题 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

Exclude specific path from WIF authorization in a ASP.NET MVC 4 project

江枫思渺然 提交于 2019-12-03 11:36:38
We have successfully configured windows identity foundation (WIF) in our ASP.NET 4.5 MVC 4 project with the help of the Identity and Access... extension for Visual Studio 2012. But are unable to exclude a specific path from authorization to allow anonymous access. When we access our default route (i.e. /Home ), the passive redirection will redirect us to the configured issuer Uri. This is currect. But now assume we want to exclude Path /Guest from STS Authentication so that everybody can access http://ourhost/Guest without beeing routed to the STS issuer. Only static documents are located

.NET Claim in three namespaces

放肆的年华 提交于 2019-12-03 10:04:51
Now this is odd. After completing some research on claims based solutions in .NET, found that different authors refer to different classes in .NET namespace when actually speaking on the same matter. Claim class (not to mention other Identity, Principal, Manager, Helper classes around) is defined in 3 different namespaces. It is clear that WIF is separate add-on for .NET 3.5 and 4.0 and that it is rewritten and made part of core in 4.5. However it could really help to have clear directions on what class to use for new projects (so that port to 4.5 after could be easier). Does anybody else have

Microsoft.IdentityModel vs System.IdentityModel

ⅰ亾dé卋堺 提交于 2019-12-03 09:50:22
I'm working on a claims-based authorization system using Forms Authentication and ASP.NET MVC 2. I see that one namespace "Microsoft.IdentityModel" provides a lot of the same things as the other "System.IdentityModel". System.IdentityModel Microsoft.IdentityModel Why do these 2 namespaces exist seperately, when the functionality appears to overlap? If you are using Claims Based authentication/authorization, then you will need to use Microsoft.IdentityModel as that is part of the Windows Identity Framework. For guidance around MVC2 and using WIF I would recommend checking out the work that

How do I move federationConfiguration out of web.config and to some custom config file and load it dynamically by code

こ雲淡風輕ζ 提交于 2019-12-03 08:52:15
I have my configuration in web.config and it works fine. <configuration> <system.identityModel.services> <federationConfiguration> .... </federationConfiguration> </system.identityModel.services> </configuration> How do I move this out of web.config to a custom config file and load it from code? I want to use the same structure of this configuration so that I do not have to change anything in code if I have to change this configuration file. You can tap into the WIF event from your global.asax void Application_Start(object sender, EventArgs e) { // Code that runs on application startup