Miosa.OpenComputers.Secrets (Miosa v1.0.1)

Copy Markdown View Source

Encrypted secret management for OpenComputers.

Secrets can be scoped to the whole tenant or to a specific host. The secret value is encrypted at rest and injected as environment variables on the host.

Summary

Functions

Create a tenant-scoped secret.

Create a secret scoped to a specific host.

Delete a tenant-scoped secret.

Delete a host-scoped secret.

List tenant-scoped secrets.

List secrets scoped to a specific host.

Update a tenant-scoped secret.

Types

result()

@type result() :: {:ok, map()} | {:error, Miosa.Error.t()}

Functions

create(client, attrs)

@spec create(Miosa.Client.t(), map()) :: result()

Create a tenant-scoped secret.

attrs must include :name and :value. Optional: :description.

create_for_host(client, host_id, attrs)

@spec create_for_host(Miosa.Client.t(), String.t(), map()) :: result()

Create a secret scoped to a specific host.

delete(client, secret_id)

@spec delete(Miosa.Client.t(), String.t()) :: result()

Delete a tenant-scoped secret.

delete_for_host(client, host_id, secret_id)

@spec delete_for_host(Miosa.Client.t(), String.t(), String.t()) :: result()

Delete a host-scoped secret.

list(client)

@spec list(Miosa.Client.t()) :: result()

List tenant-scoped secrets.

list_for_host(client, host_id)

@spec list_for_host(Miosa.Client.t(), String.t()) :: result()

List secrets scoped to a specific host.

update(client, secret_id, attrs)

@spec update(Miosa.Client.t(), String.t(), map()) :: result()

Update a tenant-scoped secret.