Rename KV Secret path to mount, and split secret key into path and name#34
Draft
pdecat wants to merge 2 commits intotheapsgroup:mainfrom
Draft
Rename KV Secret path to mount, and split secret key into path and name#34pdecat wants to merge 2 commits intotheapsgroup:mainfrom
path to mount, and split secret key into path and name#34pdecat wants to merge 2 commits intotheapsgroup:mainfrom
Conversation
…llows to query only some paths without loading all KV secrets from all mounts.
path to mount, and split secret key into path and namepath to mount, and split secret key into path and name
pdecat
commented
Jan 21, 2023
| logger.Debug("vault_kv_secret: listKvSecrets", "k", fmt.Sprintf("%#v", k)) | ||
| // time.Sleep(time.Second) | ||
|
|
||
| if k.Name == "" || strings.HasSuffix(k.Name, "/") { |
Author
There was a problem hiding this comment.
Name can be empty only on first invocation.
pdecat
commented
Jan 22, 2023
vault/table_kv_secret.go
Outdated
Author
There was a problem hiding this comment.
Please note that this currently prevents selecting secrets recursively.
Previously, one could use like in his queries e.g.:
select key
from vault_kv_secret
where path = 'secret/'
and key like 'my/secret/path/%'
order by key;1cf25f4 to
fd6b427
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR renames
pathtomount, and splits the secret'skeyintopathandname.This allows to query only some paths without loading all KV secrets from all mounts (which can be quite expensive with large Vault instances).
Sample query with this new model:
Marked as draft because: