lingrino / vaku

vaku extends the vault api & cli

Home Page:https://lingrino.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to pass paths on error

duxing opened this issue · comments

vaku version
API: 2.4.5
CLI: 2.4.5

Problem

vault list /foo
Keys
----
bar0/
bar1/
bar2/

if I have list permission to foo/bar0 and foo/bar2 but no list permission for foo/bar1, running the following command:
vaku folder search foo/ --absolute-path my_secret will fail with a 403 error on listing foo/bar1 and the process will be terminated before attempting foo/bar0 and foo/bar2.

would it be possible to add an option to vaku folder search to bypass the inaccessible folders? e.g.
vaku folder search foo/ --skip-error --absolute-path my_secret

Hello @duxing! I think this is a great idea. A flag would need to be added to the client here with a matching cli flag. I think --ignore-errors would make sense as a flag. Folder search, read, list, etc... all call their equivalent path-based commands read/list/search so the API would just need to ignore errors and return success when that flag is true.

I am very open to this idea but I likely won't have time to work on it anytime in the next few months. If you'd like to try a contribution then I'm happy to review and release a change before then. Thanks!