Ptolemy v0.2.0 Ptolemy.Engines.GCP.Engine View Source
Ptolemy.Engines.GCP.Engine
provides low level API interaction with the Vault GCP Secrets Engine
More information on the API this implements can be found at https://www.vaultproject.io/api/secret/gcp/index.html
Link to this section Summary
Functions
Submits a POST request to the client to create a roleset
Submits a GET request to the client to retrieve a service account key from a service_account_key
roleset
Submits a GET request to the client to retrieve a temporary Oauth2 token from an access_token
roleset
Submits a GET request to the client to retrieve the configuration of a given roleset
Submits a POST request to the client to rotate a roleset account's email and Key ID
Submits a POST request to the client to rotate a roleset account's Key ID
Link to this section Functions
create_roleset(client, name, payload)
View Source
create_roleset(Tesla.Client.t(), String.t(), Ptolemy.Engines.GCP.roleset()) ::
{:ok, String.t()} | {:error, String.t()}
create_roleset(Tesla.Client.t(), String.t(), Ptolemy.Engines.GCP.roleset()) :: {:ok, String.t()} | {:error, String.t()}
Submits a POST request to the client to create a roleset.
gen_key(client, roleset_name)
View Source
gen_key(Tesla.Client.t(), String.t()) :: {:ok, map()} | {:error, String.t()}
gen_key(Tesla.Client.t(), String.t()) :: {:ok, map()} | {:error, String.t()}
Submits a GET request to the client to retrieve a service account key from a service_account_key
roleset.
gen_token(client, roleset_name)
View Source
gen_token(Tesla.Client.t(), String.t()) :: {:ok, map()} | {:error, String.t()}
gen_token(Tesla.Client.t(), String.t()) :: {:ok, map()} | {:error, String.t()}
Submits a GET request to the client to retrieve a temporary Oauth2 token from an access_token
roleset.
read_roleset(client, roleset_name)
View Source
read_roleset(Tesla.Client.t(), String.t()) ::
{:ok, map()} | {:error, String.t()}
read_roleset(Tesla.Client.t(), String.t()) :: {:ok, map()} | {:error, String.t()}
Submits a GET request to the client to retrieve the configuration of a given roleset.
rotate_roleset(client, roleset_name)
View Source
rotate_roleset(Tesla.Client.t(), String.t()) ::
{:ok, String.t()} | {:error, String.t()}
rotate_roleset(Tesla.Client.t(), String.t()) :: {:ok, String.t()} | {:error, String.t()}
Submits a POST request to the client to rotate a roleset account's email and Key ID.
rotate_roleset_key(client, roleset_name)
View Source
rotate_roleset_key(Tesla.Client.t(), String.t()) ::
{:ok, String.t()} | {:error, String.t()}
rotate_roleset_key(Tesla.Client.t(), String.t()) :: {:ok, String.t()} | {:error, String.t()}
Submits a POST request to the client to rotate a roleset account's Key ID.
Only works on access_token
type rolesets.