NAME

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

VERSION

version 0.03

SYNOPSIS

use WebService::HashiCorp::Vault;
my $vault->new(%args);

# Grab or prepare to instantiate a secret 'path'
my $foo = $vault->secret( backend => 'generic', 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 Generic 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 => 'generic' )->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@fragfest.com.au>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2023 by Dean Hamstad.

This is free software, licensed under:

The MIT (X11) License