DEV Community

Martin Alfke for betadots

Posted on

Verlängerung der Puppet CA

Puppet verschlüsselt Verbindungen mit einer selbst-signierten OpenSSL basieten CA.
Diese hat üblicherweise eine Laufzeit von 5 Jahren. Bei der initialen Installation kann man dies über eine Konfigurationseinstellung ändern:

puppet config set --section server ca_ttl 10y

Bei Bestandsinstallationen kann man die CA im laufenden Betrieb verlängern.
Im Slack Puppet Community Channel hat Neeloy z.B. ein Script veröffentlicht:

cd /etc/puppetlabs/puppet/ssl/ca
(openssl rsa -noout -modulus -in ca_key.pem  2> /dev/null | openssl md5 ; openssl x509 -noout -modulus -in ca_crt.pem  2> /dev/null | openssl md5 )
# Generate new CSR
openssl x509 -x509toreq -in ca_crt.pem -signkey ca_key.pem -out ca_csr.pem
# Sign
cat > extension.cnf << EOF
[CA_extensions]
basicConstraints = critical,CA:TRUE
nsComment = "Puppet Ruby/OpenSSL Internal Certificate"
keyUsage = critical,keyCertSign,cRLSign
subjectKeyIdentifier = hash
EOF
cp ca_crt.pem ca_crt.pem.old
openssl x509 -req -days 3650 -in ca_csr.pem -signkey ca_key.pem -out ca_crt.pem -extfile extension.cnf -extensions CA_extensions
openssl x509 -in ca_crt.pem -noout -text|grep -A 3 Validity
chown -R puppet: ./*
cd /etc/puppetlabs/puppet/ssl
cp -a ca/ca_crt.pem certs/ca.pem
Enter fullscreen mode Exit fullscreen mode

Alternativ kann man das Puppet ca_extend Modul verwenden, welches die CA Verlängerung mit Hilfe von Bolt Tasks und Plans realisiert.

Viel Erfolg bei der weiteren Nutzung von Puppet.

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up