Skip to content

Correct clientcert value in pg_hba.conf for Postgresql >= 12#380

Merged
h0tw1r3 merged 3 commits into
puppetlabs:mainfrom
jhunt-steds:postgres-ssl-clientcert-fix
Feb 9, 2024
Merged

Correct clientcert value in pg_hba.conf for Postgresql >= 12#380
h0tw1r3 merged 3 commits into
puppetlabs:mainfrom
jhunt-steds:postgres-ssl-clientcert-fix

Conversation

@jhunt-steds

Copy link
Copy Markdown
Contributor

12 and up, that is.

PuppetDB 8.0.0 requires Postgresql 14 or later, but starting in 12 the syntax for the clientcert option in pg_hba.conf changed. This PR implements the new syntax when a newer version of Postgresql is requested by the user.

@jhunt-steds jhunt-steds requested review from a team, bastelfreak and smortex as code owners January 11, 2024 21:18
@CLAassistant

CLAassistant commented Jan 11, 2024

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@bastelfreak

Copy link
Copy Markdown
Collaborator

@jhunt-steds thanks for the PR, can you please rebase?

@jhunt-steds jhunt-steds closed this Feb 5, 2024
@jhunt-steds jhunt-steds force-pushed the postgres-ssl-clientcert-fix branch from d3f3435 to 66737ab Compare February 5, 2024 16:06
@jhunt-steds jhunt-steds reopened this Feb 5, 2024
@jhunt-steds

Copy link
Copy Markdown
Contributor Author

Sorry, I apparently did the rebase in some wrong way that closed the PR for some reason; I'm not really a developer and don't understand git well, but it at least does apply cleanly now I think.

@jhunt-steds

Copy link
Copy Markdown
Contributor Author

Apologies again, it appears I forgot to run the linter/tests after my rebase yesterday. Everything should be correct now.

Comment thread manifests/database/postgresql_ssl_rules.pp Outdated
@jhunt-steds

jhunt-steds commented Feb 9, 2024

Copy link
Copy Markdown
Contributor Author

Looks like the failing checks were the result of some network error rather than the changes themselves. Both contain a Ruby stack trace from the first test that has this line:

/home/runner/work/puppetlabs-puppetdb/puppetlabs-puppetdb/vendor/bundle/ruby/2.7.0/gems/net-ssh-7.2.1/lib/net/ssh/buffered_io.rb:64:in `recv': Connection reset by peer - recvfrom(2) (Errno::ECONNRESET)

@h0tw1r3 h0tw1r3 merged commit be7e320 into puppetlabs:main Feb 9, 2024
@h0tw1r3 h0tw1r3 changed the title use the correct value for clientcert in pg_hba.conf for Postgresql 12 Correct clientcert value in pg_hba.conf for Postgresql >= 12 Feb 15, 2024
@h0tw1r3 h0tw1r3 added the bugfix label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants