All Projects → chiefy → Vaulted

chiefy / Vaulted

Licence: mit
nodejs based wrapper for HashiCorp's Vault HTTP API

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vaulted

teller
Cloud native secrets management for developers - never leave your command line for secrets.
Stars: ✭ 998 (+2023.4%)
Mutual labels:  vault, secret-management, hashicorp
Cryptr
Cryptr: a GUI for Hashicorp's Vault
Stars: ✭ 324 (+589.36%)
Mutual labels:  hashicorp, vault, secret-management
Vault.net
.NET API client for vault
Stars: ✭ 74 (+57.45%)
Mutual labels:  hashicorp, vault, secret-management
vault-unseal
auto-unseal utility for Hashicorp Vault
Stars: ✭ 57 (+21.28%)
Mutual labels:  vault, hashicorp
thycotic.secretserver
PowerShell module for automating with Thycotic Secret Server REST API
Stars: ✭ 41 (-12.77%)
Mutual labels:  vault, secret-management
vault-terraform-demo
Deploy HashiCorp Vault with Terraform in GKE.
Stars: ✭ 47 (+0%)
Mutual labels:  vault, hashicorp
vault-consul-swarm
Deploy Vault and Consul with Docker Swarm
Stars: ✭ 20 (-57.45%)
Mutual labels:  vault, hashicorp
vim-hcl
Syntax highlighting for HashiCorp Configuration Language (HCL)
Stars: ✭ 83 (+76.6%)
Mutual labels:  vault, hashicorp
lockgit
A CLI tool for storing encrypted data in a git repo
Stars: ✭ 121 (+157.45%)
Mutual labels:  vault, secret-management
Aomi
Provide secrets to build and release pipelines in a self service way using Hashicorp Vault.
Stars: ✭ 33 (-29.79%)
Mutual labels:  vault, secret-management
secrets-proxy
🔑 A secure proxy service for managing OneOps secrets.
Stars: ✭ 12 (-74.47%)
Mutual labels:  vault, secret-management
vault-ctrl-tool
Simple tool for managing authentication, secrets, and leases for services.
Stars: ✭ 23 (-51.06%)
Mutual labels:  vault, hashicorp
vault-load-testing
Automated load tests for Vault and Consul using the locust.io Python framework
Stars: ✭ 44 (-6.38%)
Mutual labels:  vault, hashicorp
secrets cli
CLI for storing and reading your secrets via vault
Stars: ✭ 24 (-48.94%)
Mutual labels:  vault, secret-management
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 (+127.66%)
Mutual labels:  vault, secret-management
Hvac
🔒 Python 2.7/3.X client for HashiCorp Vault
Stars: ✭ 839 (+1685.11%)
Mutual labels:  hashicorp, vault
argocd-vault-plugin
An Argo CD plugin to retrieve secrets from Secret Management tools and inject them into Kubernetes secrets
Stars: ✭ 404 (+759.57%)
Mutual labels:  vault, secret-management
vault-consul-docker
Vault + Consul + Docker
Stars: ✭ 75 (+59.57%)
Mutual labels:  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 (-61.7%)
Mutual labels:  vault, hashicorp
vault-token-helper-osx-keychain
An example @hashicorp Vault token helper for Mac OS X Keychain.
Stars: ✭ 64 (+36.17%)
Mutual labels:  vault, hashicorp

Vaulted

No Longer Being Maintained

Use node-vault for future support of Vault features!


Vaulted is a nodejs-based wrapper for the Vault HTTP API.

Installation

$ npm install vaulted

Getting Started

Documentation

Read the documentation

New Vault

var Vaulted = require('vaulted');

var myVault = new Vaulted({
  vault_host: '127.0.0.1',
  vault_port: 8200,
  vault_ssl: false
});

var keys;

myVault.prepare()
  .bind(myVault)
  .then(function () {
    return myVault.init();
  }).then(function (data) {
    myVault.setToken(data.root_token);
    keys = data.keys;
  })
  .then(function () {
    return myVault.unSeal({
      body: {
        key: keys[0]
      }
    });
  })
  .then(function () {
    return myVault.unSeal({
      body: {
        key: keys[1]
      }
    });
  })
  .then(function () {
    console.log('Vault is now ready!');
  })
  .catch(function onError(err) {
    console.error('Could not initialize or unseal vault:', err.message, err.error);
  });

