fishi0x01 / vsh

vsh - HashiCorp Vault interactive shell and cli tool
MIT License
284 stars 12 forks source link

Feature: selectable keys for replace command #72

Closed mattlqx closed 3 years ago

mattlqx commented 3 years ago

While the replace command will be a powerful way to make changes to a Vault store, it may be difficult to limit replacements in cases where you only want to change a particular key across many paths.

For example, if you have the following Vault structure:

my/vault/path/a:
  first-key: weak-value
  second-key: strong-value
...
my/vault/path/z:
  first-key: strong-value
  second-key: weak-value

And you only want to change first-key's value from weak-value to strong-value, you can't presently do that with the replace command without also changing second-key's value. This is a contrived example, but most of the time, you will indeed want to limit changing values to a particular key.

fishi0x01 commented 3 years ago

I think the use-case you describe is quite common. That feature proposal is a great idea. I will give it a try on the weekend :+1:

mattlqx commented 3 years ago

I guess I'm trying to inform you what I'm up to by opening these. I already have it done, but was dependent on the prior PR. 🙂 I also did notice some bugs with regex matching that I'll fix soon too as well.

After that though, I think I can take a break. lol

fishi0x01 commented 3 years ago

Haha ok. Well in that case, thanks again Matt. That is great news :bow:

fishi0x01 commented 3 years ago

Fixed by #74