Skip to content

Commit a90f2f1

Browse files
committed
feat: add allow_duplicate_certs config
1 parent 981bc95 commit a90f2f1

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ The following environment variables are supported:
114114
| Name | Usage / Default |
115115
|---------------------------------------------| --------------- |
116116
| __AUTOSIGN__ | Whether or not to enable autosigning on the openvoxserver instance. Valid values are `true`, `false`, and `/path/to/autosign.conf`.<br><br>Defaults to `true`. |
117+
| __CA_ALLOW_DUPLICATE_CERTS__ | Whether or not the CA accepts a new CSR for a certname that already has a signed certificate. Valid values are `true` and `false`. Does nothing unless `CA_ENABLED=true`.<br><br>Defaults to `false` |
117118
| __CA_ALLOW_SUBJECT_ALT_NAMES__ | Whether or not SSL certificates containing Subject Alternative Names should be signed by the CA. Does nothing unless `CA_ENABLED=true`.<br><br>Defaults to `false` |
118119
| __CA_ENABLED__ | Whether or not this openvoxserver instance has a running CA (Certificate Authority)<br><br>Defaults to `true` |
119120
| __CA_HOSTNAME__ | The DNS hostname for the openvoxserver running the CA. Does nothing unless `CA_ENABLED=false`<br><br>Defaults to `puppet` |

openvoxserver/files/container-entrypoint.d/90-ca.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ EOF
4040
else
4141
# we are the CA
4242
config_set server ca_ttl "${CA_TTL}" ca_server "${CA_HOSTNAME}" ca_port "${CA_PORT}"
43+
ca_allow_duplicate_certs="${CA_ALLOW_DUPLICATE_CERTS:-false}"
44+
case "${ca_allow_duplicate_certs}" in
45+
true|false)
46+
config_set server allow_duplicate_certs "${ca_allow_duplicate_certs}"
47+
;;
48+
*)
49+
echo "Error: CA_ALLOW_DUPLICATE_CERTS must be true or false"
50+
exit 99
51+
;;
52+
esac
4353
hocon -f /etc/puppetlabs/puppetserver/conf.d/ca.conf \
4454
set certificate-authority.allow-subject-alt-names "${CA_ALLOW_SUBJECT_ALT_NAMES}"
4555

0 commit comments

Comments
 (0)