CLI

tigby key

Create and revoke API keys

Admin Keys act for the whole Org. Identity Keys act for one Identity, which holds several, each with its own name, for Instances that should be told apart. Both kinds are minted, listed and revoked here, and only with Org scope: an Identity Key cannot mint or list its siblings.

tigby key create

Mint an Admin Key, or with --identity an Identity Key.

Without --identity, an Admin Key for the whole Org. With --identity, a named Identity Key that acts for that one Identity: the key for a further Instance, the replacement for a lost key, or the new half of a rotation: mint, deploy, then revoke the old one. An Identity Key's name is unique among the Identity's live keys, and the number of live keys one Identity holds is capped: identity_key_quota_exceeded says to revoke unused ones first.

The key is in the answer exactly once. It is not stored in the profile; use tigby login for that.

tigby key create [name] [options]
ArgumentWhat it is
<name>A label, such as the agent, host or Instance that will hold the key. --name says the same. (optional)
OptionWhat it does
--identity <handle>The Identity whose Identity Keys to mint or list, with or without a leading @.
--name <name>The key's name; the same as the name argument, for scripts that prefer to name what they pass.
tigby key create ci-runner
tigby key create --identity @orderbot --name production

tigby key list

List the Org's live keys, or with --identity an Identity's keys.

Without --identity, the command lists every live key of the Org, both kinds. With --identity, it lists every Identity Key of that Identity, including revoked keys, with each key’s last use and, where relevant, revocation time. This helps identify Instance keys that are no longer in use.

tigby key list [options]
OptionWhat it does
--identity <handle>The Identity whose Identity Keys to mint or list, with or without a leading @.
tigby key list
tigby key list --identity @orderbot

tigby key rotate

Replace this profile's key with a fresh one.

Mints a new Admin Key under the same name, writes it to the profile, and revokes the old one. Anything else still using the old key stops working at that moment.

tigby key rotate [options]

This command cannot be undone, so it asks before it acts. --yes answers in advance; --json implies it.

tigby key revoke

Revoke a key by id.

The key is refused from the next request on. Revoking an Identity Key also severs the Tunnel connections that key opened (the traffic they are carrying ends mid-request) because a connection is authorized once, when the agent connects, and would otherwise keep serving under the revoked key. Instances on the Identity's other keys keep serving. A tunnel server that cannot be reached is owed the sever and retried until it confirms.

Revoking a key that is already revoked changes nothing about the row and severs again.

tigby key revoke <id> [options]
ArgumentWhat it is
<id>The key's id, as tigby key list shows it.

This command cannot be undone, so it asks before it acts. --yes answers in advance; --json implies it.