Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add secrets engines abstraction #63

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

damian-kwolek
Copy link

Hello,

I'm suggesting adding another layer of abstraction based on Vault's own API docs - Secrets Engines (overlays).
They can be used to streamline path generation for specific jobs and objectify whole Vault transaction.
For example, in case of KeyValue Version 2:

  • You won't longer have to remember which http method to use and which "keyword" to add in between mount and secret path
  • Configuration, metadata, write options, etc. can now be standarized objects instead of associative arrays, so it's more clear what you can or cannot set
  • Responses can now be more structurized (using builders), because such overlay can expect certain response structure from Vault

This PR:

  • adds support for KV1 and KV2 with free Cubbyhole (as it is KV1 at predefined mount) secret engines
  • fixes few small typos
  • corrects Content-Type for PATCH method, as simple application/json may be rejected by newer Vault versions

I made sure it does NOT break backwards compability, so you can still use old way of raw calling client directly.

*
* @package Vault\SecretsEngine
*/
abstract class AbstractSecretsEngine
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs an interface for all secret engines :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants