1

I looked around IdentityServer4 official GitHub for configuring signing credential (certificate) for production, but i can't find any example. Specific thing for my environment is that it runs on Docker, so i need a cert to be generated in runtime for Linux machine, and then used for validating tokens.

In development mode i use AddDeveloperSigninCertificate helper in Startup.cs and it does the job, but i need a cert for production.

Did anyone have same issue?

Thanks!

zlaayaa
  • 585
  • 2
  • 6
  • 25
  • Possible duplicate of [AddTemporarySigningCredential vs AddSigningCredential in IdentityServer4](https://stackoverflow.com/questions/41572900/addtemporarysigningcredential-vs-addsigningcredential-in-identityserver4) – Schwarzie2478 Oct 15 '18 at 09:38
  • The code already generates a certificate, you can just save one to use in production. – Schwarzie2478 Oct 15 '18 at 09:40
  • question is not about temporary credentials so it is not a duplicate. also, i need credentials for Docker machine, which is specific. also, i asked for some SigninCredentials example from official docs – zlaayaa Oct 15 '18 at 09:43
  • As I understand your question, you want to deploy a certificate with your docker image. Is this not just a question of configuring where to load the file from. I'm running in production on multiple node and I load the certificate from a file on a share using the AddSigningCredential method. How the file gets there, is an docker build configuration step, you can add files to images during the build of an docker image. Am I still missing the point? – Schwarzie2478 Oct 15 '18 at 10:41
  • @Schwarzie2478 yes, but i need to target that file i've added like AddSigningCredential("path_to_file_here"), right? which path from docker container should i set? – zlaayaa Oct 15 '18 at 10:50
  • I'm not a docker expert, you need to somehow map the file to the docker image, This question seems to try to provide all the possibilities for that: https://stackoverflow.com/questions/39388877/adding-files-to-standard-images-using-docker-compose – Schwarzie2478 Oct 15 '18 at 12:21

0 Answers0