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

kv v1 compatibility #38

Open
adamwolfe-tc opened this issue Oct 4, 2023 · 3 comments
Open

kv v1 compatibility #38

adamwolfe-tc opened this issue Oct 4, 2023 · 3 comments

Comments

@adamwolfe-tc
Copy link

I'm currently working on getting a count of secrets in our Vault instance and have noticed that the steampipe-plugin-vault does not appear to have a way to get info from version 1 of the secrets engine.

it's able to recognize v1 as type = kv:

> select path from vault_engine where type = 'kv';
+-----------------+
| path            |
+-----------------+
| aws-root-creds/ | # v2 
| configs/        |  # v2 
| kv/             |  # v1
+-----------------+

but does not get any counts etc from the v1 engine:

> select count(key) from vault_kv_secret where path = 'configs/';
+-------+
| count |
+-------+
| 32    |
+-------+

vs

> select count(key) from vault_kv_secret where path = 'kv/';
+-------+
| count |
+-------+
| 0     |
+-------+
@graza-io
Copy link
Contributor

It should support v1 already; are you sure you have any secrets directly in the kv/ path?

@adamwolfe-tc
Copy link
Author

adamwolfe-tc commented Jun 19, 2024

i have around 200 hundred v1 secrets (of varying depth) that match kv/*, yes.

my.user@host:~$ vault list kv | wc -l
      78

my.user@host:~$ steampipe query

Welcome to Steampipe v0.22.2
For more information, type .help

> select count(key) from vault_kv_secret where path = 'kv/';
+-------+
| count |
+-------+
| 0     |
+-------+

> select count(key) from vault_kv_secret where path = 'configs/';
+-------+
| count |
+-------+
| 39    |
+-------+
>

@graza-io
Copy link
Contributor

I see, but where path = 'kv/' is an exact path match so if they're all in sub-paths of this, you may not get the results with this where clause.

If you just select key from vault_kv_secret; do you see all the results you're expecting?

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