identityserver3

How would I generate the Identity Server signing certificate

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 16:46:22
In the identity server samples we find code like this in Startup.cs var certFile = env.ApplicationBasePath + "\\idsrv3test.pfx"; var signingCertificate = new X509Certificate2(certFile, "idsrv3test"); How would I go about replacing this for production scenarios? Get a dedicated cert - either via your PKI or self-generate one: http://brockallen.com/2015/06/01/makecert-and-creating-ssl-or-signing-certificates/ Import the key pair into the Windows certificate store, and load it from there at runtime. To step up security, some people deploy the keys to a dedicated device (called an HSM) or to a

Substitute IdentityServer3 login system

人走茶凉 提交于 2019-12-02 13:43:19
问题 Following @leastprivilege answer in my previous question, I concluded that neither are possible solutions: The login service doesn't support REST authentication (thus, can't use IUserService.AuthenticateLocalAsync and just connect to it) I don't need it to be an additional provider, I need it to substitute IS3 one, ie, instead of showing the local login + additional providers, I need the /login page to be the one from a different service. Can this be customized or do I need to change

Convert a method to use async

眉间皱痕 提交于 2019-12-02 09:06:10
I am converting a authentication process to support async and the VS 2015 IDE is warning me with the following message: The async method lacks 'await' operators and will run synchronously... etc... Anyway, the code connects to a LDAP store and verifies a user's account and etc... I have tried various things with await, but I am just missing something here. I put the code back to what it was before.. I would appreciate any guidance in getting it to support async correctly... Here is the code: public async Task<User> GetAsyncADUser(PrincipalContextParameter param) { try { if

IdentityServer gets into infinite loop of authentication

断了今生、忘了曾经 提交于 2019-12-01 18:41:10
I have the following client set up in IdentityServer: new Client { ClientName = "My web application", Enabled = true, ClientId = "mywebapp", ClientSecrets = new List<ClientSecret> { new ClientSecret("somesecret") }, Flow = Flows.Hybrid, ClientUri = "https://app.mydomain.com", RedirectUris = new List<string> { "oob://localhost/wpfclient", "http://localhost:2672/", "https://app.mydomain.com" } } And it is hosted online, let's say https://auth.mydomain.com/core . Trying to modify the MVC OWIN Client (Hybrid) sample client to log-in to the above identity server, in Startup.cs I modified the

Can Identity Server be used to authenticate a user for various web apps you may be hosting

被刻印的时光 ゝ 提交于 2019-12-01 14:45:25
I'm not really interested in API authentication - all I want to do is authorize a user who has access to one or many applications from a kind of portal I am designing. We are hosting the all the web applications, some are just Javascript and HTML, some are MVC. I have created a diagram below with a user called Bob. He is a valid user and is allowed to use an application called "JS" but not MVC. How can this be implemented using Identity Server. Obviously when inside the JS application it still needs to talk to the Identity Server to make sure the current user is valid or else somebody could

Issue in Self Signed Client Certificate while processing an Identity Server Client Credentials Flow

被刻印的时光 ゝ 提交于 2019-12-01 08:43:19
I created a Self Signed Certificate for my internal development purpose using MakeCert.exe Step #1 : I Created a Root CA using the following Command makecert -n "CN=Bala root signing authority" -cy authority -r -sv root.pvk root.cer Step #2 : Installed the Root CA Certificate which is created in Step #1 using the following Command certutil -user -addstore Root root.cer Step #3 : I Created a Client Certificate using the following Command makecert -pe -n "CN=Bala Client" -a sha1 -cy end ^ -sky signature ^ -ic root.cer -iv root1.pvk ^ -sv Bala.pvk Bala.cer Step #4 : I Created a .pfx file for the

Identity Server 3 User Session Lifetime

六眼飞鱼酱① 提交于 2019-12-01 08:12:40
I'm securing a web app with identity server 3. My app is split into 2 oidc clients a ASP.Net MVC client and a javascript(angular) client which uses the oidc-client javascript library. When a user first visits the web app we redirect for log in to identity server, which logs in the mvc client. The javascript client is then logged in using the silent login feature from the oidc-library. I would like to control how often the user has to visit the logon page to sign in again and I would like to set this so that users have to visit the logon page either once a day or every 8 hours. Is there a

Identity Server 3 User Session Lifetime

谁说胖子不能爱 提交于 2019-12-01 06:50:15
问题 I'm securing a web app with identity server 3. My app is split into 2 oidc clients a ASP.Net MVC client and a javascript(angular) client which uses the oidc-client javascript library. When a user first visits the web app we redirect for log in to identity server, which logs in the mvc client. The javascript client is then logged in using the silent login feature from the oidc-library. I would like to control how often the user has to visit the logon page to sign in again and I would like to

c# Identity Server Bad Request - Request Too Long

冷暖自知 提交于 2019-12-01 01:05:05
I have an odd issue that I am trying to track down. If I deploy my client and Identity Server to Azure, using a self signed certificate then the code works. I have now moved it to our UAT environment, where the identity server is configured to use a purchased certificate. This certificate has been provided for a single domain. identity.mydomain.com The client has the password for this certificate so it can do what it needs to. When I browse to the identity server I can log in to the admin section, so that is all running correctly. If I browse to the client, it redirects to the identity service

OAuth token expiration in MVC6 app

做~自己de王妃 提交于 2019-11-30 11:58:08
So I have an MVC6 app that includes an identity server (using ThinkTecture's IdentityServer3) and an MVC6 web services application. In the web services application I am using this code in Startup: app.UseOAuthBearerAuthentication(options => { options.Authority = "http://localhost:6418/identity"; options.AutomaticAuthentication = true; options.Audience = "http://localhost:6418/identity/resources"; }); Then I have a controller with an action that has the Authorize attribute. I have a JavaScript application that authenticates with the identity server, and then uses the provided JWT token to