osmates credential grant
Grant a credential to a machine, whose programs see only its placeholder.
osmates credential grant [<options>] <name> <vm>The machine's network access must allow each of the credential's hosts, and a machine on Apple Virtualization needs Allowed Destinations Only. A grant lasts 24 hours unless --for, --until-stop or --always says otherwise; granting again renews it with the same placeholder. Programs OSMates starts in the machine find the placeholder in the credential's variable, and Node the authority's file in NODE_EXTRA_CA_CERTS.
Arguments
<name>RequiredThe credential's name.
<vm>RequiredThe machine's name or identifier.
--for <duration>How long it lasts, from 1m to 30d, such as 90m, 8h or 7d.
--until-stopUntil the machine stops; a suspension keeps it.
--alwaysUntil it is revoked.
--with-clonesClones of the machine keep the grant, whoever makes them; an agent sandbox never does.
--jsonPrint machine-readable JSON.
JSON output
With --json, it prints an object with these fields.
JSON Schema: /schemas/0/cli/credential/grant.json
changedAtstring (date-time)RequiredcreatedAtstring (date-time)Requiredgrantsarray of objectsRequiredgrants[].activebooleanRequiredgrants[].endedobjectgrants[].expiryobject or stringRequiredOne of
machineStop,never, or an object that holds one key:at.grants[].grantedAtstring (date-time)Requiredgrants[].includesClonesbooleanRequiredgrants[].machinestringRequiredgrants[].machineIDstring (uuid)Requiredgrants[].placeholderstringRequiredidstring (uuid)RequirednamestringRequiredusesarray of objectsRequireduses[].hostobjectRequireduses[].placeobject or stringRequiredOne of
basic, or an object that holds one key:headerorquery.variablestring
Fields nested deeper are in the schema.
Exit statuses
Its exit status is one of these.
| Status | Meaning |
|---|---|
| 0 | The command did what it was asked. |
| 1 | The command failed; with --json, standard error's last line is the error object. |
| 64 | The command line is wrong, as ArgumentParser found before the command ran. |
| 65 | What was given is wrong, found while the command ran; the same command fails until it changes. |
| 75 | The same command can work later with nothing changed, as while an update finishes. |
| 130 | Control-C cancelled what the command started. |