GithubHelp home page GithubHelp logo

theapsgroup / steampipe-plugin-vault Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 8.0 1.08 MB

Use SQL to instantly query Hashicorp Vault secrets, certs and more. Open source CLI. No DB required.

Home Page: https://hub.steampipe.io/plugins/theapsgroup/vault

License: Apache License 2.0

PLSQL 1.28% Go 98.44% Makefile 0.28%
golang sql steampipe-plugin steampipe hashicorp vault query-vault postgresql postgresql-fdw

steampipe-plugin-vault's People

Contributors

bonemind avatar dboeke avatar graza-io avatar johnsmyth avatar judell avatar michaelburgess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

steampipe-plugin-vault's Issues

suggested changes prior to publishing to Steampipe Registry

This is John from the Steampipe team -- We're excited to have you contributing to the Steampipe plugin community! We will need to work through the mechanics of how exactly the registry publishing process works, as you are the first external contributor -- We will contact you with more details in this regard.

I took a quick look at your plugin today and had a few items that should be addressed:

$ vault kv get secret/hello
====== Metadata ======
Key              Value
---              -----
created_time     2021-05-10T20:10:28.307902Z
deletion_time    n/a
destroyed        false
version          2

===== Data =====
Key        Value
---        -----
excited    yes
foo        world
  • My knowledge of vault is limited, but I notice that the column names don't always conform to the language used in the CLI. Im not sure what is correct in this case, but it is definitely worth paying attention to, as renaming columns after the plugin is released is a hassle for users. For example, the mountpoint in vault_engines seems to be referred to as path in the CLI output:
$ steampipe query "select * from vault_engines"
+------------+-----------+
| mountpoint | type      |
+------------+-----------+
| sys/       | system    |
| secret/    | kv        |
| identity/  | identity  |
| cubbyhole/ | cubbyhole |
+------------+-----------+

Time: 483.783688ms

Johns-MBP-2:steampipe-plugin-vault jsmyth$ vault secrets list
Path          Type         Accessor              Description
----          ----         --------              -----------
cubbyhole/    cubbyhole    cubbyhole_03ad4f03    per-token private secret storage
identity/     identity     identity_37451878     identity store
secret/       kv           kv_63726df9           key/value secret storage
sys/          system       system_ac4bc3bf       system endpoints used for control, policy and debugging

Likewise, vault_kv_secrets uses the name path where the CLI refers to key:

$ steampipe query "select * from vault_kv_secrets"
+--------+------------+
| path   | mountpoint |
+--------+------------+
| /hello | secret/    |
+--------+------------+


$ vault kv list secret
Keys
----
hello

I look forward to continued collaboration, and feel free to reach out in the Slack or Github!

kv v1 compatibility

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     |
+-------+

Update Vault SDK & all tables

It's been a while since we've updated the Vault SDK, should be updated to latest version along with a run-though of all existing tables to ensure columns are up to date - any (potential) new tables should be raised as separate issues.

invalid memory address or nil pointer dereference

just now installed steampipe and vault plugin. every command related to vault fails with the same error
` select * from vault_engine
Error: rpc error: code = Internal desc = list call listEngines failed with panic runtime error: invalid memory address or nil pointer dereference

select * from vault_engine;
Error: rpc error: code = Internal desc = list call listEngines failed with panic runtime error: invalid memory address or nil pointer dereference
select * from vault.vault_engine;
Error: rpc error: code = Internal desc = list call listEngines failed with panic runtime error: invalid memory address or nil pointer dereference
select * from vault.vault_kv_secret
Error: rpc error: code = Internal desc = list call listSecrets failed with panic runtime error: invalid memory address or nil pointer dereference
select * from vault.vault_sys_health
Error: rpc error: code = Internal desc = list call getSysHealth failed with panic runtime error: invalid memory address or nil pointer dereference
`
VAULT_TOKEN and VAULT_ADDR are set

other plugins such as gitlab are working fine
steampipe plugin list

+----------------------------------------------------+---------+-------------+
| Name | Version | Connections |
+----------------------------------------------------+---------+-------------+
| hub.steampipe.io/plugins/theapsgroup/gitlab@latest | 0.0.3 | gitlab |
| hub.steampipe.io/plugins/theapsgroup/vault@latest | 0.0.4 | vault |
| hub.steampipe.io/plugins/turbot/aws@latest | 0.34.0 | aws |
| hub.steampipe.io/plugins/turbot/docker@latest | 0.0.2 | docker |
| hub.steampipe.io/plugins/turbot/steampipe@latest | 0.1.3 | steampipe |
+----------------------------------------------------+---------+-------------+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.