All Projects → jaxxstorm → hookpick

jaxxstorm / hookpick

Licence: MIT license
A tool to manage some operational concepts of Hashicorp Vault

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to hookpick

vault-consul-swarm
Deploy Vault and Consul with Docker Swarm
Stars: ✭ 20 (-75.9%)
Mutual labels:  consul, vault, hashicorp, hashicorp-vault
Vaultron
🤖 Vault clusters Terraformed onto Docker for great fun and learning!
Stars: ✭ 96 (+15.66%)
Mutual labels:  consul, vault, hashicorp
Hashi Up
bootstrap HashiCorp Consul, Nomad, or Vault over SSH < 1 minute
Stars: ✭ 113 (+36.14%)
Mutual labels:  consul, vault, hashicorp
Hashi Helper
Disaster Recovery and Configuration Management for Consul and Vault
Stars: ✭ 155 (+86.75%)
Mutual labels:  consul, vault, hashicorp
nomad-box
Nomad Box - Simple Terraform-powered setup to Azure of clustered Consul, Nomad and Traefik Load Balancer that runs Docker/GoLang/Java workloads. NOTE: Only suitable in dev environments at the moment until I learn more Terraform, Consul, Nomad, Vault :P
Stars: ✭ 18 (-78.31%)
Mutual labels:  consul, vault, hashicorp
vault-consul-kubernetes
vault + consul on kubernetes
Stars: ✭ 60 (-27.71%)
Mutual labels:  consul, vault, hashicorp
vault-consul-docker
Vault + Consul + Docker
Stars: ✭ 75 (-9.64%)
Mutual labels:  vault, hashicorp, hashicorp-vault
vault-load-testing
Automated load tests for Vault and Consul using the locust.io Python framework
Stars: ✭ 44 (-46.99%)
Mutual labels:  consul, vault, hashicorp
Ansible Vault
🔑 Ansible role for Hashicorp Vault
Stars: ✭ 189 (+127.71%)
Mutual labels:  consul, vault, hashicorp
vim-hcl
Syntax highlighting for HashiCorp Configuration Language (HCL)
Stars: ✭ 83 (+0%)
Mutual labels:  consul, vault, hashicorp
hashicorp-labs
Deploy locally on VM an Hashicorp cluster formed by Vault, Consul and Nomad. Ready for deploying and testing your apps.
Stars: ✭ 32 (-61.45%)
Mutual labels:  consul, vault, hashicorp
hubble
hubbling the universe nebula by nebula
Stars: ✭ 18 (-78.31%)
Mutual labels:  consul, vault
Nomad Firehose
Firehose all nomad job, allocation, nodes and evaluations changes to rabbitmq, kinesis or stdout
Stars: ✭ 96 (+15.66%)
Mutual labels:  consul, hashicorp
Docker Compose Ha Consul Vault Ui
A docker-compose example of HA Consul + Vault + Vault UI
Stars: ✭ 136 (+63.86%)
Mutual labels:  consul, vault
Envconsul
Launch a subprocess with environment variables using data from @hashicorp Consul and Vault.
Stars: ✭ 1,761 (+2021.69%)
Mutual labels:  consul, vault
vauth
VMware vSphere VM Identity Platform
Stars: ✭ 32 (-61.45%)
Mutual labels:  vault, hashicorp
Gomplate
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.
Stars: ✭ 1,270 (+1430.12%)
Mutual labels:  consul, vault
Cault
docker compose for consul and vault official images
Stars: ✭ 157 (+89.16%)
Mutual labels:  consul, vault
vaultrs
An asynchronous Rust client library for the Hashicorp Vault API
Stars: ✭ 63 (-24.1%)
Mutual labels:  vault, hashicorp
vault-plugin-secrets-wireguard
Vault's plugin for managing server and dynamic client configurations
Stars: ✭ 41 (-50.6%)
Mutual labels:  vault, hashicorp

hookpick

hookpick is a tool to manage some operational concepts of Hashicorp Vault, specifically related to the painful process of unsealing, initialising and rekeying Vault.

