ASM.RuntimeAuth (ASM v0.10.0)

Copy Markdown View Source

ASM-local runtime-auth context for standalone provider execution.

This module is intentionally owner-local to ASM. It records standalone execution context and connector evidence, but it does not issue durable credential leases or assert governed authority.

Summary

Types

mode()

@type mode() :: :standalone | :governed

t()

@type t() :: %ASM.RuntimeAuth{
  connector_binding: ASM.RuntimeAuth.ConnectorBinding.t(),
  connector_instance: ASM.RuntimeAuth.ConnectorInstance.t(),
  connector_invocation_evidence: map(),
  execution_context: ASM.RuntimeAuth.ExecutionContext.t(),
  mode: mode(),
  provider_account_identity: ASM.RuntimeAuth.ProviderAccountIdentity.t(),
  provider_auth_backend: atom()
}

Functions

accept_handoff(packet, opts \\ [])

@spec accept_handoff(
  ASM.RuntimeAuth.HandoffPacket.t() | map(),
  keyword()
) :: {:ok, map()} | {:error, ASM.Error.t()}

authorize_governed_provider_runtime(provider, config, provider_opts)

@spec authorize_governed_provider_runtime(atom(), map(), keyword()) ::
  :ok | {:error, ASM.Error.t()}

for_run(runtime_auth, run_id, opts \\ [])

@spec for_run(t(), String.t(), keyword()) :: {:ok, t()} | {:error, ASM.Error.t()}

governed_authority?(runtime_auth)

@spec governed_authority?(t() | map() | term()) :: boolean()

governed_context?(runtime_auth)

@spec governed_context?(t() | map() | term()) :: boolean()

handoff_packet(runtime_auth, opts \\ [])

@spec handoff_packet(
  t(),
  keyword()
) :: {:ok, ASM.RuntimeAuth.HandoffPacket.t()} | {:error, ASM.Error.t()}

new(session_id, provider, opts \\ [])

@spec new(String.t(), atom(), keyword()) :: {:ok, t()} | {:error, ASM.Error.t()}

new!(session_id, provider, opts \\ [])

@spec new!(String.t(), atom(), keyword()) :: t()

option_keys()

@spec option_keys() :: [atom()]

provider_account_statuses()

@spec provider_account_statuses() :: [atom()]

provider_auth_env_keys(provider)

@spec provider_auth_env_keys(atom()) :: [String.t()]

to_map(runtime_auth)

@spec to_map(t()) :: map()

to_metadata(runtime_auth)

@spec to_metadata(t()) :: map()