medal-hub-step-ca-setup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
medal-hub-step-ca-setup [2021/12/28 09:32] – arnaud_poletto | medal-hub-step-ca-setup [2022/01/10 14:50] (current) – removed arnaud_poletto | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== medAL-hub Self-signed Certificates with Step-ca Setup ====== | ||
- | ===== Purpose and Scope ===== | ||
- | |||
- | In this page, you will learn how to generate self-signed certificates with step-ca. | ||
- | |||
- | |||
- | |||
- | |||
- | ===== Prerequisite ===== | ||
- | |||
- | You should have setup a Raspberry Pi to work as a medAL-// | ||
- | |||
- | |||
- | |||
- | |||
- | ===== Step-ca Installation ===== | ||
- | |||
- | Run the following commands to install step-ca: | ||
- | < | ||
- | wget https:// | ||
- | sudo dpkg -i step-cli_0.15.14_amd64.deb | ||
- | wget https:// | ||
- | sudo dpkg -i step-ca_0.15.11_amd64.deb | ||
- | </ | ||
- | |||
- | |||
- | |||
- | |||
- | ===== Generating Certificates ===== | ||
- | |||
- | ==== Certificate Authority Setup ==== | ||
- | |||
- | Run the command: | ||
- | < | ||
- | step ca init | ||
- | </ | ||
- | |||
- | Then, answer the questions that appear. The domain name is the CA server domain name, not the domain name of the hub. Make sure to remember the password, it will be required for generating the certificates. | ||
- | < | ||
- | What would you like to name your new PKI? | ||
- | ✔ (e.g. Smallstep): Dynamic | ||
- | What DNS names or IP addresses would you like to add to your new CA? | ||
- | ✔ (e.g. ca.smallstep.com[, | ||
- | What IP and port will your new CA bind to? | ||
- | ✔ (e.g. :443 or 127.0.0.1: | ||
- | What would you like to name the CA's first provisioner? | ||
- | ✔ (e.g. you@smallstep.com): | ||
- | Choose a password for your CA keys and first provisioner. | ||
- | ✔ [leave empty and we'll generate one]: | ||
- | |||
- | Generating root certificate... | ||
- | ✔ Would you like to overwrite / | ||
- | all done! | ||
- | |||
- | Generating intermediate certificate... | ||
- | ✔ Would you like to overwrite / | ||
- | all done! | ||
- | |||
- | ✔ Root certificate: | ||
- | ✔ Root private key: / | ||
- | ✔ Root fingerprint: | ||
- | ✔ Intermediate certificate: | ||
- | ✔ Intermediate private key: / | ||
- | ✔ Would you like to overwrite / | ||
- | ✔ Would you like to overwrite / | ||
- | ✔ Database folder: / | ||
- | ✔ Default configuration: | ||
- | ✔ Certificate Authority configuration: | ||
- | |||
- | Your PKI is ready to go. To generate certificates for individual services see 'step help ca'. | ||
- | </ | ||
- | |||
- | After this step, a file '' | ||
- | Before we launch the server, we have to make changes in '' | ||
- | < | ||
- | sudo nano ~/ | ||
- | </ | ||
- | |||
- | < | ||
- | " | ||
- | " | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | ... | ||
- | }, | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | ] | ||
- | }, | ||
- | </ | ||
- | |||
- | Generating the server certificate and key | ||
- | We can now launch the CA server | ||
- | step-ca $(step path)/ | ||
- | |||
- | We can now request a certificate (this command should be run in a new terminal tab). This commands creates two files, srv.crt and srv.key. This is the certificate/ | ||
- | step ca certificate < |
medal-hub-step-ca-setup.1640680333.txt.gz · Last modified: 2021/12/28 09:32 by arnaud_poletto