This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
opensearch:generating_certificates [2023/01/31 21:59] – Added the content olaf | opensearch:generating_certificates [2023/02/01 00:06] (current) – ↷ Links adapted because of a move operation olaf | ||
---|---|---|---|
Line 14: | Line 14: | ||
=== Create the CA certificate === | === Create the CA certificate === | ||
Generate a RSA key with 2048 bit length | Generate a RSA key with 2048 bit length | ||
- | <code bash> | + | <code bash> |
Generate a Root CA certificate signed with the gerated key valid for 5 years\\ | Generate a Root CA certificate signed with the gerated key valid for 5 years\\ | ||
At the end, it's only importnant that CN has a value - else possession of the key is important to sign client certificates | At the end, it's only importnant that CN has a value - else possession of the key is important to sign client certificates | ||
- | <code bash> | + | <code bash> |
=== Create a certificate for the admin user === | === Create a certificate for the admin user === | ||
- | <code bash> | + | <code bash> |
Convert the key to PKCS#8 | Convert the key to PKCS#8 | ||
- | <code bash> | + | <code bash> |
#Create a CSR | #Create a CSR | ||
- | <code bash> | + | <code bash> |
#Sign the CSR | #Sign the CSR | ||
- | <code bash> | + | <code bash> |
=== Create the certificate for the node === | === Create the certificate for the node === | ||
- | openssl genrsa -out deb11-os-01-key-temp.pem 2048</ | + | openssl genrsa -out node-01-key-temp.pem 2048</ |
- | # convert | + | Convert the key format |
- | openssl pkcs8 -inform PEM -outform PEM -in deb11-os-01-key-temp.pem -topk8 -nocrypt -v1 PBE-SHA1-3DES -out deb11-os-01-key.pem</ | + | openssl pkcs8 -inform PEM -outform PEM -in node-01-key-temp.pem -topk8 -nocrypt -v1 PBE-SHA1-3DES -out node-01-key.pem</ |
- | # Create CSR | + | Create |
- | openssl req -new -key deb11-os-01-key.pem -subj "/C=BE/ST=Hainaut/L=Mons/O=Olafs Lab/OU=IT/CN=deb11-os-01" | + | openssl req -new -key node-01-key.pem -subj "/C=US/ST=TX/L=Dallas/O=TheBigBadWolf/OU=SheepPR/CN=node-01" |
Create an extension file containing the Subject Alternate Names (SAN): | Create an extension file containing the Subject Alternate Names (SAN): | ||
<code bash> | <code bash> | ||
- | cat > deb11-os-01.ext | + | cat > node-01.ext |
subjectAltName = @SAN | subjectAltName = @SAN | ||
[SAN] | [SAN] | ||
- | DNS.1 = deb11-os-01 | + | DNS.1 = node-01 |
- | IP.1 = 10.68.100.27 | + | IP.1 = 1.1.1.127 |
</ | </ | ||
after the last line press < | after the last line press < | ||
Generate the cerificate for the node | Generate the cerificate for the node | ||
- | <code bash> | + | <code bash> |
change the owner and permissions of the generated certificates and keys | change the owner and permissions of the generated certificates and keys | ||
Line 54: | Line 54: | ||
</ | </ | ||
- | Back to [[opensearch: | + | Back to [[opensearch: |