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

Cant use vaku without read capability on sys/mounts #157

Closed
tobgu opened this issue Jun 1, 2022 · 3 comments
Closed

Cant use vaku without read capability on sys/mounts #157

tobgu opened this issue Jun 1, 2022 · 3 comments

Comments

@tobgu
Copy link
Contributor

tobgu commented Jun 1, 2022

I've run up against an issue where "normal" users cannot use most of the functionality in vaku since it relies on a call to https://github.com/lingrino/vaku/blob/main/api/mounts.go#L46 which requires read capability on sys/mounts.

We don't want to assign this capability to non-admin users as it would expose information/existence about mounts that the user does not have access to.

The only way I know of to get this information without using sys/mounts is through an internal endpoint used by the GUI which provides you with similar information, but scoped to the mounts that you have access. https://www.vaultproject.io/api-docs/system/internal-ui-mounts

That the endpoint is internal is a problem of course wrt stability and existence. I've written an issue on Vault for this but I don't have high hopes of a quick solution to it: hashicorp/vault#15724

The only way around this that I can think of is to make it possible to make the "mount source" pluggable to avoid requiring access to sys/mounts. In that way we could, for example, use the above internal endpoint at our own risk to get the information. Or some other static configuration available in our use case. Perhaps you have better ideas for how to tackle this?

@lingrino
Copy link
Owner

lingrino commented Jun 1, 2022

@tobgu thanks for the issue! This is definitely something we can work out.

I'm reluctant to use the internal endpoint but I'm following the issue you opened and hopefully we can find a more stable approach later on. For now would it work for you to have a flag and/or environment variable (maybe VAKU_MOUNT_VERSION) that you can manually set to bypass this check?

@tobgu
Copy link
Contributor Author

tobgu commented Jun 1, 2022

An environment variable for the CLI + the possibility to pass it as config to NewClient would be perfectly fine for my use case. We only use kv-v2, never v1.

Thanks!

@tobgu
Copy link
Contributor Author

tobgu commented Nov 28, 2022

#198 does the trick AFAIC!

@tobgu tobgu closed this as completed Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants