The Go library

The Bank-Vaults repository contains several Go packages for interacting with Vault, these packages are organized into the sdk Go module, which can be pulled in with go get and is versioned by the pkg/sdk/vX.Y.Z Git tags:

  • pkg/sdk/auth

    Stores JWT bearer tokens in Vault.

    (NOTE: The Gin handler has been moved out to gin-utilz )


  • pkg/sdk/vault

    A wrapper for the official Vault client with automatic token renewal, and Kubernetes support.


  • pkg/sdk/db

    A helper for creating database source strings (MySQL/PostgreSQL) with database credentials dynamically based on configured Vault roles (instead of username:password).


  • pkg/sdk/tls

    A simple package to generate self-signed TLS certificates. Useful for bootstrapping situations, when you can’t use Vault’s PKI secret engine.

Examples for using the library part

Some examples are in cmd/examples/main.go