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

Query db for ssl status #84

Merged
merged 4 commits into from
Mar 12, 2020
Merged

Query db for ssl status #84

merged 4 commits into from
Mar 12, 2020

Conversation

nick-mccoy
Copy link
Contributor

@nick-mccoy nick-mccoy commented Mar 5, 2020

Description of change

A recent bug fix ensured that the ssl config parameters is actually used when connecting (#80).

This PR queries the pg_stat_ssl and pg_stat_activity system views to grab the SSL status for the user connected to the db.

This is wrapped in a generic try catch and will log a "Failed to retrieve SSL status" if:

  1. No rows come back that match the user and dbname
  2. More than 1 matching rows come back for the user and dbname
  3. The postgres driver throws an exception

QA steps

  • automated tests passing
  • manual qa steps passing (list below)
  • Turned on/off SSL on a Postgres connection and verified the behavior

Risks

None

Rollback steps

  • revert this branch

@nick-mccoy nick-mccoy merged commit 6cca87f into master Mar 12, 2020
@nick-mccoy nick-mccoy deleted the query-ssl-status branch March 12, 2020 16:56
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