WebService::HashiCorp::Vault - Perl API for HashiCorp's Vault
version 0.03
use WebService::HashiCorp::Vault; my $vault = WebService::HashiCorp::Vault->new( token => 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', base_url => 'http://127.0.0.1:8200', # optional, default shown version => 'v1', # optional, for future use if api changes ); my $secret = $vault->secret(); my $sys = $vault->sys();
A perl API for convenience in using HashiCorp's Vault server software.
Vault secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing. Vault handles leasing, key revocation, key rolling, and auditing. Through a unified API, users can access an encrypted Key/Value store and network encryption-as-a-service, or generate AWS IAM/STS credentials, SQL/NoSQL databases, X.509 certificates, SSH credentials, and more.
This API software is a Beta release, which I am published for people to comment on and provide pull requests.
I am now fairly happy with the API and am unlikely to make any drastic changes.
But if something feels strange, please send me feedback how it would be nicer!
Alas, the "official" API's for other languages aren't much to go on. They are barely more than a small wrapper around HTTP and JSON encoding/decoding. I have tried to do better.
my $secret = $vault->secret( mount => 'secret', # optional if mounted non-default backend => 'Generic', # or MySQL, or SSH, or whatever %other_args, # other, backend specific arguments );
Parameters
A custom mount location if you have placed it somewhere other than the default.
Here are the currently supported options:
See the documentation for the backend in question. Everything will pass through to the backend's constructor.
Returns
A Generic object, all ready to be used. Or whatever object based upon provided backend parameter.
my $sys = $vault->sys( mount => 'sys', # optional if mounted non-default );
A WebService::HashiCorp::Vault::Sys object, all ready to be used.
Vault Project
Dean Hamstead <dean@fragfest.com.au>
This software is Copyright (c) 2023 by Dean Hamstad.
This is free software, licensed under:
The MIT (X11) License
To install WebService::HashiCorp::Vault, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::HashiCorp::Vault
CPAN shell
perl -MCPAN -e shell install WebService::HashiCorp::Vault
For more information on module installation, please visit the detailed CPAN module installation guide.