Vault Plugin | New
For debugging, Vault plugins log to stderr. Run Vault with:
Your first step is to set up your project structure and import the necessary SDK.
vault plugin register \ -sha256=<output_of_shasum> \ -command=phish \ secret phish vault plugin new
// Wrap in secret for lease management resp.Secret = &logical.Secret{ Data: map[string]interface{} "username": username, "password": password, , LeaseOptions: logical.LeaseOptions TTL: time.Hour, MaxTTL: 24 * time.Hour, Renewable: true, , }
require ( github.com/hashicorp/go-hclog v1.6.2 github.com/hashicorp/vault/sdk v0.10.2 ) For debugging, Vault plugins log to stderr
func secretCreds() *framework.Secret return &framework.Secret Type: "example-creds", Fields: map[string]*framework.FieldSchema "username": Type: framework.TypeString, "password": Type: framework.TypeString, , Revoke: revokeCreds,
vault read my-plugin/creds
Vault 1.10+ introduced . You no longer need to restart the Vault core every time you change a plugin. Instead:
