Skip to content

feat: add data:pg:get-ca - #3880

Draft
jdowning wants to merge 2 commits into
mainfrom
feature/data-pg-get-ca
Draft

feat: add data:pg:get-ca#3880
jdowning wants to merge 2 commits into
mainfrom
feature/data-pg-get-ca

Conversation

@jdowning

Copy link
Copy Markdown
Member

Summary

This PR adds a data:pg:get-ca command to help assist customers with obtaining the certificate authority for Essential and Advanced Postgres. This will permit verifiable TLS client connections.

Type of Change

Breaking Changes (major semver update)

  • Add a ! after your change type to denote a change that breaks current behavior

Feature Additions (minor semver update)

  • feat: Introduces a new feature to the codebase

Patch Updates (patch semver update)

  • fix: Bug fix
  • deps: Dependency upgrade
  • revert: Revert a previous commit
  • chore: Change that does not affect production code
  • refactor: Refactoring existing code without changing behavior
  • test: Add/update/remove tests

Testing

Notes:

❯ bin/run data:pg:get-ca --region virginia
RDS CA bundle retrieved successfully: /Users/jdowning/.postgres/us-east-1-bundle.pem

❯ psql "`h config:get TEST_URL -a jd23`?sslmode=verify-full&sslrootcert=$HOME/.postgres/us-east-1-bundle.pem"

Steps:

  1. Replace this text with a list of steps used to validate changes or type 'Passing CI suffices'.
  2. ...

Screenshots (if applicable)

Related Issues

GitHub issue: #[GitHub issue number]
GUS work item: [WI number](WI link)

@jdowning
jdowning deployed to AcceptanceTests August 19, 2026 22:25 — with GitHub Actions Active
@jdowning
jdowning deployed to AcceptanceTests August 19, 2026 22:25 — with GitHub Actions Active
@jdowning
jdowning deployed to AcceptanceTests August 19, 2026 22:25 — with GitHub Actions Active
@jdowning
jdowning deployed to AcceptanceTests August 19, 2026 22:25 — with GitHub Actions Active
Comment on lines +40 to +44
if (process.platform === 'win32') {
if (!process.env.APPDATA) throw new Error('APPDATA is not set; unable to determine the PostgreSQL certificate directory.')

return path.join(process.env.APPDATA, 'postgresql')
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

destinationDirectory is stubbed in all tests, so nothing truly exercises this code path in ci. I guess it will likely work... should we have a flag for customers to define the destination directory in case of issues or alternative install directories?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re: the stubbing, maybe we just don't stub the destinationDirectory. We test across windows, osx, ubuntu boxes and I think this may "just" work unstubbed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants