Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
899 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...