Skip to main content

Module identity

Module identity 

Source
Expand description

Per-worker identities.

A workers file (orbit server --workers-file workers.toml) declares every worker that may connect, how it authenticates, and what it may do:

[[worker]]
id = "payments-1"
# SHA-256 of the bearer token (hex). Generate with `orbit token`.
token_sha256 = "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
tasks = ["payments.*"]        # task patterns this worker may serve
runtime = "python"            # optional: must match the announced runtime

[[worker]]
id = "inventory"
# Authenticate with a client certificate (mutual TLS) instead of a token:
# matched against the certificate's DNS SANs and subject common name.
client_cert = "inventory.workers.internal"
tasks = ["inventory.reserve", "inventory.release"]

A worker can register only under its own id, announce only tasks its patterns allow, and use only its own sessions and task tokens.

Structs§

ClientIdentity
An application allowed to use the execution API for some workflows only ([[client]] in the workers file).
Identities
WorkerIdentity
WorkersFile

Constants§

CLIENT_ACTIONS
Actions a client identity can be granted.

Functions§

certificate_names
DNS SANs and subject common names of a certificate.
pattern_matches
sha256_hex