The customer runtime

The customer runtime lets you run a vendor's application inside your own AWS account, with no connection to a TALOS Defence service while a job is running. You pay for a licence and support, and you pay AWS for the instances.

The customer runtime runs a vendor's release inside your own environment. You get the same release, the same envelope and the same signed return as on the hosted pools. The envelope is the set of limits that TALOS Warrant compiles before a job starts. The runtime is hangar-api --profile customer, the same program as the hosted service, with a [customer] table in its configuration.

While a job is running, the runtime connects to no TALOS Defence service. The runtime checks the licence offline. The runtime compiles each envelope. The runtime signs each return under your root key. Everything that the runtime imports arrives on media that you control.

1. What the runtime keeps

ItemWhere it comes from
The customer organisation and its pool[customer]: the organisation's id, legal name, ABN and country of control, and the pool's id and name from its registration (POST /v1/pools). Every return shows the pool identity that the registration gave.
The rootYour own key site. The key set shows your organisation as the issuer.
TALOS Defence's published key setsThree files: the release key set (releases, acceptances and revocation lists), the entitlement key set (licences) and the record key set.
The licenceThe licence file, and any later licence in a site snapshot.
ReleasesRelease bundles, each imported by an owner.
The revocation listInside each release bundle and each site snapshot.

2. Starting the runtime

  1. Register the pool on the hosted service and receive its licence (Pools, Section 3.4).
  2. Place the licence file and TALOS Defence's three published key sets on the runtime's storage. Name the files in [customer] (Configuration).
  3. Set the [sandbox] rates to 0. The capacity is your own, on your own AWS bill.
  4. Run hangar-api --profile customer --selftest. The item customer runtime checks the files, the root and the licence.
  5. Run hangar-api --profile customer --first-owner NAME --email EMAIL once. The command prints a one-time value that enrols the first owner's passkey.
  6. Start the service with --profile customer.

The runtime sends no mail, so the runtime has its own sign-in: the person's passkey alone. The browser offers the passkey without a typed address. The hosted service's sign-in, a code by email and then the passkey, is not available in the runtime.

At start, the runtime makes these checks in this order. The runtime refuses to serve when one check fails:

3. The licence

The runtime checks its licence at start and once a day, offline. The runtime sends no report to TALOS Defence. A renewal is a new file. Replace the licence file, or import a site snapshot that contains the new licence. The runtime keeps the licence with the highest serial.

Licence stateJobs of installed releasesRelease importsNew tenants
In termAllowedTakenTaken, up to the licensed count
Lapsed, in the 90-day graceAllowed, and each return states the lapselicence_lapsedTaken, up to the licensed count
Lapsed, past the graceAllowed, and each return states the lapselicence_lapsedlicence_grace_ended

The licence's package count and tenant count are limits. An import of a new package past the package count gives licence_limit_reached. A tenant past the tenant count also gives licence_limit_reached.

4. Importing a release

POST /v1/runtime/releases takes a release bundle as hex. The bundle comes from GET /v1/releases/{id}/bundle. The request can also name a local channel:

{ "bundle": "a5...", "channel": "stable" }

An owner's import is the local approval of the release. The release runs in the runtime only after the import. The import moves the channel when the request names one. The runtime checks the bundle offline against TALOS Defence's release key set, or against a rotation of that key set that the root signed. The runtime checks these four things:

If you import the same bundle again, the runtime answers with the release. The widening rule (Releases) applies in the runtime, and your owners are the approvers.

5. Importing a site snapshot

POST /v1/runtime/snapshot takes a site snapshot as hex. The snapshot comes from GET /v1/pools/{id}/snapshot. The snapshot must be for this pool. The snapshot's key sets must be the configured key sets or a signed rotation of them. The runtime then imports the snapshot's revocation list and licence.

A revocation list replaces the list that the runtime holds only when its sequence is higher. Each imported list revokes the local releases that the list names, and the runtime refuses a job of a revoked release. The runtime keeps out a list with a lower sequence. The runtime refuses another list with the same sequence as the held list.

GET /v1/runtime gives the runtime's organisation, pool, issuer, licence, revocation list and policy.

6. Jobs and returns

A job starts on the runtime's own pool. The job takes the hosted path. TALOS Warrant compiles the envelope before anything starts. Each attempt is a fresh instance. The job returns once.

Before a job starts, the runtime reads the age of its revocation list. Under the policy refuse, the runtime refuses the job with revocation_list_stale when the list is older than the maximum age. Under the policy record, the job goes ahead.

Every return from the runtime has these three features:

A person verifies the return offline with your key set and TALOS Defence's release key set: hangar verify --issuer-keys. You can import a return into the pool on the hosted service with POST /v1/pools/{id}/returns. The hosted service checks the return again against the pool's licence and policy.

7. The installation check

hangar-api --profile customer --verify-install DESCRIPTION checks a description of the deployed account, as your read-only role reads the account. The description lists the security groups and their inbound rules, the buckets, and the roles with their trust policies.

The command writes an installation report as a record on the runtime's platform chain, prints the report, and exits 0 only when every item passed. A description that leaves out the security groups, the buckets or the roles fails. A policy that the check cannot read also fails. The report names each item that fails:

The report also states the licence and whether the root answers. Under not_checked, the report lists the items that you check by your own means: the artefact digests and boot measurements against the signed runtime release, and the live account.

8. The diagnostics export

hangar-api --profile customer --diagnostics-preview prints every field of the export. --diagnostics-export FILE writes the same fields to a file. The runtime signs the file with its day key and adds the day key's attestation, so the file checks offline against your key set. You send the file through your own channel. The export contains:

The keyed digests use a key that the runtime draws for each export and then drops. A short value therefore cannot be found by hashing guesses. The export reads no input, output, secret, configuration value, tenant reference or tenant name.

9. What the runtime serves

The runtime serves these things:

The Python package (gethangar) and the CLI work against the runtime when you set the endpoint.

Booking, payments, sign-up, mail, pool registration, licences, release submission and the operator plane belong to the hosted service. In the runtime, these routes answer not_in_this_runtime. On the hosted service, /v1/runtime answers runtime_only.

10. Errors

CodeStatusWhen
not_in_this_runtime404The hosted service at api.gethangar.au serves the call.
runtime_only404A customer runtime serves the call.
licence_lapsed409The licence's term has ended, so the runtime takes no new release.
licence_grace_ended409The licence ended more than 90 days ago, so the runtime takes no new tenant.
licence_limit_reached409The licence supports no more packages or tenants.
release_import_invalid422The bundle does not check against the release key set, or the package manifest is not the manifest that the release names.
snapshot_invalid422The snapshot does not check, or is for another pool.
revocation_list_stale409The held revocation list is older than the policy allows, under the policy refuse.
release_revoked409The release is on the held revocation list.

Read this page as Markdown