Skip to main content

Module drone_vault

Module drone_vault 

Source
Expand description

A drone’s API node calling a site with a Vault entry’s value: the one place a drone gets a credential, the same way a command does (shell_secrets): the person is asked the first time, “Always” is a grant, the value leaves its sealed row only after that, and the response is cleaned of it before anything is kept (Drone real-world jobs spec, the Vault slice of phase 3).

The drone is the actor, as drone:<id>. It is never a named agent, so a Vault open to named agents only is refused to it as if the entry weren’t there; a Vault open to all agents is not. A grant is for one drone, one site (its origin) and one part of one entry: editing the node’s URL to another site, or the node to use another entry, asks again.

Silence is a no: a drone often runs unattended, so the Vault’s “goes ahead after 30 s” rule does not apply to it (uses::goes_ahead). The run fails that block and the next run asks again. A key that records the site or service it was saved for is bound to it: sent anywhere else, the card says so and offers Allow once only, and an earlier grant doesn’t count.

Structs§

Resolved 🔒
The value to send and what takes it back out of what comes back.

Enums§

Asking 🔒
Whether a use that has no “Always” grant may ask the person.
Binding 🔒
Whether the site an entry says it was saved for is the one the drone sends it to.

Constants§

ANSWER_WAIT 🔒
Under the call’s own timeout, so a drone waiting for the person doesn’t hold a run for long.
CALLED 🔒
The Activity line’s action.
NOT_ANSWERED 🔒
The Activity outcome of a use nobody answered, which a drone’s never goes ahead on.
NOT_SENT 🔒
POLL_LINE_EVERY_MS 🔒
How many polls a Vault Activity line stands for: one line per this long, with the count in it.

Functions§

actor 🔒
The actor a drone’s use of the Vault is recorded and granted under.
binding 🔒
Whether the entry’s recorded site fits origin (https://host[:port]): a recorded host fits that host and its subdomains; a recorded name (GitHub) fits a host whose registrable name is it (api.github.com, not github.evil.example). With no public-suffix list the name check is the host’s second label from the end, so shop.example.co.uk doesn’t fit Example: a refusal to bind, never a wrong yes.
entry_text_ok 🔒
The entry text of a node: entry or entry.part, never a {{reference}} (the entry is the graph’s, never a run’s input) and never a version (@previous, @pending are a command’s).
grant_key 🔒
The key a drone’s grant is stored under, in the grants table that web forms and commands use: drone:<id>:<origin>:<part> is neither a site’s origin nor a command’s key. It names the part and the site, so a grant for one site’s call is not one for another’s.
host_in 🔒
The host a recorded value names, when it names one: a URL (https://api.github.com/x) or a bare host name (api.github.com). A service’s name (GitHub, Acme Billing) names none.
host_of 🔒
The host of origin, for the card.
part_allowed 🔒
Whether a call may be given this part of this kind of entry: an API key’s value or a login’s password. An ID, a card, a bank account, a note or a login’s one-time code is never an Authorization header, and a drone has nobody to ask for them.
poll_cannot_ask 🔒
Why a poll, which can’t ask a person, is not sent the key: no “Always” yet, or the key is for another site.
poll_line_due 🔒
Counts a poll’s use of entry and says whether this one writes the Activity line, and for how many polls.
poll_lines 🔒
When a poll last wrote its Activity line, and how many polls since, per drone and entry.
recorded_of 🔒
The recorded site or service of an entry’s plain fields: an api-key’s service, a login’s site.
resolve 🔒
Resolves, asks for and reads the entry entry for a call to origin by drone drone_id. Nothing is read and nothing is sent unless this returns Ok.
resolve_with 🔒
resolve, saying whether a use with no grant may ask the person.
site_mismatch 🔒
What to say when the entry was saved for another site than origin; None when it fits or says no site.