Skip to content

Commit

Permalink
Merge pull request #104 from voxpupuli/fix_certificate_allow_list
Browse files Browse the repository at this point in the history
only set certificate-allowlist if configured
  • Loading branch information
rwaffen authored Feb 4, 2025
2 parents e072b8d + d959c85 commit c5387eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion puppetdb/conf.d/puppetdb.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
puppetdb: {
disable-update-checking: 'true'
certificate-allowlist: certificate-allowlist
}
7 changes: 5 additions & 2 deletions puppetdb/docker-entrypoint.d/30-certificate-allowlist.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/bin/bash

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

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

0 comments on commit c5387eb

Please sign in to comment.