Skip to content

Commit

Permalink
Merge pull request #4 from OpenVoxProject/add_certificate_allowlist
Browse files Browse the repository at this point in the history
allow setting certificate allowlist
  • Loading branch information
rwaffen authored Feb 4, 2025
2 parents d87e31a + 23d4d50 commit a03091d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ podman pull ghcr.io/openvoxproject/openvoxdb:8.9.0-v1.2.3
| **DNS_ALT_NAMES** | Additional DNS names to add to the services SSL certificate<br><br>Unset |
| **WAITFORCERT** | Number of seconds to wait for certificate to be signed<br><br>`120` |
| **USE_OPENVOXSERVER** | Set to `false` to skip acquiring SSL certificates from a Puppet Server.<br><br>`true` |
| **OPENVOXDB_CERTIFICATE_ALLOWLIST** | Set to a comma seaprated list of allowed certnames.<br><br>`""` |
| **OPENVOXSERVER_HOSTNAME** | The DNS hostname of the puppet server<br><br>`puppet` |
| **OPENVOXSERVER_PORT** | The port of the puppet server<br><br>`8140` |
| **OPENVOXDB_POSTGRES_HOSTNAME** | The DNS hostname of the postgres service<br><br>`postgres` |
Expand Down
1 change: 1 addition & 0 deletions openvoxdb/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ ENV CERTNAME="openvoxdb" \
OPENVOXDB_REPORT_TTL=14d \
OPENVOXDB_POSTGRES_USER=openvoxdb \
UBUNTU_VERSION="24.04" \
OPENVOXDB_CERTIFICATE_ALLOWLIST="" \
USE_OPENVOXSERVER=true \
WAITFORCERT=""

Expand Down
14 changes: 14 additions & 0 deletions openvoxdb/docker-entrypoint.d/30-certificate-allowlist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

hocon() {
/opt/puppetlabs/puppet/lib/ruby/vendor_gems/bin/hocon "$@"
}

if [ "$OPENVOXDB_CERTIFICATE_ALLOWLIST" != "" ]; then
hocon -f /etc/puppetlabs/puppetdb/conf.d/puppetdb.conf set puppetdb.certificate-allowlist certificate-allowlist
IFS=','
for cert in $OPENVOXDB_CERTIFICATE_ALLOWLIST; do
echo $cert >> /opt/puppetlabs/server/apps/puppetdb/certificate-allowlist
done
fi

0 comments on commit a03091d

Please sign in to comment.