Skip to main content

Module lease

Module lease 

Source
Expand description

Instance lease and the Cloud signing key set.

  • GET /v1/keys → CloudKeySetV1, signed by the Cloud root key that is compiled into the engine (self-host: [cloud] root_key).
  • The lease arrives in enrollment and from lease/renew as CloudLeaseEnvelopeV1, signed by a key of the key set.
  • Cloud-Protocol 2.1: an enrollment of a 2.1+ engine carries key set v3 (CloudKeySetV3, C0 2.x keyset.schema.json) instead of v1; the lease kid then names the v3 key of purpose policy (EnrollmentKeySet).

A lease is Valid until expires_at, Grace until grace_until, then Lapsed. Local tools never depend on the lease; only Cloud traffic does.

Structs§

CloudKeySetV1
GET /v1/keys. The signature covers the object without signature. Engines keep the raw JSON (keys.json) and verify it with CloudKeySetV1::signing_input_raw.
CloudKeySetV3
Key set v3 as an enrollment of Cloud-Protocol 2.1+ carries it. The engine verifies signatures against its trusted roots; the legacy single signature is for pre-3.12 engines.
CloudKeyV1
One Cloud signing key.
CloudKeyV3
One key of a key set v3. Purposes stay strings here: the set’s root signature covers them, and the engine checks each use against them.
CloudLeaseEnvelopeV1
Lease as it travels: the raw lease object plus its signature.
CloudLeaseV1
The signed lease statement.
CloudOrgSettingsV1
Organization-wide switches the lease carries (1.4). They only narrow: an engine uploads only what both its own [cloud] setting and these allow, and receipts still need the receipts.upload right.
CloudRootSignatureV3
One root signature of a key set v3.

Enums§

CloudPlan
Plan of the organization.
CloudRight
A right granted to this instance. Unknown rights decode as Unknown and grant nothing.
EnrollmentKeySet
The key set of an enrollment: v1 for an engine below Cloud-Protocol 2.1, v3 from 2.1 (told apart by schema). Either way the lease kid names a key of this set, and the engine verifies the set as it verifies that version everywhere else.
LeaseState
Where a lease stands at a given (offset-corrected) time.

Constants§

KEYSET_SCHEMA
KEYSET_V3_SCHEMA
Key set v3 (C0 2.x E13), in enrollments of Cloud-Protocol 2.1+.
LEASE_ENVELOPE_SCHEMA
LEASE_KEY_PURPOSE
The v3 purpose of the keys that sign leases (and policy bundles).
LEASE_RENEW_BEFORE_HOURS
The engine renews when less than this remains before expires_at.
LEASE_SCHEMA
MAX_LEASE_FUTURE_SKEW_MINUTES
A lease issued further than this in the future (after offset correction) is refused.
MAX_LEASE_GRACE_DAYS
Longest grace_until - expires_at.
MAX_LEASE_VALIDITY_HOURS
Longest expires_at - issued_at.