The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

WebService::HashiCorp::Vault::Sys - Perl API for HashiCorp's Vault (System)

VERSION

version 0.03

SYNOPSIS

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

 my $sys = $vault->sys();

 my $health = $sys->health();

DESCRIPTION

The /sys functions in the Vault REST api.

METHODS

audit

 my $audit = $sys->audit();

Returns the 'audit' of the vault from API location /sys/audit

The result is a hash reference

audit_put

 my $audit = $sys->audit($audit_device, %options);

Add an audit device. Returns true (1) if it succeeds, false (0) other wise.

audit_del

 my $audit = $sys->auth_del($audit_device);

Delete an audit device.

auth

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

Returns the 'auth' of the vault from API location /sys/auth

The result is a hash reference

auth_put

 my $audit = $sys->auth($auth_method, %options);

Add an Auth method Returns true (1) if it succeeds, false (0) other wise.

auth_del

 my $audit = $sys->auth_del($audit_device);

Delete an auth method.

generate_root

 my $generate-root = $sys->generate-root();

Returns the 'generate-root/attempt' of the vault from API location /sys/generate-root/attempt

The result is a hash reference

TODO: implement PUT and DELETE auth with this function

health

 my $health = $sys->health();

Returns the 'health' of the vault from API location /sys/health

The result is a hash reference

init

 my $init = $sys->init();

Returns the 'init' of the vault from API location /sys/init

The result is a hash reference

TODO: implement PUT

key_status

 my $key_status = $sys->key_status();

Returns the 'key-status' of the vault from API location /sys/key-status

The result is a hash reference

leader

 my $leader = $sys->init();

Returns the 'leader' of the vault from API location /sys/init

The result is a hash reference

mounts

 my $mounts = $sys->mounts();

Returns the 'mounts' of the vault from API location /sys/mounts

The result is a hash reference

TODO: implement making mounts with this function

policy

 my $policy = $sys->policy();

Returns the 'policy' of the vault from API location /sys/policy

The result is a hash reference

TODO: implement making policy with this function

rekey_init

 my $rekey_init = $sys->rekey_init();

Returns the 'rekey/init' of the vault from API location /sys/rekey/init

The result is a hash reference

TODO: implement PUT and DELETE

rekey_backup

 my $rekey_backup = $sys->rekey_backup();

Returns the 'rekey/backup' of the vault from API location /sys/rekey/backup

The result is a hash reference

TODO: implement DELETE

seal_status

 my $seal_status = $sys->seal_status();

Returns the 'seal-status' of the vault from API location /sys/seal-status

The result is a hash reference

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