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

(PDB-4764) Agent SSL certificates are used for communication with PostgreSQL #322

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

Filipovici-Andrei
Copy link
Contributor

Updated the manifests for SSL configuration of PostgreSQL database configuration file.

@Filipovici-Andrei Filipovici-Andrei requested a review from a team as a code owner March 3, 2021 15:47
@puppet-community-rangefinder
Copy link

puppetdb_conn_validator is a type

Breaking changes to this file MAY impact these 1 modules (near match):

puppetdb::database::postgresql is a class

that may have no external impact to Forge modules.

puppetdb is a class

Breaking changes to this file WILL impact these 5 modules (exact match):
Breaking changes to this file MAY impact these 3 modules (near match):

puppetdb::params is a class

that may have no external impact to Forge modules.

This module is declared in 33 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

manifests/server/database.pp Outdated Show resolved Hide resolved
manifests/params.pp Show resolved Hide resolved
Copy link
Contributor

@austb austb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To document the settings I had to add for client authentication I wanted to add these here

pg_hba.conf

# Rule Name: Allow certificate mapped connections to pe-puppetdb as pe-puppetdb (ipv4)
# Description: none
# Order: 0
hostssl puppetdb     puppetdb     0.0.0.0/0       cert    map=puppetdb-puppetdb-map clientcert=1

# Rule Name: Allow certificate mapped connections to pe-puppetdb as pe-puppetdb (ipv6)
# Description: none
# Order: 1
hostssl puppetdb     puppetdb     ::/0    cert    map=puppetdb-puppetdb-map clientcert=1

This is a file I forgot about, but pg_ident.conf defines the certificate name to database username mappings

# This file is managed by Puppet. DO NOT EDIT.
puppetdb-puppetdb-map duller-artery.delivery.puppetlabs.net puppetdb

A lot of my configuration to get it working was done manually, so in case I missed anything I've extended the lifetime of duller-artery.delivery.puppetlabs.net in case you want to dig around in the settings.

manifests/server/database.pp Outdated Show resolved Hide resolved
manifests/server/database.pp Show resolved Hide resolved
manifests/database/postgresql.pp Outdated Show resolved Hide resolved
Copy link
Contributor

@austb austb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, I think it could use a couple of basic tests for the important settings, like pg_ident/pg_hba rules, the subname config setting, and the pk8 and then it should be ready to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants