Spectre.GAM.HostProfile (Spectre v0.4.0)

Copy Markdown View Source

Attested statement about the deployment boundary in force for a domain.

The profile records what the deployment claims (:mediated, :isolated or :development) and the assumptions behind that claim. Recording it does not prove that the physical isolation is real.

Summary

Functions

Returns the plain, string-keyed ledger representation.

Returns the content-derived reference, independent of an assigned ref.

Returns the stable digest of the complete canonical record.

Restores a host profile from its canonical map.

Builds and validates a host profile.

Types

t()

@type t() :: %Spectre.GAM.HostProfile{
  assumptions: [term()],
  attestation_ref: String.t(),
  declared_at: integer(),
  mode: :mediated | :isolated | :development,
  ref: String.t(),
  revision: pos_integer(),
  schema_version: 1
}

Functions

canonical(profile)

@spec canonical(t()) :: map()

Returns the plain, string-keyed ledger representation.

content_ref(profile)

@spec content_ref(t()) :: String.t()

Returns the content-derived reference, independent of an assigned ref.

digest(profile)

@spec digest(t()) :: String.t()

Returns the stable digest of the complete canonical record.

from_canonical(value)

@spec from_canonical(map()) :: {:ok, t()} | {:error, term()}

Restores a host profile from its canonical map.

new(profile)

@spec new(map() | keyword() | t()) :: {:ok, t()} | {:error, term()}

Builds and validates a host profile.