Skip to content

fix bug looking up versioned vault secrets#1354

Merged
eikenb merged 2 commits into
masterfrom
issue-1350-versioned-brains
Mar 6, 2020
Merged

fix bug looking up versioned vault secrets#1354
eikenb merged 2 commits into
masterfrom
issue-1350-versioned-brains

Conversation

@eikenb
Copy link
Copy Markdown
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
eikenb added 2 commits March 5, 2020 16:20
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
Copy Markdown
Contributor

@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