Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
728 views
in Technique[技术] by (71.8m points)

identityserver4 - Tips for Running IdentityServer 4 in a load balanced environment

There is already a question there on this topic but there is no answer to it hence a new question to @gilm0079 for his views in case if has overcome this problem

Tips for running IdentityServer4 in a web farm

I know its a quite old post but wondering how you managed to get this working or and also what the issue was. And if so you could share your experience would be great help

On top of persisting the keys in redis, do you need load balancer to use sticky sessions?

And any other consideration?

question from:https://stackoverflow.com/questions/65858123/tips-for-running-identityserver-4-in-a-load-balanced-environment

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can run IdentityServer4 in load balanced and auto-scaled environment. Requirements here are :

  1. To have the same signing certificate across all instances of IdentityServer. You can create a X.509 certificate and store that in shared secret storage (e.g. vault) and let instances refer the same.
  2. To have persistent shared storage for keys. There are different storage options like redis, database or you can implement your custom key provider. See here: https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/implementation/key-storage-providers?view=aspnetcore-5.0&tabs=visual-studio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...