lib/publiccloud/vault.pm

retry

Retry n times the execution of a function.

__login

Login to vault using _SECRET_PUBLIC_CLOUD_REST_USER and _SECRET_PUBLIC_CLOUD_REST_PW. The retrieved TOKEN is stored in this instance and used for further publiccloud::provider::api() calls.

login

Wrapper arround <$self-login()>> to have retry capability.

__api

Invoke a vault API call. It use _SECRET_PUBLIC_CLOUD_REST_URL as base url. Depending on the method (get|post) you can pass additional data as json.

api

Wrapper around <$self-api()>> to get retry capability.

get_secrets

  my $data = $csp->get_secrets('/azure/creds/openqa-role' [, max_tries => 3][, sleep_duration => 60])

This is a wrapper around api() to retrieve secrets from aws, gce or azure secret engine. It prepend '/v1/' + $NAMESPACE to the given path before sending the request. It stores lease_id and also adjust the token-live-time.

revoke

Revoke a previous retrieved credential