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

HV-1702 create postgres rotating secret #192

Merged
merged 11 commits into from
Nov 20, 2024
Merged

Conversation

keeefer
Copy link
Contributor

@keeefer keeefer commented Nov 8, 2024

Changes proposed in this PR:

Adds support for creating postgres rotating secrets.

How I've tested this PR:

How I expect reviewers to test this PR:

Checklist:

  • Tests added if applicable
  • CHANGELOG entry added or label 'pr/no-changelog' added to PR

    Run CHANGELOG_PR=<PR number> make changelog/new-entry for guidance
    in authoring a changelog entry, and commit the resulting file, which should
    have a name matching your PR number. Entries should use imperative present
    tense (e.g. Add support for...)

@dhuckins dhuckins changed the title Hvs/1702 create postgres rotating secret HV-1702 create postgres rotating secret Nov 14, 2024
@keeefer keeefer marked this pull request as ready for review November 14, 2024 22:35
@keeefer keeefer requested a review from a team as a code owner November 14, 2024 22:35
@ncabatoff
Copy link
Contributor

Could you add a test case for postgres?

Also, when I try to create a config interactively:

hcp vs secrets  create --app=app-tgr sec_tgr --secret-type=rotating
✔ postgres
usernames: ***
integration_name: ****
rotation_policy_name: ***
ERROR: error marshaling details config: json: cannot unmarshal string into Go struct field
Secrets20231128PostgresParams.postgres_params.usernames of type []string
  • I can't see what I'm typing
  • The order in which the fields are given is random
  • I don't know how to provide a list of usernames; I tried ["user1", "user2"], among other things

averche
averche previously approved these changes Nov 18, 2024
"integration_name": "",
"rotation_policy_name": "",
"postgres_params": map[string]any{
"usernames": "",
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this allow multiple usernames to be specified?

averche
averche previously approved these changes Nov 20, 2024
internal/commands/vaultsecrets/secrets/update_test.go Outdated Show resolved Hide resolved
Context: opts.Ctx,
}, mock.Anything).Return(&preview_secret_service.UpdatePostgresRotatingSecretOK{
Payload: &preview_models.Secrets20231128UpdatePostgresRotatingSecretResponse{
Config: &preview_models.Secrets20231128PostgresRotatingSecretConfig{
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't PostgresParams returned here too?

keeefer and others added 2 commits November 20, 2024 09:28
Co-authored-by: Anton Averchenkov <[email protected]>
Co-authored-by: Nick Cabatoff <[email protected]>
@keeefer keeefer merged commit 88f300f into main Nov 20, 2024
6 checks passed
@keeefer keeefer deleted the hvs/1702-create-postgres-secret branch November 20, 2024 20:19
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.

3 participants