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

fix bug looking up versioned vault secrets #1354

Merged
merged 2 commits into from
Mar 6, 2020

Conversation

eikenb
Copy link
Contributor

@eikenb eikenb commented Mar 5, 2020

The brains/cache is keyed off String() output of a dependency. In this
case the dependency is a versioned vault secret. The problem is that the
vault secret's String() output doesn't contain the version. So the first
version retrieved seeds the cache and all subsequent references use that
version even if they specify a different (or no) version.

Including the version in vault secret String() output fixes this.

Fixes #1350

@eikenb eikenb force-pushed the issue-1350-versioned-brains branch from 30c192f to f54cce4 Compare March 5, 2020 22:26
@eikenb eikenb added this to the 0.25.0 milestone Mar 5, 2020
@eikenb eikenb added bug vault Related to the Vault integration labels Mar 5, 2020
@eikenb eikenb requested review from a team March 5, 2020 23:31
The brains/cache is keyed off String() output of a dependency. In this
case the dependency is a versioned vault secret. The problem is that the
vault secret's String() output doesn't contain the version. So the first
version retrieved seeds the cache and all subsequent references use that
version even if they specify a different (or no) version.

Including the version in vault secret String() output fixes this.
@eikenb eikenb force-pushed the issue-1350-versioned-brains branch from f54cce4 to d94fe0e Compare March 6, 2020 00:20
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!

@eikenb eikenb merged commit 708f789 into master Mar 6, 2020
@eikenb eikenb deleted the issue-1350-versioned-brains branch March 6, 2020 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug vault Related to the Vault integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unable to return specific versions of a secret path in kv v2 in template, seems to only return latest version
2 participants