bide-hsm command reference
bide-hsm is bide approve for approvers whose signing keys are in an HSM, on a smart card or token, or in a cloud KMS. It is a separate program because the PKCS#11 library it loads needs cgo, and the bide command is built without it. It is not in the release archives: build it from source (it needs a C compiler for PKCS#11 keys; without cgo it builds and still signs with a KMS key):
sh
CGO_ENABLED=1 go install github.com/bide-ai/bide/cmd/bide/bide-hsm@latestKey custody is explained in the key custody guide; the approval flow in Human approval. Flags take one dash, as in bide. Exit status is 0 for success, 1 for a refusal or a failure, and 2 for a usage error.
| Command | What it does |
|---|---|
bide-hsm approve | record your signed approval (or -reject) of a call that waits for a decision, with a key in an HSM or KMS; -list shows what waits |
bide-hsm pubkey | print the public key of a key in an HSM or KMS, and the approver-keys entry that enrols it |
bide-hsm csr | write a certificate signing request for a key in an HSM or KMS, signed by that key, for the CA that issues the certificate bide-hsm approve -cert uses |
bide-hsm version | print the version and whether this build can use PKCS#11 keys |
bide-hsm approve
text
bide-hsm approve: record a signed approval, or a rejection, of a call that waits for a decision,
with a key in an HSM or a KMS
bide-hsm approve -db <file> -run <id> -call <tool-use id> -as <approver> -key <key ref> -approver-keys <keys> [flags]
bide-hsm approve -postgres-env <VAR> -run <id> -call <tool-use id> -as <approver> -key <key ref> -approver-keys <keys>
bide-hsm approve -db <file> -list
This is bide approve (see bide approve -h, and the bide command reference) with one difference:
-key is a reference to a key that stays in an HSM or a KMS, not a key file. Everything else is the
same code: what it shows, the confirmation, the checks that refuse, -approver-keys, -unverified,
-reject, -yes, -full, -list, -json, -verify-receipt, the exit status (0 on success, 1 if it
refused or failed, 2 for a usage error). Two differences follow from the key: a default receipt is
written in the working directory (there is no key file to put it beside), and the HSM or KMS is
opened (a PKCS#11 login; for KMS, one billed self-test signature) after the checks on the gate
pass and before you are asked to confirm, so that the key shown is the key that signs. The
decision itself is signed only after you confirm. A refusal on the gate (you are not an approver,
you already decided the other way) and a repeat of a decision that already counts happen before
the key is opened.
A certificate-bound approver uses -cert <chain.pem> (and -identity-policy <policy file>), exactly as with
bide approve: the key stays in the HSM or KMS, the certificate is issued for its public key (bide-hsm pubkey
prints it; the CA's request is signed by the key), and the command refuses a key that is not the key of the
certificate's leaf before it asks the HSM or KMS to sign anything. The chain is a PEM file; a certificate
object on the token is not read. The file, the policy and the validity are checked before the key is opened.
A key reference is one of:
pkcs11:token=<label>;object=<label>?module-path=<absolute path>&pin-source=file:/path
An RFC 7512 PKCS#11 URI, for a key in an HSM or on a smart card or token. token (or
slot-id) selects the token; object (the key's label), id (its CKA_ID as percent-encoded
bytes) or both select the key; module-path is the vendor's PKCS#11 library, loaded and run
by this program, so name only a library you trust. The PIN is read from
pin-source=file:/absolute/path (on Unix the file must not be readable by others) or
pin-source=env:NAME, or asked for on the controlling terminal with echo off by
pin-source=prompt (never read from a pipe; refused when there is no terminal), or typed on
the token's own PIN pad by pin-source=protected (the token must report a protected
authentication path, else it is refused; needs -alg, as each login asks on the pad), and with
no pin-source from $BIDE_HSM_PIN. The PIN is never part of the
reference: pin-value is refused, and so is every attribute not listed here (serial,
manufacturer, module-name, ...), not ignored, since an ignored attribute would let a
reference select a key more loosely than it reads. Percent-encode ; ? & = % and spaces in a
value, and quote the whole reference in a shell, which treats ; and & as operators.
awskms:arn:aws:kms:<region>:<account>:key/<id>
An AWS KMS key by its full ARN (alias/<name> in place of key/<id> names an alias, which is
resolved once). Credentials come from the AWS SDK's default chain (environment, shared
config, instance or task role); the ARN's region is used.
gcpkms:projects/<p>/locations/<l>/keyRings/<r>/cryptoKeys/<k>/cryptoKeyVersions/<n>
A Google Cloud KMS key version by its full resource name with the numeric version (no alias,
no "latest": signing uses exactly that version). Credentials are Google's application default
credentials. Only an HSM-backed version is used unless -allow-software-key (Cloud KMS has no
HSM-backed Ed25519 key, so an Ed25519 key needs it, and approve then says so beside the key);
-verify-attestation requires the key's Cloud HSM attestation to prove it was generated in the
HSM and cannot be extracted.
azurekv:https://<vault>.vault.azure.net/keys/<name>/<32-hex-version>
An Azure Key Vault or Managed HSM key by its full identifier with the version pinned (a base
identifier without a version would follow rotation and is refused). The key is ECDSA P-256 (Key
Vault has no Ed25519), HSM-protected unless -allow-software-key, and not exportable.
Credentials are the Azure SDK's default credential chain. The principal needs the
"Key Vault Crypto User" role (Managed HSM Crypto User) on the key.
The key is Ed25519 or ECDSA P-256, the schemes HSMs and KMS sign; -alg names the scheme, and
without it the key's type is detected. A PKCS#11 key must be marked non-extractable and sensitive
by the token, or it is refused, since a key that can be read out of the token defeats keeping it
there; -allow-extractable lifts that, and bide-hsm approve then says so beside the key. The token
or KMS signs; bide-hsm never holds the private key.
Flags:
-alg string
the key's scheme: ed25519 or ecdsa-p256 (default: detect it)
-allow-extractable
use a PKCS#11 key the token does not mark non-extractable and sensitive; by default such a key is refused
-allow-software-key
use a software-protected key: a Google Cloud KMS key version at protection level SOFTWARE, or an Azure Key Vault key that is not HSM-protected; by default only an HSM-backed key is used, and Cloud KMS has no HSM-backed Ed25519 key
-approver-keys string
approver public keys, a JSON object of approver id to key text, e.g. {"ops":"ed25519:ab12..."}, the file bide view -approver-keys reads, or - for standard input, or a <(...) process substitution (which then also needs -yes) (bide-hsm pubkey -as prints an entry): refuse a -key that is not the one enrolled for -as, and verify the tally. Required for an m-of-n gate unless -unverified
-as string
your approver id, exactly as the gate's policy lists it (not for a single-approver gate)
-call string
the call's tool-use ID (for a plan flow node, its key, such as node:review)
-cert string
sign a certificate-bound decision (bide.approval.v4) with your certificate chain: a PEM file, leaf first, the leaf being the certificate of -key. The key must be the leaf's key (checked before anything is signed), and with -identity-policy the chain must be accepted for -as at this moment. Never falls back to a bare-key decision
-cert-min-left duration
with -cert: the least validity the leaf must have left, so the decision is provable before the certificate expires (default 1m0s)
-client-cert string
with -to: a PEM client certificate for mutual TLS (with -client-key)
-client-key string
with -to: the PEM private key of -client-cert
-color when
when to color the output: auto (the default: on a terminal, unless NO_COLOR is set or TERM is dumb), always or never
-db string
SQLite journal file
-full
show all of the call's arguments, not the first lines
-identity-policy string
the certificate policy file (trust anchors, pinned intermediates, the approver-to-identity map; see docs/guides/certificate-approvers.md). With -cert: your chain must be accepted for -as by it at this moment, before anything is signed. With -verify-receipt, for a certificate-bound receipt: the chain and identity are checked against it at the time the receipt's anchoring head was signed; revocation status is not checked
-item string
take -run and -call exactly from one call of bide approve -list -json output instead: a file, or - for standard input, or a <(...) process substitution (which then also needs -yes, since the confirmation would read the same input). The input is one call's object, or an array of exactly one. For ids that cannot be pasted on a command line (a line break or an invisible or bidirectional character in them)
-json
with -list: print the waiting calls as JSON
-key string
reference to your key in an HSM or KMS: a pkcs11: URI (RFC 7512; quote it), awskms:<key ARN>, gcpkms:<key version> or azurekv:<key identifier>; not for a single-approver gate
-list
list the calls that wait for a decision, each with its bide-hsm approve command; nothing is recorded
-log-key string
with -verify-receipt, for a certificate-bound receipt: the audit log's public key (ed25519:<hex>, or a file holding it, or - for standard input, or a <(...) process substitution, which then also needs -yes), which vouches for the receipt's anchoring proof
-postgres string
Postgres journal, a pgx DSN such as postgres://user:pass@host:5432/db; prefer -postgres-env, which keeps the password out of the argument list
-postgres-env string
name of the environment variable that holds the Postgres DSN
-receipt string
where to write the decision receipt (default: in the working directory, named <run>-<call>-<approver>-<time>.receipt.json); mode 0600, never overwritten
-reject
record a rejection instead of an approval
-run string
the run whose journal holds the call: the pause's run ID
-tls-ca string
with -to: the PEM CA certificate(s) that sign the endpoint's certificate, instead of the system roots
-to string
decide through an application's approval intake (package approvals) at this base URL (https, or http to loopback) instead of writing a journal: the call is fetched from the endpoint, shown, signed and posted
-token-env string
with -to: name of the environment variable that holds a bearer token to send (the token never goes on the command line)
-unverified
decide an m-of-n gate without -approver-keys: the key is not checked against the one enrolled for you, and the tally is not verified
-verify-attestation
for a Google Cloud KMS key version in an HSM, require its Cloud HSM attestation to prove the key was generated there and cannot be extracted
-verify-receipt string
verify a decision receipt on its own, against -approver-keys, instead of deciding anything: its signature over the exact call it states
-yes
do not ask for confirmation (for scripts); what is signed is still shownbide-hsm pubkey
text
usage: bide-hsm pubkey -key <key ref> [-as <approver id>] [-alg ed25519|ecdsa-p256] [-allow-extractable]
Prints the public key of a key in an HSM or a KMS, in the form approval policies and verifiers read
(<scheme>:<hex>), and with -as the entry for the JSON object bide approve -approver-keys and bide
view -approver-keys read: {"ops": "<scheme>:<hex>"}. Enroll that key in the application that runs
the gated agent, and in the file approvers pass as -approver-keys.
It opens the key as bide-hsm approve does, so it needs the PIN (a PKCS#11 key) or the credentials
(a KMS key), checks that the key can sign, and refuses what approve refuses. For a KMS key that
check is one signature, billed as one KMS request. The private key is never read out.
A key reference is one of:
pkcs11:token=<label>;object=<label>?module-path=<absolute path>&pin-source=file:/path
An RFC 7512 PKCS#11 URI, for a key in an HSM or on a smart card or token. token (or
slot-id) selects the token; object (the key's label), id (its CKA_ID as percent-encoded
bytes) or both select the key; module-path is the vendor's PKCS#11 library, loaded and run
by this program, so name only a library you trust. The PIN is read from
pin-source=file:/absolute/path (on Unix the file must not be readable by others) or
pin-source=env:NAME, or asked for on the controlling terminal with echo off by
pin-source=prompt (never read from a pipe; refused when there is no terminal), or typed on
the token's own PIN pad by pin-source=protected (the token must report a protected
authentication path, else it is refused; needs -alg, as each login asks on the pad), and with
no pin-source from $BIDE_HSM_PIN. The PIN is never part of the
reference: pin-value is refused, and so is every attribute not listed here (serial,
manufacturer, module-name, ...), not ignored, since an ignored attribute would let a
reference select a key more loosely than it reads. Percent-encode ; ? & = % and spaces in a
value, and quote the whole reference in a shell, which treats ; and & as operators.
awskms:arn:aws:kms:<region>:<account>:key/<id>
An AWS KMS key by its full ARN (alias/<name> in place of key/<id> names an alias, which is
resolved once). Credentials come from the AWS SDK's default chain (environment, shared
config, instance or task role); the ARN's region is used.
gcpkms:projects/<p>/locations/<l>/keyRings/<r>/cryptoKeys/<k>/cryptoKeyVersions/<n>
A Google Cloud KMS key version by its full resource name with the numeric version (no alias,
no "latest": signing uses exactly that version). Credentials are Google's application default
credentials. Only an HSM-backed version is used unless -allow-software-key (Cloud KMS has no
HSM-backed Ed25519 key, so an Ed25519 key needs it, and approve then says so beside the key);
-verify-attestation requires the key's Cloud HSM attestation to prove it was generated in the
HSM and cannot be extracted.
azurekv:https://<vault>.vault.azure.net/keys/<name>/<32-hex-version>
An Azure Key Vault or Managed HSM key by its full identifier with the version pinned (a base
identifier without a version would follow rotation and is refused). The key is ECDSA P-256 (Key
Vault has no Ed25519), HSM-protected unless -allow-software-key, and not exportable.
Credentials are the Azure SDK's default credential chain. The principal needs the
"Key Vault Crypto User" role (Managed HSM Crypto User) on the key.
The key is Ed25519 or ECDSA P-256, the schemes HSMs and KMS sign; -alg names the scheme, and
without it the key's type is detected. A PKCS#11 key must be marked non-extractable and sensitive
by the token, or it is refused, since a key that can be read out of the token defeats keeping it
there; -allow-extractable lifts that, and bide-hsm approve then says so beside the key. The token
or KMS signs; bide-hsm never holds the private key.
Flags:
-alg string
the key's scheme: ed25519 or ecdsa-p256 (default: detect it)
-allow-extractable
use a PKCS#11 key the token does not mark non-extractable and sensitive; by default such a key is refused
-allow-software-key
use a software-protected key: a Google Cloud KMS key version at protection level SOFTWARE, or an Azure Key Vault key that is not HSM-protected; by default only an HSM-backed key is used, and Cloud KMS has no HSM-backed Ed25519 key
-as string
the approver id the key is for: prints the approver-keys entry for it
-color when
when to color the output: auto (the default: on a terminal, unless NO_COLOR is set or TERM is dumb), always or never
-key string
reference to the key: a pkcs11: URI (quote it), awskms:<key ARN>, gcpkms:<key version> or azurekv:<key identifier>
-verify-attestation
for a Google Cloud KMS key version in an HSM, require its Cloud HSM attestation to prove the key was generated there and cannot be extractedbide-hsm csr
text
usage: bide-hsm csr -key <key ref> [-out <file>] [-force] [-policy <policy file> -as <approver id>] [-san-email <address> | -san-uri <uri>] [-eku <usage>[,<usage>...]] [-cn <name>] [key flags]
Writes a PKCS#10 certificate signing request (PEM) for a key in an HSM or a KMS, signed by that key
through the same key sources as bide-hsm approve, so no vendor tooling is needed. It is the request a
CA or identity provider turns into the certificate bide-hsm approve -cert uses. The key signs the
request once and is never read out; for a KMS key that is one Sign call (billed) beside the one
bide-hsm pubkey makes. The request holds the key's public key; before anything is written, it checks
the request's signature and that its public key is the key source's, so a faulty token or a key
replaced behind the reference writes nothing.
The key is Ed25519 (signature algorithm Ed25519, RFC 8410) or ECDSA P-256 (ecdsa-with-SHA256), the
schemes bide-hsm keys have; there is no RSA request. Ed25519 is available where the key source has it
(PKCS#11, AWS KMS, and Google Cloud KMS with -allow-software-key; not Azure Key Vault).
The request is written to -out, or to standard output without -out or with -out -. A file is never
overwritten: -out names a file that does not exist, unless -force replaces a regular file (a
directory or a symbolic link is refused). Everything else goes to the other stream (to standard
error when the request is on standard output), so the output is only the request.
By default the request names nothing (an empty subject, no extensions): the CA sets the name, the
usage and the policy. A CA may ignore or replace what a request asks for, so the certificate it issues
is what counts, and bide-hsm approve -cert checks that before anything is signed. To ask for names:
-san-email <address> one rfc822Name subject alternative name (a bare address)
-san-uri <uri> one URI subject alternative name (absolute, with a host, no fragment)
-eku <usage>,... extended key usages: clientAuth, serverAuth, emailProtection, codeSigning,
timeStamping, ocspSigning, or a dotted OID
-cn <name> the subject: one common name (printable ASCII text, at most 64 characters)
The gate reads no subject, so -cn changes nothing about who may approve. It exists because step ca sign
refuses a request with an empty subject (it needs a name to start its single sign-on login); the SSO
CA's template ignores it. Without -cn the subject stays empty. -cn goes with -policy.
-policy <file> with -as <approver id> reads the certificate policy file bide-hsm approve takes as
-identity-policy and asks for what the policy's gate looks for: as the one SAN, the approver's
identifier in the policy (an email address or a person URI, in the policy's canonical form), and the
policy's extended key usage. Then -san-email, -san-uri and -eku are refused: the policy decides. It
cannot ask for the policy OID (a CA asserts it, after the bank's sign-on and checks), and says on
standard error what the CA must issue for the gate to accept the certificate: the one SAN, the
usage, the policy OID and the longest lifetime. It reads the policy only; it checks no certificate.
Check a request before sending it: openssl req -in <file> -noout -verify -text.
Exit status is 0 on success, 1 if the key could not be used, the request failed its checks or the
output was refused, 2 for a usage error.
A key reference is one of:
pkcs11:token=<label>;object=<label>?module-path=<absolute path>&pin-source=file:/path
An RFC 7512 PKCS#11 URI, for a key in an HSM or on a smart card or token. token (or
slot-id) selects the token; object (the key's label), id (its CKA_ID as percent-encoded
bytes) or both select the key; module-path is the vendor's PKCS#11 library, loaded and run
by this program, so name only a library you trust. The PIN is read from
pin-source=file:/absolute/path (on Unix the file must not be readable by others) or
pin-source=env:NAME, or asked for on the controlling terminal with echo off by
pin-source=prompt (never read from a pipe; refused when there is no terminal), or typed on
the token's own PIN pad by pin-source=protected (the token must report a protected
authentication path, else it is refused; needs -alg, as each login asks on the pad), and with
no pin-source from $BIDE_HSM_PIN. The PIN is never part of the
reference: pin-value is refused, and so is every attribute not listed here (serial,
manufacturer, module-name, ...), not ignored, since an ignored attribute would let a
reference select a key more loosely than it reads. Percent-encode ; ? & = % and spaces in a
value, and quote the whole reference in a shell, which treats ; and & as operators.
awskms:arn:aws:kms:<region>:<account>:key/<id>
An AWS KMS key by its full ARN (alias/<name> in place of key/<id> names an alias, which is
resolved once). Credentials come from the AWS SDK's default chain (environment, shared
config, instance or task role); the ARN's region is used.
gcpkms:projects/<p>/locations/<l>/keyRings/<r>/cryptoKeys/<k>/cryptoKeyVersions/<n>
A Google Cloud KMS key version by its full resource name with the numeric version (no alias,
no "latest": signing uses exactly that version). Credentials are Google's application default
credentials. Only an HSM-backed version is used unless -allow-software-key (Cloud KMS has no
HSM-backed Ed25519 key, so an Ed25519 key needs it, and approve then says so beside the key);
-verify-attestation requires the key's Cloud HSM attestation to prove it was generated in the
HSM and cannot be extracted.
azurekv:https://<vault>.vault.azure.net/keys/<name>/<32-hex-version>
An Azure Key Vault or Managed HSM key by its full identifier with the version pinned (a base
identifier without a version would follow rotation and is refused). The key is ECDSA P-256 (Key
Vault has no Ed25519), HSM-protected unless -allow-software-key, and not exportable.
Credentials are the Azure SDK's default credential chain. The principal needs the
"Key Vault Crypto User" role (Managed HSM Crypto User) on the key.
The key is Ed25519 or ECDSA P-256, the schemes HSMs and KMS sign; -alg names the scheme, and
without it the key's type is detected. A PKCS#11 key must be marked non-extractable and sensitive
by the token, or it is refused, since a key that can be read out of the token defeats keeping it
there; -allow-extractable lifts that, and bide-hsm approve then says so beside the key. The token
or KMS signs; bide-hsm never holds the private key.
Flags:
-alg string
the key's scheme: ed25519 or ecdsa-p256 (default: detect it)
-allow-extractable
use a PKCS#11 key the token does not mark non-extractable and sensitive; by default such a key is refused
-allow-software-key
use a software-protected key: a Google Cloud KMS key version at protection level SOFTWARE, or an Azure Key Vault key that is not HSM-protected; by default only an HSM-backed key is used, and Cloud KMS has no HSM-backed Ed25519 key
-as string
the approver id in the -policy file whose identifier the request asks for
-cn string
make the request's subject this one common name (printable ASCII, at most 64 characters). The gate ignores the subject; step ca sign needs one
-color when
when to color the output: auto (the default: on a terminal, unless NO_COLOR is set or TERM is dumb), always or never
-eku string
ask for these extended key usages, comma separated: clientAuth, serverAuth, emailProtection, codeSigning, timeStamping, ocspSigning or a dotted OID
-force
replace -out if it is a regular file that exists
-key string
reference to the key: a pkcs11: URI (quote it), awskms:<key ARN>, gcpkms:<key version> or azurekv:<key identifier>
-out string
where to write the request (default, or -: standard output); a file that exists is not overwritten without -force
-policy string
the certificate policy file (as bide-hsm approve -identity-policy): ask for the identifier and usage it expects for -as; needs -as
-san-email string
ask for this email address as the one subject alternative name
-san-uri string
ask for this URI as the one subject alternative name
-verify-attestation
for a Google Cloud KMS key version in an HSM, require its Cloud HSM attestation to prove the key was generated there and cannot be extractedbide-hsm version
text
usage: bide-hsm versionPrints bide-hsm <version> and whether the build can use PKCS#11 keys (built with cgo) or only KMS keys.
bide-hsm help
text
bide-hsm: bide approve for approvers whose keys are in an HSM or a cloud KMS
bide-hsm approve -db <file> -run <id> -call <tool-use id> -as <approver> -key <key ref> -approver-keys <keys> [flags]
bide-hsm approve -db <file> -list
bide-hsm stop -db <file> -all|-tool <name>|-flow <name>|-agent <name> -reason <text> -stop-policy <file> -as <approver> -key <key ref>
bide-hsm audit stops -db <file> -stop-policy <file> -pubkey <key> -sign-head -log-key <key ref> -head-out <file>
bide-hsm journal redact|acknowledge|hold ... -sign-key <key ref> (hold authorize: -authorizer-key <key ref>)
bide-hsm pubkey -key <key ref> [-as <approver>]
bide-hsm csr -key <key ref> [-out <file>] [-policy <policy file> -as <approver>]
bide-hsm version
bide-hsm approve is bide approve, with -key naming a key by reference instead of a key file. It
reads the call from the journal, shows what it will sign, asks you to confirm, has the HSM or KMS
sign the decision, checks it against the call, records it, and writes a receipt.
bide-hsm pubkey prints the approver-keys entry that enrols a key. bide-hsm csr writes a certificate
signing request for a key, signed by the key, for a certificate-bound approver. bide-hsm stop is bide stop
for the kill switch's audited mode, with -key naming the HSM or KMS key that signs the stop, the lift or the
change of mode. bide-hsm audit stops is bide audit stops, whose -sign-head signs the stop trail's head with
-log-key naming the log key in an HSM or KMS. bide-hsm journal is bide journal (redact, acknowledge, hold), with the key
that signs the redaction trail (-sign-key), and for hold authorize the second person's key (-authorizer-key), named by reference.
Each command takes -h.
A key reference is one of:
pkcs11:token=<label>;object=<label>?module-path=<absolute path>&pin-source=file:/path
An RFC 7512 PKCS#11 URI, for a key in an HSM or on a smart card or token. token (or
slot-id) selects the token; object (the key's label), id (its CKA_ID as percent-encoded
bytes) or both select the key; module-path is the vendor's PKCS#11 library, loaded and run
by this program, so name only a library you trust. The PIN is read from
pin-source=file:/absolute/path (on Unix the file must not be readable by others) or
pin-source=env:NAME, or asked for on the controlling terminal with echo off by
pin-source=prompt (never read from a pipe; refused when there is no terminal), or typed on
the token's own PIN pad by pin-source=protected (the token must report a protected
authentication path, else it is refused; needs -alg, as each login asks on the pad), and with
no pin-source from $BIDE_HSM_PIN. The PIN is never part of the
reference: pin-value is refused, and so is every attribute not listed here (serial,
manufacturer, module-name, ...), not ignored, since an ignored attribute would let a
reference select a key more loosely than it reads. Percent-encode ; ? & = % and spaces in a
value, and quote the whole reference in a shell, which treats ; and & as operators.
awskms:arn:aws:kms:<region>:<account>:key/<id>
An AWS KMS key by its full ARN (alias/<name> in place of key/<id> names an alias, which is
resolved once). Credentials come from the AWS SDK's default chain (environment, shared
config, instance or task role); the ARN's region is used.
gcpkms:projects/<p>/locations/<l>/keyRings/<r>/cryptoKeys/<k>/cryptoKeyVersions/<n>
A Google Cloud KMS key version by its full resource name with the numeric version (no alias,
no "latest": signing uses exactly that version). Credentials are Google's application default
credentials. Only an HSM-backed version is used unless -allow-software-key (Cloud KMS has no
HSM-backed Ed25519 key, so an Ed25519 key needs it, and approve then says so beside the key);
-verify-attestation requires the key's Cloud HSM attestation to prove it was generated in the
HSM and cannot be extracted.
azurekv:https://<vault>.vault.azure.net/keys/<name>/<32-hex-version>
An Azure Key Vault or Managed HSM key by its full identifier with the version pinned (a base
identifier without a version would follow rotation and is refused). The key is ECDSA P-256 (Key
Vault has no Ed25519), HSM-protected unless -allow-software-key, and not exportable.
Credentials are the Azure SDK's default credential chain. The principal needs the
"Key Vault Crypto User" role (Managed HSM Crypto User) on the key.
The key is Ed25519 or ECDSA P-256, the schemes HSMs and KMS sign; -alg names the scheme, and
without it the key's type is detected. A PKCS#11 key must be marked non-extractable and sensitive
by the token, or it is refused, since a key that can be read out of the token defeats keeping it
there; -allow-extractable lifts that, and bide-hsm approve then says so beside the key. The token
or KMS signs; bide-hsm never holds the private key.