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

feat: Save postgres superuser password in secretstore #5051

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lindseysimple
Copy link
Contributor

@lindseysimple lindseysimple commented Jan 13, 2025

Resolves #5050. Save postgres superuser password in secretstore.

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

New Dependency Instructions (If applicable)

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 9.09091% with 50 lines in your changes missing coverage. Please review.

Project coverage is 28.04%. Comparing base (abfbcc6) to head (77b7903).

Files with missing lines Patch % Lines
...ecurity/bootstrapper/postgres/handlers/handlers.go 0.00% 30 Missing ⚠️
internal/security/secretstore/init.go 0.00% 19 Missing ⚠️
...ternal/security/bootstrapper/postgres/configure.go 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5051      +/-   ##
==========================================
- Coverage   28.10%   28.04%   -0.06%     
==========================================
  Files         256      256              
  Lines       18460    18515      +55     
==========================================
+ Hits         5188     5193       +5     
- Misses      12074    12124      +50     
  Partials     1198     1198              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Resolves edgexfoundry#5050. Save postgres superuser password in secretstore.

Signed-off-by: Lindsey Cheng <[email protected]>
Remove the password file in postgres entrypoint script lastly.

Signed-off-by: Lindsey Cheng <[email protected]>
@lindseysimple lindseysimple marked this pull request as ready for review January 14, 2025 10:09
@@ -21,7 +21,11 @@ import (
"github.com/edgexfoundry/go-mod-bootstrap/v4/di"
)

const postgresSecretName = "postgres"
const (
postgresSecretName = "postgres" // nolint:gosec
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
postgresSecretName = "postgres" // nolint:gosec
postgresSecretName = "postgres"

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.

Create Postgres superuser password randomly in security mode
3 participants