wif

.net n-tier identity & authorization in service architecture

≯℡__Kan透↙ 提交于 2019-12-03 02:48:19
问题 I'm building an application where the requirements seem standard issue (at least to me)... I have a Web.UI based on asp .net mvc & clients from iphone, andriod & blackberry. So the sensible thing to do is to move all my business logic into a services layer that can be accesses over http. This services layer must accept requests with a user context (identity) and in some nice way perform authorization consistently no matter which type of client is communicating with it (I hope?). Over a year a

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

烈酒焚心 提交于 2019-12-02 18:59:52
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 service can do the usual Thread.CurrentPrincipal as IClaimsPrincipal stuff. I found a couple enticing

Is it possible to run WIF without LoadUserProfile = True

旧巷老猫 提交于 2019-12-02 18:29:07
I'm trying to run WIF Relying Party application on a shared host. They will not set the IIS Setting LoadUserProfile to true and as such I'm getting the following error: Message: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating. ExceptionStackTrace: at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope) at Microsoft.IdentityModel.Web.ProtectedDataCookieTransform.Encode(Byte[

What is this line of code ViewBag.RoleId = new SelectList(RoleManager.Roles, “Id”, “Name”)

给你一囗甜甜゛ 提交于 2019-12-02 17:45:50
问题 I find in a code example downloaded the following line of code in an Action method of a controller. ViewBag.RoleId = new SelectList(RoleManager.Roles, "Id", "Name") or probably its async version ViewBag.RoleId = new SelectList(await RoleManager.Roles.ToListAsync(), "Id", "Name"); I am not able to fathom whats happening here. Also in the corresponding view, I nowhere see ViewBag.RoleId being used. Instead I find in the view @Html.DropDownList("RoleId","No Roles") There appears to be some

Installing a WIF Runtime for hosting a .NET application in Windows Azure

丶灬走出姿态 提交于 2019-12-02 12:42:18
问题 I developed a Custom application that is able to consume the CRM Web services and perform Windows Live Id authentication, create, read and update operation in the CRM from the custom .NET page. It runs absolutely fine when I debug the application in Visual Studio 2010 but when I deploy the same application and try to authenticate it shows the following error: "Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of

Add STS reference gives error: “The security token service descriptor does not contain any key descriptors”

限于喜欢 提交于 2019-12-02 10:56:25
问题 When adding an STS reference, I input the my windows azure federation metadata URL and it gives me the error in the title. It works if I create a new namespace, but a lot of stuff is configured on the current namespace, so I can't delete it. 回答1: So for anyone that would get this error, it's a simple fix. You need a X.509 certificate configured as primary in your ACS namespace. To do this you go under your acs configurations, in certificates and keys then you add a X.509 by uploading a .pfx

What is this line of code ViewBag.RoleId = new SelectList(RoleManager.Roles, “Id”, “Name”)

佐手、 提交于 2019-12-02 09:28:14
I find in a code example downloaded the following line of code in an Action method of a controller. ViewBag.RoleId = new SelectList(RoleManager.Roles, "Id", "Name") or probably its async version ViewBag.RoleId = new SelectList(await RoleManager.Roles.ToListAsync(), "Id", "Name"); I am not able to fathom whats happening here. Also in the corresponding view, I nowhere see ViewBag.RoleId being used. Instead I find in the view @Html.DropDownList("RoleId","No Roles") There appears to be some trivial connection between the two. Can someone throw some light at whet I am missing. The following is the

WIF STS ID3242: The security token could not be authenticated or authorized

谁说胖子不能爱 提交于 2019-12-02 08:28:44
问题 I'm getting the following error in my client application when it tries to authenticate to my service: ID3242: The security token could not be authenticated or authorized Here is the configuration of the client: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <ws2007HttpBinding> <binding name="stsBinding"> <security mode="Message"> <message clientCredentialType="UserName" establishSecurityContext="false" negotiateServiceCredential="true"/> </security> <

Passing URL parameters from Azure ACS to my custom Identity Provider?

眉间皱痕 提交于 2019-12-02 07:43:28
We're developing a custom identity Provider(STS) to authenticate our applications. In this project we're using the Azure Acesses Control Services 2.0 and our Identity provider is a wsfederation. So, when starting the project, the azure ACS has had a url parameter called wctx, this parameter served to pass anything, and the ACS keeping the parameter when de ACS redirect to Identity provider, however now the parameter's value is encrypted when the login page is open, so we can't read. I'd like to pass a culture and who is calling the login page. Anybody have any ideia? The wctx parameter should

Error “WIF10201: No valid key mapping found” when trying to create claims from SAML

风流意气都作罢 提交于 2019-12-02 07:18:56
I am trying to validate a SAML response which is coming from Siteminder IDP from a third party. I have installed the certificate provided by them. When I call the ValidateToken method (System.IdentityModel.Tokens) to create claims, I get following error : WIF10201: No valid key mapping found for securityToken:'System.IdentityModel.Tokens.X509SecurityToken' and issuer: 'issuer uri' I dug in deep to find the error and its being thrown by method GetIssuerName (System.IdentityModel.Tokens). Where is the problem? I googled for this issue but didn't find anything specific to my case. Does the SAML