Existing Vault - set token globally

var Vaulted = require('vaulted');

var myVault = new Vaulted({
  vault_host: '127.0.0.1',
  vault_port: 8200,
  vault_ssl: false
});

myVault.setToken('mytoken');

myVault.prepare()
  .then(function () {
    console.log('Vault is now ready!');
  });

Existing Vault - set token per-call

var Vaulted = require('vaulted');

var myVault = new Vaulted({
  vault_host: '127.0.0.1',
  vault_port: 8200,
  vault_ssl: false
});

myVault.prepare('mytoken')
  .then(function () {
    console.log('Vault is now ready!');
  });

Configuring

The available options below can either be passed to the Vaulted constructor, using environment variables, or configuration files.

Constructor

var Vaulted = require('vaulted');

var myVault = new Vaulted({
  vault_host: '127.0.0.1',
  vault_port: 8200,
  vault_ssl: false,
  timeout: 5000
});

Environment Variables

$ export VAULT_HOST=127.0.0.1
$ export VAULT_PORT=8200
$ export VAULT_SSL=false
$ export VAULT_TIMEOUT=5000
var Vaulted = require('vaulted');

var myVault = new Vaulted();

Configuration File

File: config/default.yml

vault_host: 127.0.0.1
vault_port: 8200
vault_ssl: true
var Vaulted = require('vaulted');

var myVault = new Vaulted();

Available Options

Attribute Environment Variable Default Value Description
vault_host VAULT_HOST 127.0.0.1 Vault server hostname
vault_port VAULT_PORT 8200 Vault server port
vault_ssl VAULT_SSL true (enabled) Use SSL?
vault_token VAULT_TOKEN Token to use to access the vault
ssl_ciphers VAULT_SSL_CIPHERS TLSv1.2 The ciphers that will be used when communicating with vault over ssl
ssl_cert_file VAULT_SSL_CERT Path to custom SSL cert file
ssl_pem_file VAULT_SSL_CERT_KEY Path of SSL cert PEM file to use with custom SSL verification
ssl_pem_passphrase VAULT_SSL_CERT_PASSPHRASE Passphrase associated SSL cert PEM file to use with custom SSL verification
ssl_ca_cert VAULT_CACERT CA cert path used for certification verification
ssl_verify VAULT_SSL_VERIFY true validate SSL requests?
timeout VAULT_TIMEOUT milliseconds to wait for response headers
proxy_address VAULT_PROXY_ADDRESS HTTP Proxy server address
proxy_password VAULT_PROXY_PASSWORD HTTP Proxy user password
proxy_port VAULT_PROXY_PORT HTTP Proxy server port
proxy_username VAULT_PROXY_USERNAME HTTP Proxy server username
debug DEBUG false Show verbose messages, network requests?
secret_shares SECRET_SHARES 3 Number of shared secret keys to generate
secret_threshold SECRET_THRESHOLD 2 Threshold at which to unseal vault (must be <= SECRET_SHARES)

Example - An Express Application

In order to run the example, you will need to install:

$ make run-local

After starting the servers, you can point a tool like POSTman at http://$(boot2docker ip):3000. You can perform read/write/delete operations on secrets:

curl \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{ "hashicorp": "amazeballs", "value": "s3cr37" }' \
  'http://$(boot2docker ip):3000/secret/value'
{"success":true}
curl \
  -X GET \
  'http://$(boot2docker ip):3000/secret/value'
{
  "lease_id": "secret/value/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
  "renewable": false,
  "lease_duration": 2592000,
  "data": {
    "hashicorp": "amazeballs",
    "value": "s3cr37"
  },
  "auth": null
}

Development

Use the docker-compose-test.yml to aid development. PRs are very, very welcome. Please add tests when including new functionality.

Running Tests

$ docker-compose -f docker-compose-test.yml up -d consul vault
$ docker-compose -f docker-compose-test.yml run vaulted

License

The MIT License (MIT)

Copyright (c) 2015-2016 Christopher "Chief" Najewicz

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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