WebService::HashiCorp::Vault::Secret::Cubbyhole - Perl API for HashiCorp's Vault (Secret)
version 0.005
use WebService::HashiCorp::Vault; my $vault->new(%args); # Grab or prepare to instantiate a secret 'path' my $foo = $vault->secret( backend => 'cubbyhole', path => 'foo' ); # Examine the data my $data = $foo->data(); # Save the data in to the secret $foo->data({ Lorem => 'ipsum'. dolor => 'sit' amet => 'consectetur' }); # Delete the secret $foo->delete();
The Cubbyhole Secret Backend handling for HashiCorps Vault server software. To be used via WebService::HashiCorp::Vault.
my $auth = $backend->auth();
Returns
The 'auth' field of the Vault servers response.
my $data = $secret->data(); $secret->data( \%hashref );
Without arguments, returns the secrets data as a hashref (if any exists)
With an arugment (must be hashref), data is saved to the secret
$secret->delete();
Deletes the secret from the Vault server, and clears the internals of the object. The secret path and server details are retained so you can delete then save data.
my $ld = $backend->lease_duration();
The 'lease_duration' field of the Vault servers response.
my $ld = $backend->lease_id();
The 'lease_id' field of the Vault servers response.
my $list = $vault->secret( backend => 'cubbyhole' )->list(); my $list = $secret->list();
Lists key names at the location
my $obj = WebService::HashiCorp::Vault::Secret::Yours->new( path => 'yours' ); my $path = $obj->path();
Provides the path where the Secret service instance is mounted.
It is read-only once the object created.
my $renewable = $backend->renewable();
The 'renewable' field of the Vault servers response.
WebService::HashiCorp::Vault
Dean Hamstead <dean@bytefoundry.com.au>
This software is copyright (c) 2020 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.