Skip to content

Commit

Permalink
Merge pull request #94 from tuxmea/certificate_whitelist
Browse files Browse the repository at this point in the history
Add possibility to manage certificate_allowlist
  • Loading branch information
tuxmea authored Jan 16, 2025
2 parents 39fcb72 + da1271b commit 45e2aa3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ docker pull ghcr.io/voxpupuli/puppetdb:7.13.0-v1.2.1
| **PUPPETDB_NODE_PURGE_TTL** | Automatically delete nodes that have been deactivated or expired for the specified amount of time<br><br>`14d` |
| **PUPPETDB_REPORT_TTL** | Automatically delete reports that are older than the specified amount of time<br><br>`14d` |
| **PUPPETDB_JAVA_ARGS** | Arguments passed directly to the JVM when starting the service<br><br>`-Djava.net.preferIPv4Stack=true -Xms256m -Xmx256m -XX:+UseParallelGC -Xlog:gc*:file=$LOGDIR/puppetdb_gc.log -Djdk.tls.ephemeralDHKeySize=2048` |
| **PUPPETDB_CERTIFICATE_ALLOWLIST** | Comma separated list of certnames. No whitespaces!<br><br>example: `certname1,certname2,certname3`, default: empty string |
| **LOGDIR** | Path of the log directory<br><br>`/opt/puppetlabs/server/data/puppetdb/logs` |
| **SSLDIR** | Path of the SSL directory<br><br>`/opt/puppetlabs/server/data/puppetdb/certs` |

Expand Down
1 change: 1 addition & 0 deletions puppetdb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ENV PUPPETDB_POSTGRES_HOSTNAME="postgres" \
PUPPETDB_NODE_TTL=7d \
PUPPETDB_NODE_PURGE_TTL=14d \
PUPPETDB_REPORT_TTL=14d \
PUPPETDB_CERTIFICATE_ALLOWLIST="" \
# used by entrypoint to determine if puppetserver should be contacted for config
# set to false when container tests are run
USE_PUPPETSERVER=true \
Expand Down
1 change: 1 addition & 0 deletions puppetdb/conf.d/puppetdb.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
puppetdb: {
disable-update-checking: 'true'
certificate-allowlist: '/etc/puppetlabs/puppetdb/conf.d/certificate-allowlist'
}
11 changes: 11 additions & 0 deletions puppetdb/docker-entrypoint.d/30-certificate-allowlist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

if [ "$PUPPETDB_CERTIFICATE_ALLOWLIST" != "" ]; then
IFS=','
for cert in $PUPPETDB_CERTIFICATE_ALLOWLIST; do
echo $cert >> /etc/puppetlabs/puppetdb/conf.d/certificate_allowlist
done
else
touch /etc/puppetlabs/puppetdb/conf.d/certificate_allowlist
fi

0 comments on commit 45e2aa3

Please sign in to comment.