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

support secret write queries w/ an empty write #1532

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

eikenb
Copy link
Contributor

@eikenb eikenb commented Nov 5, 2021

Vault uses the write API for create+read and the create call doesn't
always take write key/value pairs (requires no fields to be provided)
but these cases would error out on absense of k/v pair. This change
simply skips the k/v check if the parameter string field is empty.

Fixes #1453

Vault uses the write API for create+read and the create call doesn't
always take write key/value pairs (requires no fields to be provided)
but these cases would error out on absense of k/v pair. This change
simply skips the k/v check if the parameter string field is empty.
@eikenb eikenb added bug vault Related to the Vault integration hashicat-update-required Changes that need to be ported to hashicat labels Nov 5, 2021
@eikenb eikenb requested a review from a team November 5, 2021 21:13
@eikenb eikenb added the hashicat-update-complete Completed porting changes to hashicat label Nov 5, 2021
Copy link
Member

@lornasong lornasong left a comment

Choose a reason for hiding this comment

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

makes sense to me!

@@ -358,7 +360,8 @@ func secretFunc(b *Brain, used, missing *dep.Set) func(...string) (*dep.Secret,
var d dep.Dependency
var err error

if len(rest) == 0 {
isReadQuery := len(rest) == 0
if isReadQuery {
Copy link
Member

Choose a reason for hiding this comment

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

helpful variable name!

@eikenb eikenb added this to the v0.28.0 milestone Nov 8, 2021
@eikenb eikenb merged commit a1e9af8 into master Nov 8, 2021
@eikenb eikenb deleted the issue-1453-write-nothing-return branch November 8, 2021 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug hashicat-update-complete Completed porting changes to hashicat hashicat-update-required Changes that need to be ported to hashicat vault Related to the Vault integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vault: provide a wait to render data on POST requests that doesn't require a payload
2 participants