You provide a configuration file with a map of "datacenters". Each datacenter has a key and an array of hosts. hookpick will perform actions against each of those hosts as you need.

The name comes from a a Hook Pick, a tool used to pick locks. This tool is meant to to "unlock" the administration of Vault. Originally the tool was called locksmith, but it conflicted with locksmith.

It is currently considered Alpha, and may change drastically over time.

Why?

Originally, I wrote unseal which was specifically for unsealing a large number of Vault servers. However, it became apparent that operating on large numbers of Vaults is painful, especially when it comes to rekeying.

This tool is aimed at bridging the gap when it comes to administration and operation of large numbers of Vault servers.

Features

Some of the advantages you might gain over using the Vault HTTP API or the standard Vault binary

  • Zero touch interaction. Once you've written your yaml config, you can simply invoke the command and it'll operate on the Vault servers you need to.
  • Parallel execution. Each unseal command runs in a goroutine, meaning you can unseal multiple servers in a matter of seconds

Currently Unseal has the capability to:

  • Query the status of all Vault servers configured
  • Unseal all Vault servers configured, with a key specified.

Usage

You'll need a configuration file. Unseal uses viper which means it supports JSON, yaml and hcl syntax.

The app will look for the config file in the following directories, in order:

  • $HOME/.hookpick.yaml
  • .hookpick.yaml (in the directory you're running the binary from)

An example configuration file in yaml looks like this:

gpg: true
datacenters:
- hosts:
  - name: consulserver-1.example.dc1.com
    port: 8200
  - name: consulserver-2.example.dc1.com
    port: 8200
  keys:
  - key: <key1>
  - key: <key2>
  name: dc1
- hosts:
  - name: consulserver-1.example.dc2.com
    port: 8200
  - name: consulserver-2.example.dc2.com
    port: 8200
  keys:
  - key: <key1>
  - key: <key2>
  name: dc2

This can be converted to JSON or HCL as needed. Configuration options available are:

  • gpg - Boolean - Set to true if you init'd Vault with GPG support enabled
  • capath - String - The path to a directory containing CA certificates for all Vaults
  • protocol - String - The HTTP protocol to use when connecting to vaults (default: https)
  • datacenters - Array of maps - an array of datacenters with nested options
    • name - String - The name of the datacenters
    • keys - Array - contains keys:
      • key - String - The unseal key for that datacenter. Should be base64 encoded if the gpg flag is set to true
    • hosts - Array - contains two config options:
      • name - String - Hostname of a Vault server
      • port - Int - The port that Vault server listens on

Environment Variables

By default, hookpick will read some environment variables for your configuration. You can find them here

You can use some of these environment variables if you wish when using hookpick.

  • VAULT_CACERT: Set this to the path of a CA Cert you wish to use to verify the Vault connection. Note, this will use the same CA cert for all Vaults
  • VAULT_CAPATH: An alternative to the above CA Path config option.
  • VAULT_CLIENT_CERT: An SSL client cert to use when connecting to your Vaults. Note, this will use the same cert for all Vaults
  • VAULT_CLIENT_KEY: An SSL client key to use when connecting to your Vaults. Note, this will use the same key for all Vaults
  • VAULT_SKIP_VERIFY: Skip SSL verification. This is not recommended in production use.

Building

If you want to contribute, we use Go Modules for dependency management, so it should be as simple as:

  • cloning this repo into $GOPATH/src/github.com/jaxxstorm/hookpick
  • run go get -u from the directory
  • run go mod tidy from the directory
  • run go build -o hookpick main.go

Building Docker Image

If you want to build the Docker image:

  • cloning this repo into $GOPATH/src/github.com/jaxxstorm/hookpick
  • run docker build -t hookpick . from the directory

You should have a tiny image hookpick which is less than 5 Mb.

For using it :

  • Create you configfile .hookpick.yaml
  • Run docker command docker run -v $(pwd)/.hookpick.yaml:/.hookpick.yaml:ro hookpick status

Nota: you can change status by one of the program command. (unseal if omited)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].