Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Nomad | 13,381 | 103 | 291 | an hour ago | 753 | September 14, 2022 | 1,423 | mpl-2.0 | Go | |
Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations. | ||||||||||
Consul Template | 4,615 | 15 | 58 | 3 days ago | 118 | August 18, 2022 | 142 | mpl-2.0 | Go | |
Template rendering, notifier, and supervisor for @HashiCorp Consul and Vault data. | ||||||||||
Emitter | 3,482 | 22 days ago | 2 | May 05, 2018 | 13 | agpl-3.0 | Go | |||
High performance, distributed and low latency publish-subscribe platform. | ||||||||||
Kubernetes External Secrets | 2,589 | 10 months ago | 10 | mit | JavaScript | |||||
Integrate external secret management systems with Kubernetes | ||||||||||
Gomplate | 2,111 | 32 | 7 hours ago | 81 | September 13, 2022 | 31 | mit | Go | ||
A flexible commandline tool for template rendering. Supports lots of local and remote datasources. | ||||||||||
Envconsul | 1,931 | 6 days ago | 41 | July 19, 2022 | 29 | mpl-2.0 | Go | |||
Launch a subprocess with environment variables using data from @HashiCorp Consul and Vault. | ||||||||||
Teller | 1,557 | 15 days ago | 37 | apache-2.0 | Go | |||||
Cloud native secrets management for developers - never leave your command line for secrets. | ||||||||||
Vault Ui | 1,299 | 5 years ago | 3 | October 04, 2017 | 50 | other | JavaScript | |||
Vault-UI — A beautiful UI to manage your Vault, written in React | ||||||||||
Hvac | 1,072 | 192 | 115 | 9 days ago | 61 | September 23, 2021 | 138 | apache-2.0 | Python | |
:lock: Python 3.X client for HashiCorp Vault | ||||||||||
Vault Guides | 936 | 12 days ago | 4 | April 06, 2021 | 57 | mpl-2.0 | Shell | |||
Example usage of HashiCorp Vault secrets management |
⚠️ This repo is no longer maintained: It has been taken over by Hashicorp as an official plugin which you can find here
This is a standalone backend plugin for use with Hashicorp Vault. This plugin allows for users to authenticate with Vault via Kerberos/SPNEGO.
You can find binaries on the Release page.
You can authenticate by posting a valid SPNEGO Negotiate header to /v1/auth/kerberos/login
.
try:
import kerberos
except:
import winkerberos as kerberos
import requests
service = "HTTP/vault.domain"
rc, vc = kerberos.authGSSClientInit(service=service, mech_oid=kerberos.GSS_MECH_OID_SPNEGO)
kerberos.authGSSClientStep(vc, "")
kerberos_token = kerberos.authGSSClientResponse(vc)
r = requests.post("https://vault.domain:8200/v1/auth/kerberos/login",
json={'authorization': 'Negotiate ' + kerberos_token})
print('Vault token:', r.json()['auth']['client_token'])
Put the plugin binary (vault-plugin-auth-kerberos
) into a location of your choice. This directory
will be specified as the plugin_directory
in the Vault config used to start the server.
...
plugin_directory = "path/to/plugin/directory"
...
$ vault write sys/plugins/catalog/auth/kerberos sha_256="$(shasum -a 256 'vault-plugin-auth-kerberos' | cut -d ' ' -f1)" command="vault-plugin-auth-kerberos -client-cert server.crt -client-key server.key"
$ vault auth enable -passthrough-request-headers=Authorization -allowed-response-headers=www-authenticate kerberos
Success! Enabled kerberos auth method at: kerberos/
Create a keytab for the kerberos plugin:
$ ktutil
ktutil: addent -password -p [email protected] -e aes256-cts -k 1
Password for [email protected]:
ktutil: list -e
slot KVNO Principal
---- ---- ---------------------------------------------------------------------
1 1 [email protected] (aes256-cts-hmac-sha1-96)
ktutil: wkt vault.keytab
The KVNO (-k 1
) should match the KVNO of the service account. An error will show in the vault logs if this is incorrect.
Different encryption types can also be added to the keytab, for example -e rc4-hmac
with additional addent
commands.
Then base64 encode it:
base64 vault.keytab > vault.keytab.base64
vault write auth/kerberos/config [email protected] service_account="your_service_account"
# for Windows/Active Directory
setspn.exe -U -S HTTP/vault.domain:8200 your_service_account
setspn.exe -U -S HTTP/vault.domain your_service_account
vault write auth/kerberos/config/ldap @vault-config/auth/ldap/config
vault write auth/kerberos/groups/example-role @vault-config/auth/ldap/groups/example-role
In non-kerberos mode, the LDAP bind and lookup works via the user that is currently trying to authenticate. If you're running LDAP together with Kerberos you might want to set a binddn/bindpass in the ldap config.
If you wish to work on this plugin, you'll first need Go installed on your machine.
For local dev first make sure Go is properly installed, including
setting up a GOPATH.
Next, clone this repository into
$GOPATH/src/github.com/wintoncode/vault-plugin-auth-kerberos
.
You can then download any required build tools by bootstrapping your
environment:
$ make bootstrap
To compile a development version of this plugin, run make
or make dev
.
This will put the plugin binary in the bin
and $GOPATH/bin
folders. dev
mode will only generate the binary for your platform and is faster:
$ make
$ make dev
Put the plugin binary into a location of your choice. This directory
will be specified as the plugin_directory
in the Vault config used to start the server.
...
plugin_directory = "path/to/plugin/directory"
...
Start a Vault server with this config file:
$ vault server -config=path/to/config.json ...
...
Once the server is started, register the plugin in the Vault server's plugin catalog:
$ vault write sys/plugins/catalog/kerberos \
sha_256=<expected SHA256 Hex value of the plugin binary> \
command="vault-plugin-auth-kerberos"
...
Success! Data written to: sys/plugins/catalog/kerberos
Note you should generate a new sha256 checksum if you have made changes to the plugin. Example using openssl:
openssl dgst -sha256 $GOPATH/vault-plugin-auth-kerberos
...
SHA256(.../go/bin/vault-plugin-auth-kerberos)= 896c13c0f5305daed381952a128322e02bc28a57d0c862a78cbc2ea66e8c6fa1
Enable the auth plugin backend using the Kerberos auth plugin:
$ vault auth-enable -plugin-name='kerberos' plugin
...
Successfully enabled 'plugin' at 'kerberos'!
If you are developing this plugin and want to verify it is still functioning (and you haven't broken anything else), we recommend running the tests.
To run the tests, invoke make test
:
$ make test
You can also specify a TESTARGS
variable to filter tests like so:
$ make test TESTARGS='--run=TestConfig'