community.hashi_vault
community.hashi_vault copied to clipboard
Support GitHub (Or Generic) Authentication
SUMMARY
Vault supports GitHub authentication. Please either directly support it in this collection, or allow for a generic authentication method like what HashiCorp have done with Terraform's Vault provider.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
Unsure...
ADDITIONAL INFORMATION
Some folks have home labs, like me, and are using Vault with GH auth for simplicity's sake.
This could be an approach in allowing generic auth, rather than specifically GitHub. This mimics HashiCorp's approach.
auth_method: generic
auth_path: auth/github/login
auth_params:
token: abcxyz
Hi @rfpludwick welcome, thanks for submitting this!
I'm especially intrigued by the generic auth idea. That one might be something I'd consider implementing as it would be a little trickier than established concrete methods. The main reasons are that:
- This collection is mostly a wrapper around the
hvaclibrary, and it does not itself have such a thing. It does have the Adapter'sloginmethod, but this will need to be treated carefully. I am also a maintainer on that library, and I have been trying to work on the Adapter system, so I can say that this way of doing things would be a little unstable right now, until we come up with a future plan for that (I have some ideas, still working with the other maintainers to determine our path forward). - Testing for the generic method will be interesting... it'll have to stray a bit on the integration side from some of the existing tests, but I think we could achieve it by trying it against some existing auth methods so we reuse some of the existing test infra, but that may prove problematic.
In any case, right now the only thing preventing adding a new auth method like GH auth is having someone contribute it! If you're interested in adding this yourself we have a Contributor guide that can help you get started. Don't hesitate to ask any additional questions as needed.