All Projects → apptio → breakglass

apptio / breakglass

Licence: MIT License
A command line tool to provide login credentials from Hashicorp Vault

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to breakglass

Goldfish
A HashiCorp Vault UI written with VueJS and Vault native Go API
Stars: ✭ 2,174 (+6487.88%)
Mutual labels:  vault, hashicorp-vault
vault-consul-docker
Vault + Consul + Docker
Stars: ✭ 75 (+127.27%)
Mutual labels:  vault, hashicorp-vault
vault-converter
Support converting Vault Secrets to diffrent formats.
Stars: ✭ 15 (-54.55%)
Mutual labels:  vault, hashicorp-vault
teamcity-hashicorp-vault-plugin
TeamCity plugin to support HashiCorp Vault
Stars: ✭ 23 (-30.3%)
Mutual labels:  vault, hashicorp-vault
secrets cli
CLI for storing and reading your secrets via vault
Stars: ✭ 24 (-27.27%)
Mutual labels:  vault, hashicorp-vault
letsencrypt-to-vault
Renew or get Let's Encrypt certificates and send it to Hashicorp Vault
Stars: ✭ 84 (+154.55%)
Mutual labels:  vault, hashicorp-vault
puppet-vault
Puppet module to manage Vault (https://vaultproject.io)
Stars: ✭ 41 (+24.24%)
Mutual labels:  vault, hashicorp-vault
gke-vault-demo
This demo builds two GKE Clusters and guides you through using secrets in Vault, using Kubernetes authentication from within a pod to login to Vault, and fetching short-lived Google Service Account credentials on-demand from Vault within a pod.
Stars: ✭ 63 (+90.91%)
Mutual labels:  vault, hashicorp-vault
vault-consul-swarm
Deploy Vault and Consul with Docker Swarm
Stars: ✭ 20 (-39.39%)
Mutual labels:  vault, hashicorp-vault
vault-token-helper
@hashicorp Vault Token Helper for macOS, Linux and Windows with support for secure token storage and multiple Vault servers 🔐
Stars: ✭ 74 (+124.24%)
Mutual labels:  vault, hashicorp-vault
k8s-vault-webhook
A k8s vault webhook is a Kubernetes webhook that can inject secrets into Kubernetes resources by connecting to multiple secret managers
Stars: ✭ 107 (+224.24%)
Mutual labels:  vault, hashicorp-vault
vault-puppet
Using @hashicorp Vault with Puppet
Stars: ✭ 36 (+9.09%)
Mutual labels:  vault, hashicorp-vault
hookpick
A tool to manage some operational concepts of Hashicorp Vault
Stars: ✭ 83 (+151.52%)
Mutual labels:  vault, hashicorp-vault
rundeck-vault-plugin
Development continues here:
Stars: ✭ 17 (-48.48%)
Mutual labels:  vault, hashicorp-vault
vault-demo
Walkthroughs and scripts for my @hashicorp Vault talks
Stars: ✭ 67 (+103.03%)
Mutual labels:  vault, hashicorp-vault
pico
A Git-driven task runner built to facilitate GitOps and Infrastructure-as-Code while securely passing secrets to tasks.
Stars: ✭ 51 (+54.55%)
Mutual labels:  vault, hashicorp-vault
Obsidian-Markdown-Parser
This repository will give you tools to parse and fetch useful informations of your notes in your Obsidian vault.
Stars: ✭ 32 (-3.03%)
Mutual labels:  vault
lockgit
A CLI tool for storing encrypted data in a git repo
Stars: ✭ 121 (+266.67%)
Mutual labels:  vault
Morpheus
A Matrix client written in Go-QT
Stars: ✭ 20 (-39.39%)
Mutual labels:  golang-application
go-evepraisal
the code that powers evepraisal.com
Stars: ✭ 61 (+84.85%)
Mutual labels:  golang-application

Breakglass

Breakglass is a tool that will make API calls to Hashicorp Vault servers and then retrieve credentials for you.

It's designed to ease the process of getting elevated login credentials for a variety of servers.

It currently supports MySQL servers and SSH Command line access

Features

  • Grab MySQL passwords for any vault enabled database
  • Grab a one-time-use SSH user and password to get root access to servers
  • Configuration file, so if you do the same command over and over, you don't need to remember a million flags

Vault Configuration

The tool currently assumes you have mounted your databases and hosts into vault under specific paths.

All mysql databases should be mounted under /mysql/<hostname> in vault for example. For more information, please see the docs

Using

To use breakglass, simply download the binary. Run the command with no arguments to see the possible commands:

breakglass allows you to get login credentials for a variety of vault backends, such as databases servers, Linux servers (ssh credentials)
and AWS IAM roles

Usage:
  breakglass [command]

Available Commands:
  help        Help about any command
  mysql       Get temporary login credentials for mysql servers
  ssh         Get temporary SSH credentials for Linux serers

Flags:
      --config string      config file (default is $HOME/.breakglass/config.yaml)
      --debug              enable debug logging
      --vault string   vault host to authenticate against
      --port int      port of vault servers to use when authenticating (default 8200)

Use "breakglass [command] --help" for more information about a command.

For more help on the subcommands, run breakglass mysql help

Config

breakglass will do its best to try and detect sane defaults for you. However, some options will need to be configured.

They are configurable by either flag (meaning you have to set them every time you run breakglass) or for ease of use you can use a config file.

Place the config file in $HOME/.breakglass/config.yaml

An example config file looks like this:

username: "lbriggs"
authmethod: "ldap"
vault: "consulserver-1.example.com"
debug: false

These options can be modified as follows:

username:

This should be the username you use to authenticate to LDAP. If it's not set, breakglass will use the username you're currently logged in as

authmethod:

This is the method you use to authenticate against vault. Currently only LDAP and userpass are supported. LDAP is the default.

vault:

Specify the path to the vault server you wish to use.

$ breakglass mysql --host lbriggs-mysql.exampke.com --vault consulserver-2.example.com

However if you're finding yourself using the same vaulthost over and over again, you can set the vault host in the config file, and it will always use this host.

debug

Debug will enable debug logging for troubleshooting purposes. Ops may ask you to run with the debug option if you're experiencing problems.

MySQL Credentials

Assuming you've configured breakglass with the config options above, simply run breakglass and specify the MySQL Server you want access to:

$ breakglass --host lbriggs-mysql.example.com
Your MySQL Credentials are below
 username: read-ldap-f273c0
 password: <redacted>

You can then use these credentials to connect to the MySQL server you specified.

SSH Credentials

Assuming you've configured breakglass with the config options above, simple run breakglass and specify the SSH server you want access to:

Please enter your password:
Your SSH Credentials are:
 username: breakglass
 password: <redacted>

You can then use these credentials to connect to the Linux server you specified.

Building

See the docs

Contributing

Fork the repo in gitlab and send a merge request!

Caveats

There are currently no tests, and the code is not very DRY.

This was Apptio's first exercise in Go, and pull requests are very welcome.

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].