Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up certificate authority in herdbook server#37 #459

Open
jhagberg opened this issue Oct 25, 2021 · 1 comment
Open

Set up certificate authority in herdbook server#37 #459

jhagberg opened this issue Oct 25, 2021 · 1 comment

Comments

@jhagberg
Copy link
Collaborator

  • The CA should be only readable by the process of the webserver
  • Create the root certificate will belong to Gotlandskaninen or NBIS?
  • It should be a RSA key, no matter size

How to handle CA renewals?

@jhagberg
Copy link
Collaborator Author

E.g. (from another repo):

#!/bin/bash

mkdir -p config &&
openssl req -x509 -nodes -days 365
-newkey rsa:2048 -sha256
-subj '/O=root'
-keyout config/cakey
-out config/cacert

openssl req -nodes -new -days 365 -newkey rsa:2048
-sha256 -subj '/CN=localhost'
-keyout config/key
-out config/cert.csr

openssl x509 -req -CAcreateserial -sha256
-CA config/cacert
-CAkey config/cakey
-in config/cert.csr
-out config/cert

openssl req -nodes -new -days 365 -newkey rsa:2048
-sha256 -subj '/CN=database'
-keyout config/key2
-out config/cert2.csr

openssl x509 -req -CAcreateserial -sha256
-CA config/cacert
-CAkey config/cakey
-in config/cert2.csr
-out config/cert2

cat config/key config/cert > config/combined
cat config/key2 config/cert2 > config/combined2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant