NAME

WebService::HashiCorp::Vault::Secret::Cubbyhole - Perl API for HashiCorp's Vault (Secret)

VERSION

version 0.004

SYNOPSIS

 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();

DESCRIPTION

The Cubbyhole Secret Backend handling for HashiCorps Vault server software. To be used via WebService::HashiCorp::Vault.

METHODS

auth

 my $auth = $backend->auth();

Returns

The 'auth' field of the Vault servers response.

data

 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

delete

 $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.

lease_duration

 my $ld = $backend->lease_duration();

Returns

The 'lease_duration' field of the Vault servers response.

lease_id

 my $ld = $backend->lease_id();

Returns

The 'lease_id' field of the Vault servers response.

list

 my $list = $vault->secret( backend => 'cubbyhole' )->list();
 my $list = $secret->list();

Lists key names at the location

path

 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.

renewable

 my $renewable = $backend->renewable();

Returns

The 'renewable' field of the Vault servers response.

SEE ALSO

WebService::HashiCorp::Vault

AUTHOR

Dean Hamstead <dean@bytefoundry.com.au>

COPYRIGHT AND LICENSE

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.