Documentation
¶
Overview ¶
Package runneridentity holds the local runner key and its organisation binding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDir ¶
DefaultDir is shared by runnerd and the owner's local claim command.
func Generate ¶
func Generate(stateDir string) (ed25519.PrivateKey, error)
Generate persists a new key before it can be submitted for registration. Existing keys are never overwritten, including identities a server revoked.
func PendingKey ¶ added in v0.9.3
func PendingKey(stateDir string) (ed25519.PrivateKey, error)
PendingKey returns the key a registration that never completed left behind (runner.key with no runner.json), so a retry submits that key again instead of failing on the existing file. It returns nil, nil when there is no key, and an error when an identity was already saved.
Types ¶
type Identity ¶
type Identity struct {
RunnerID uuid.UUID `json:"runner_id"`
PrivateKey ed25519.PrivateKey `json:"-"`
Fingerprint string `json:"key_fingerprint"`
OrgURLSHA256 string `json:"org_url_sha256"`
// ProxyImage is the proxy image the organisation named for this runner's architecture at
// registration; empty when it named none or named the release image. runner.json is decoded
// strictly, so a 0.9.0 wardyn-runnerd cannot load an identity that carries this field: a
// downgrade means registering again.
ProxyImage string `json:"proxy_image,omitempty"`
}
Identity never serializes its private key or a person's identity.
Click to show internal directories.
Click to hide internal directories.