Install tool for managing ACME provisioner
This commit is contained in:
parent
f07e6708e3
commit
1164b59747
2 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# When initializing step-ca with the docker flag DOCKER_STEPCA_INIT_ACME
|
||||||
|
# a basic ACME provisioner is enabled. This script runs commands to modify the
|
||||||
|
# default configuration.
|
||||||
|
|
||||||
|
# Enable forceCN if not set.
|
||||||
|
# This is needed because certbot does not include a
|
||||||
|
# Subject CN field in the CSR:
|
||||||
|
# https://github.com/certbot/certbot/issues/9633#issuecomment-1484988078
|
||||||
|
# ... and the Mosquitto MQTT server uses the Subject CN in ACL filters.
|
||||||
|
#
|
||||||
|
# Ideally Mosquitto would learn to look at the SAN field instead:
|
||||||
|
# https://github.com/eclipse-mosquitto/mosquitto/issues/2511
|
||||||
|
if [ "$(step ca provisioner list | jq -r '.[] | select (.name == "acme") | .forceCN')" = "null" ]; then
|
||||||
|
step ca provisioner update acme --force-cn --admin-subject=step --admin-provisioner=admin --admin-password-file=/opt/step-ca/init/secrets/provisioner-password
|
||||||
|
fi
|
|
@ -59,6 +59,14 @@ class cdn::ca(
|
||||||
content => file('cdn/ca/bootstrap-client'),
|
content => file('cdn/ca/bootstrap-client'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { '/opt/step-ca/init/scripts/configure-acme':
|
||||||
|
ensure => file,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0755',
|
||||||
|
content => file('cdn/ca/configure-acme'),
|
||||||
|
}
|
||||||
|
|
||||||
file { '/opt/step-ca/init/deb':
|
file { '/opt/step-ca/init/deb':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
|
|
Loading…
Add table
Reference in a new issue