I wrote a plugin for Hashicorp Vault that implements an Enigma machine. It serves as a self contained but complete example that you can use to build your own plugins.

This page will hold a step by step guide to writing your own Vault secret engine plugin, covering:

  1. The build environment
  2. Organize the code
  3. Your first function
  4. Debug your plugin with Delve
  5. Unit testing
  6. Accepting parameters
  7. Different paths for different purposes
  8. Persist state and secrets
  9. Upgrading your plugin without loosing all of your secrets

Stay tuned, but until then, have a look at the plugin source on Github!