WebService::HashiCorp::Vault - Perl API for HashiCorp's Vault
version 0.003
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 an Alpha release, which I am published for people to comment on and provide pull requests.
The API will change as I try to come up with something that "feels right".
So saying that, if something is strange, please send me feedback how it would be nicer!
Unfortunatly 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.
my $secret = $vault->secret( mount => 'secret', # optional if mounted non-default backend => 'Generic', # or MySQL, or SSH, or whatever path => 'my_service' # optional secret path );
Parameters
A custom mount location if you have placed it somewhere other than the default.
Here are the currently supported options:
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@bytefoundry.com.au>
This software is copyright (c) 2017 by Dean Hamstad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
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.