Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow setting certificate allowlist #4

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Loading