vkv

command module
Version: v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2022 License: MIT Imports: 3 Imported by: 0

README

vkv

drawing

Test golangci-lint Go Report Card codecov Github all releases

Description

vkv recursively list you all key-value entries from Vaults KV2 secret engine in various formats. vkv flags can be devided into input, modifying and output format flags.

So far vkv offers:

Input flags
  • -p | --paths: KV mount paths (comma separated list for multiple paths) (env: VKV_PATHS, default: kv)
Modifying flags
  • --only-keys: show only keys (env: VKV_ONLY_KEYS, default: false)
  • --only-paths: show only paths (env: VKV_ONLY_PATHS, default: false)
  • --show-values: dont mask values (env: VKV_SHOW_VALUES, default: false)
  • --max-value-length: maximum char length of values (set to -1 for disabling) (env: VKV_MAX_VALUE_LENGTH, default: 12)
  • --template-file: path to a file containing Go-template syntax to render the KV entries (env: VKV_TEMPLATE_FILE)
  • --template-string: string containting Go-template syntax to render KV entries (env: VKV_TEMPLATE_STRING)
Output Flags (see Supported Formats)
  • -f | --format: output format (options: base, yaml, json, export, markdown, template) (env: "VKV_FORMAT", default: "base")

⚠️ A flag always preceed its environment variable

You can combine most of those flags in order to receive the desired output.

Installation

Find the corresponding binaries, .rpm and .deb packages in the release section.

Supported OS and Vault Versions

vkv is being tested on Windows, MacOS and Linux and also against Vault Version >= v1.8.0 (but it also may work with lower versions).

Authentication

vkv supports token based authentication. It is clear that you can only see the secrets that are allowed by your token policy.

All of vaults environment variables are supported. In order to authenticate to a Vault instance you have to set atleast VAULT_ADDR and VAULT_TOKEN:

# on linux/macos
VAULT_ADDR="http://127.0.0.1:8200" VAULT_TOKEN="s.XXX" vkv -p <kv-path>

# on windows
SET VAULT_ADDR=http://127.0.0.1:8200
SET VAULT_TOKEN=s.XXX
vkv.exe -p <kv-path>

Supported Formats

base
markdown
json
yaml
template

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL