pkiaas Command Reference
Manage your PKIaaS certificate authorities and keys. AI agents: start with the agent guide, or run pkiaas help agents.
Commands
Every command with its arguments and flags, apart from the global flags below and --server.
pkiaas├── acme│ ├── account│ │ ├── list --ca=STRING --limit=INT --order=STRING --policy=STRING --search=STRING --sort=STRING --status=STRING│ │ ├── revoke ID --ca=STRING --yes│ │ └── show ID --ca=STRING│ ├── eab│ │ ├── create --ca=STRING --expires=STRING --force --idempotency-key=STRING --name=STRING --out=STRING --policy=STRING --uses=INT│ │ ├── delete ID --ca=STRING --yes│ │ ├── list --ca=STRING --limit=INT --order=STRING --policy=STRING --search=STRING --sort=STRING --status=STRING│ │ ├── show ID --ca=STRING│ │ └── update ID --ca=STRING --dry-run --enabled=STRING --expires=STRING --name=STRING --uses=INT│ ├── order│ │ └── list --acme-account=STRING --ca=STRING --limit=INT --order=STRING --policy=STRING --search=STRING --sort=STRING --status=STRING│ ├── policy│ │ ├── create --ca=STRING --idempotency-key=STRING --name=STRING --pre-approved=STRING --template=STRING│ │ ├── delete NAME|ID --ca=STRING --dry-run --move-accounts-to=STRING --yes│ │ ├── list --ca=STRING --limit=INT --order=STRING --search=STRING --sort=STRING│ │ ├── revision│ │ │ ├── list POLICY --ca=STRING --limit=INT│ │ │ ├── restore POLICY N --ca=STRING --dry-run│ │ │ └── show POLICY N --ca=STRING│ │ ├── show NAME|ID --ca=STRING│ │ └── update NAME|ID --ca=STRING --dry-run --name=STRING --pre-approved=STRING --template=STRING│ └── provisioning-url│ ├── delete ID --ca=STRING --yes│ ├── list --ca=STRING --limit=INT --order=STRING --policy=STRING --search=STRING --sort=STRING --status=STRING│ ├── show ID --ca=STRING│ └── update ID --ca=STRING --dry-run --enabled=STRING├── ca│ ├── create --csr-only --days=INT --extended-key-usage=STRING --idempotency-key=STRING --key-type=STRING --key-usage=STRING --name=STRING --path-length=INT --set --signature-algorithm=STRING --subject=STRING --yes│ ├── delete NAME|ID --dry-run --yes│ ├── export --ca=STRING --chain --cps --csr --force --format=STRING --out=STRING│ ├── list│ ├── set NAME|ID│ ├── show --ca=STRING│ └── update --ca=STRING --cep=STRING --cep-password-env=STRING --cep-password-file=STRING --cep-username=STRING --cps-file=STRING --dry-run --policy-oid=STRING --service-key-type=STRING --service-signature-algorithm=STRING├── cert│ ├── export SERIAL --ca=STRING --chain --csr --force --format=STRING --out=STRING│ ├── list --ca=STRING --expires-within=INT --key-type=STRING --limit=INT --match=STRING --order=STRING --reason=STRING --search=STRING --sort=STRING --status=STRING --template=STRING│ ├── revoke SERIAL --ca=STRING --reason=STRING --yes│ ├── show SERIAL --ca=STRING --text│ └── unrevoke SERIAL --ca=STRING├── csr│ └── create --cn=STRING --force --format=STRING --key=STRING --key-passphrase-env=STRING --key-passphrase-file=STRING --out=STRING --san=STRING --subject=STRING├── help├── hsm│ ├── forget --appliance=STRING│ ├── list --limit=INT│ ├── ping --ca=STRING│ └── show --ca=STRING├── key│ ├── create --force --format=STRING --no-passphrase --out=STRING --passphrase-env=STRING --passphrase-file=STRING --type=STRING│ └── types├── log│ └── list --ca=STRING --level=STRING --limit=INT --order=STRING --search=STRING --since=STRING --sort=STRING --until=STRING├── login --device├── logout --all├── pkcs12│ └── create --cert=STRING --chain-file=STRING --force --key=STRING --key-passphrase-env=STRING --key-passphrase-file=STRING --legacy --no-passphrase --out=STRING --passphrase-env=STRING --passphrase-file=STRING├── request│ ├── approve ID --ca=STRING --chain --force --format=STRING --not-after=STRING --not-before=STRING --out=STRING --san=STRING --subject=STRING│ ├── create --approve --ca=STRING --chain --csr=STRING --force --format=STRING --idempotency-key=STRING --not-after=STRING --not-before=STRING --out=STRING --san=STRING --subject=STRING --template=STRING│ ├── decline ID --ca=STRING --yes│ ├── list --ca=STRING --limit=INT --order=STRING --search=STRING --sort=STRING│ └── show ID --ca=STRING├── template│ ├── list --ca=STRING --limit=INT│ ├── revision│ │ ├── list TEMPLATE --ca=STRING --limit=INT│ │ ├── restore TEMPLATE N --ca=STRING --dry-run│ │ └── show TEMPLATE N --ca=STRING│ ├── show TEMPLATE --ca=STRING│ └── update TEMPLATE --ca=STRING --dry-run --enabled=STRING --file=STRING --force --out=STRING --policy-oid=STRING --public-requests=STRING --scep=STRING --scep-passphrase=STRING --scep-passphrase-env=STRING --scep-passphrase-file=STRING --signing-algorithm=STRING --validity-days=INT├── version --licenses└── whoamiGlobal flags
| Flag | Type | Description |
|---|---|---|
--json | bool | print the result, or the error, as JSON |
-h, --help | bool | show help for the command; with --json, as JSON |
Environment
| Variable | Use |
|---|---|
PKIAAS_TOKEN | a token to use instead of the stored login (e.g. in CI); never print it |
PKIAAS_SERVER | the server to use when --server isn’t given, e.g. https://pkiaas.io |
PKIAAS_CA | the name (any case) or ID of the CA that commands work in when --ca isn’t given, instead of the active CA; scripts should give the ID |
Exit codes and error codes are listed in the agent guide.
pkiaas acme
Manage a CA’s ACME policies, external account bindings (EABs), provisioning URLs and accounts, and list its orders.
pkiaas acme [flags]Commands:
pkiaas acme account
List a CA’s ACME accounts, show one, or revoke one so its client can’t order or renew certificates.
pkiaas acme account [flags]Commands:
pkiaas acme account list
List a CA’s ACME accounts, most recently used first.
pkiaas acme account list [--ca NAME|ID] [--policy NAME|ID] [--status S,...] [--search TEXT] [--sort FIELD [--order asc|desc]] [--limit N] [flags]List the ACME accounts of a CA, by default the active CA’s, most recently used first (never-used ones last): those of all its ACME policies, or with --policy NAME|ID only those of that policy (pkiaas acme policy list). The ID is what the other ‘acme account’ commands take to name an account.
An ACME account is an ACME client (certbot, win-acme, Certify The Web, Traefik, …) registered under an ACME policy with its own key, which signs its requests. The ID is the number at the end of its account URL (certbot show_account prints it), not a certificate serial. lastUsedAt, client and registeredWith are null for accounts not used since 2026-10-27, when ACME v2 started recording them. Contacts and client are text the ACME client chose: the text output escapes control characters in them; --json gives them as stored.
--status keeps the accounts with one of these statuses, comma-separated or repeated: valid, deactivated (its client ended it) or revoked (a CA member revoked it). It lists the first --limit accounts (default 50, at most 1000); total says how many match. --search keeps those whose contacts, client or initial IP address contain the text, in any case; an ID matches that account. --sort takes id, contact, policy, status, client, createdAt, lastUsedAt, orderCount or certificateCount, in --order asc (the default with --sort) or desc; accounts without that value come last either way.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many accounts to list (1-1000). Default: 50. |
--order | string | asc or desc (default: asc with --sort) |
--policy | string | only the accounts of this ACME policy, by its name or ID (pkiaas acme policy list) |
--search | string | only accounts with this text in a contact, the client or the initial IP address; an ID matches its account |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--sort | string | what to sort by: id, contact, policy, status, client, createdAt, lastUsedAt, orderCount, certificateCount (default: lastUsedAt, newest first) |
--status | string, repeatable | only accounts with one of these statuses: valid, deactivated, revoked |
Examples:
pkiaas acme account listpkiaas acme account list --policy "Web servers" --status validpkiaas acme account list --search certbot --jsonpkiaas acme account list --sort createdAt --order desc --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the accounts belong to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
total | integer | how many accounts match; more than are listed when it exceeds --limit |
accounts | object[] | the first --limit matching accounts, in the --sort and --order order (most recently used first without --sort; never-used last) |
accounts[].id | integer | the account’s ID: the number at the end of its account URL, which the ‘acme account’ commands take (not a certificate serial) |
accounts[].url | string | the account URL its ACME client knows (certbot show_account prints it) |
accounts[].status | string | valid: it can order certificates; deactivated: its client ended it; revoked: a CA member revoked it (pkiaas acme account revoke). Neither can be undone |
accounts[].policy | object | the ACME policy the account gets certificates under |
accounts[].policy.id | integer | the policy’s ID |
accounts[].policy.name | string | the policy’s name |
accounts[].contacts | string[] | the contacts its client gave, as stored (usually mailto: URLs); may be empty. Text the client chose |
accounts[].createdAt | string or null | when it registered (ISO 8601, UTC); null for some very old accounts |
accounts[].lastUsedAt | string or null | when its client last sent a request (ISO 8601, UTC); null when not used since ACME v2 (2026-10-27) recorded it |
accounts[].client | string or null | the User-Agent of its last request, as the client sent it; null when not recorded (before 2026-10-27). Text the client chose |
accounts[].initialIp | string | the IP address it registered from |
accounts[].registeredWith | object or null | the external account binding or provisioning URL it registered with; null when not recorded (accounts made before 2026-10-27) |
accounts[].registeredWith.kind | string | eab (an external account binding) or provisioningUrl |
accounts[].registeredWith.id | integer | the EAB’s or provisioning URL’s ID |
accounts[].registeredWith.name | string or null | its name; null when it is deleted or belongs to a policy of another CA |
accounts[].registeredWith.policyId | integer or null | its own ACME policy, which may differ from the account’s after a move; null as for name |
accounts[].key | object or null | the account’s public key; null if the stored key can’t be read |
accounts[].key.algorithm | string | the JWS algorithm of the account’s key, e.g. ES256 or RS256 |
accounts[].key.thumbprint | string | the RFC 7638 SHA-256 thumbprint of the account’s public key |
accounts[].orderCount | integer | orders of the account, in any status (pkiaas acme order list --acme-account ID lists them); orders that got no certificate are deleted some time after they expire |
accounts[].certificateCount | integer | orders of the account that got a certificate; revoking the account leaves them valid |
accounts[].lastOrderAt | string or null | when it last created an order (ISO 8601, UTC); null if none |
accounts[].inactiveSince | string or null | when it was deactivated or revoked (ISO 8601, UTC); null while valid |
pkiaas acme account revoke
Revoke an ACME account, so its client can’t order or renew certificates.
pkiaas acme account revoke ID [--ca NAME|ID] [--yes] [flags]Revoke an ACME account of a CA, by default the active CA’s, by its ID from pkiaas acme account list (RFC 8555 status revoked): the ACME server refuses every request its client signs with it, so it can’t order or renew certificates. It can’t be undone: there is no unrevoke.
Certificates it got stay valid; revoke any that mustn’t be used with pkiaas cert revoke SERIAL. Its key can’t register again, but a new key can while the account’s policy has enabled EABs or provisioning URLs; to keep the client out, disable those too (pkiaas acme eab list --policy ID --status enabled, then pkiaas acme eab update ID --enabled off).
The command first reads the account and prints it. On a terminal, it then asks for confirmation; without a terminal, give --yes, which revokes without asking; without it, the command stops with a usage error. An account that is revoked already, or that its client deactivated, is left as it is: the command says so and succeeds without changing anything, so it is safe to run again. The result is the account as the server has it then.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--yes | bool | revoke without asking; only after the person saw the account and agreed |
Examples:
pkiaas acme account revoke 1204pkiaas acme account revoke 1204 --yes --jsonpkiaas acme account revoke 1204 --ca a1B2c3D4e5 --yes --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the account’s policy belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the account’s ID: the number at the end of its account URL, which the ‘acme account’ commands take (not a certificate serial) |
url | string | the account URL its ACME client knows (certbot show_account prints it) |
status | string | valid: it can order certificates; deactivated: its client ended it; revoked: a CA member revoked it (pkiaas acme account revoke). Neither can be undone |
policy | object | the ACME policy the account gets certificates under |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
contacts | string[] | the contacts its client gave, as stored (usually mailto: URLs); may be empty. Text the client chose |
createdAt | string or null | when it registered (ISO 8601, UTC); null for some very old accounts |
lastUsedAt | string or null | when its client last sent a request (ISO 8601, UTC); null when not used since ACME v2 (2026-10-27) recorded it |
client | string or null | the User-Agent of its last request, as the client sent it; null when not recorded (before 2026-10-27). Text the client chose |
initialIp | string | the IP address it registered from |
registeredWith | object or null | the external account binding or provisioning URL it registered with; null when not recorded (accounts made before 2026-10-27) |
registeredWith.kind | string | eab (an external account binding) or provisioningUrl |
registeredWith.id | integer | the EAB’s or provisioning URL’s ID |
registeredWith.name | string or null | its name; null when it is deleted or belongs to a policy of another CA |
registeredWith.policyId | integer or null | its own ACME policy, which may differ from the account’s after a move; null as for name |
key | object or null | the account’s public key; null if the stored key can’t be read |
key.algorithm | string | the JWS algorithm of the account’s key, e.g. ES256 or RS256 |
key.thumbprint | string | the RFC 7638 SHA-256 thumbprint of the account’s public key |
orderCount | integer | orders of the account, in any status (pkiaas acme order list --acme-account ID lists them); orders that got no certificate are deleted some time after they expire |
certificateCount | integer | orders of the account that got a certificate; revoking the account leaves them valid |
lastOrderAt | string or null | when it last created an order (ISO 8601, UTC); null if none |
inactiveSince | string or null | when it was deactivated or revoked (ISO 8601, UTC); null while valid |
Side effects:
- revokes the ACME account on the server: its client can’t order or renew certificates, and its key can’t register again; it can’t be undone
- certificates it got stay valid; a new key can still register while the policy has enabled EABs or provisioning URLs
- an account that is revoked already or deactivated by its client is left as it is, and nothing is sent; the CA’s log records a revoke
pkiaas acme account show
Show an ACME account.
pkiaas acme account show ID [--ca NAME|ID] [flags]Show an ACME account of a CA, by default the active CA’s, by its ID from pkiaas acme account list: its account URL, status, ACME policy, contacts, when it registered and was last used, its client, initial IP address, the EAB or provisioning URL it registered with, its key, and how many orders it made and certificates it got (pkiaas acme order list --acme-account ID lists its orders).
An ACME account is an ACME client (certbot, win-acme, Certify The Web, Traefik, …) registered under an ACME policy with its own key, which signs its requests. The ID is the number at the end of its account URL (certbot show_account prints it), not a certificate serial. lastUsedAt, client and registeredWith are null for accounts not used since 2026-10-27, when ACME v2 started recording them. Contacts and client are text the ACME client chose: the text output escapes control characters in them; --json gives them as stored.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas acme account show 1204pkiaas acme account show 1204 --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the account’s policy belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the account’s ID: the number at the end of its account URL, which the ‘acme account’ commands take (not a certificate serial) |
url | string | the account URL its ACME client knows (certbot show_account prints it) |
status | string | valid: it can order certificates; deactivated: its client ended it; revoked: a CA member revoked it (pkiaas acme account revoke). Neither can be undone |
policy | object | the ACME policy the account gets certificates under |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
contacts | string[] | the contacts its client gave, as stored (usually mailto: URLs); may be empty. Text the client chose |
createdAt | string or null | when it registered (ISO 8601, UTC); null for some very old accounts |
lastUsedAt | string or null | when its client last sent a request (ISO 8601, UTC); null when not used since ACME v2 (2026-10-27) recorded it |
client | string or null | the User-Agent of its last request, as the client sent it; null when not recorded (before 2026-10-27). Text the client chose |
initialIp | string | the IP address it registered from |
registeredWith | object or null | the external account binding or provisioning URL it registered with; null when not recorded (accounts made before 2026-10-27) |
registeredWith.kind | string | eab (an external account binding) or provisioningUrl |
registeredWith.id | integer | the EAB’s or provisioning URL’s ID |
registeredWith.name | string or null | its name; null when it is deleted or belongs to a policy of another CA |
registeredWith.policyId | integer or null | its own ACME policy, which may differ from the account’s after a move; null as for name |
key | object or null | the account’s public key; null if the stored key can’t be read |
key.algorithm | string | the JWS algorithm of the account’s key, e.g. ES256 or RS256 |
key.thumbprint | string | the RFC 7638 SHA-256 thumbprint of the account’s public key |
orderCount | integer | orders of the account, in any status (pkiaas acme order list --acme-account ID lists them); orders that got no certificate are deleted some time after they expire |
certificateCount | integer | orders of the account that got a certificate; revoking the account leaves them valid |
lastOrderAt | string or null | when it last created an order (ISO 8601, UTC); null if none |
inactiveSince | string or null | when it was deactivated or revoked (ISO 8601, UTC); null while valid |
pkiaas acme eab
List a CA’s ACME external account bindings (EABs), show one, create, update or delete one.
pkiaas acme eab [flags]Commands:
pkiaas acme eab createpkiaas acme eab deletepkiaas acme eab listpkiaas acme eab showpkiaas acme eab update
pkiaas acme eab create
Create an ACME external account binding (EAB), and save its HMAC key.
pkiaas acme eab create --policy NAME|ID --name NAME [--uses N] [--expires TIME] --out FILE|- [--force] [--ca NAME|ID] [--idempotency-key KEY] [flags]Create an external account binding (EAB) for an ACME policy of a CA, by default the active CA, as the website’s External Account Bindings page does. An ACME client (certbot, acme.sh, Windows and network devices) registers an account under the policy with the EAB’s key ID and HMAC key, and then gets certificates as the policy says.
--policy is the name or ID of one of the CA’s ACME policies (pkiaas acme policy list). --name is the EAB’s name: 1 to 50 letters, digits, spaces, hyphens and underscores. --uses is how many ACME accounts it may register (0 to 65535, default 10). --expires is when it stops registering accounts: an RFC 3339 time (e.g. 2026-11-08T15:00:00Z), a date (midnight in this computer’s time zone), or how long from now (12h, 7d); it must be in the future, and it is 7 days from now without the flag. pkiaas acme eab update changes these later.
The HMAC key is a secret that the server shows only once, to this command: save it with --out FILE, which writes the key alone on one line, readable by you only (an existing file is replaced only with --force). Without --out it goes to standard output only when that is a terminal, followed by a notice that it wasn’t saved; in a pipe or captured output, or with --json, the command fails with secret_destination before it creates anything. --out - sends it to standard output anyway, to pipe to another command. When the key goes to standard output, the EAB’s key ID and the directory URL go to standard error, and there is no result. The result never holds the key: it says where the key went (hmacKeyFile), with the key ID (keyId) and the ACME directory (directoryUrl). Give the key to the ACME client from the file, so that it never passes through a transcript, e.g.:
certbot register --server DIRECTORY_URL --eab-kid KEY_ID --eab-hmac-key ”$(cat FILE)” --email EMAIL --agree-tos
Each run is a new EAB, unless it has the --idempotency-key of an earlier run (any text, e.g. a UUID) and the same flags: within 24 hours that gives the same EAB instead of a second one, but never its HMAC key again, so the command fails with secret_shown and writes nothing. That also happens when the server’s first answer was lost and the CLI’s own retry got the EAB without its key. Disable that EAB then (pkiaas acme eab update ID --enabled off), and create a new one. A time from now (7d) is another time on each run, so a rerun with the same --idempotency-key needs --expires as an RFC 3339 time, or none. Without --idempotency-key, the CLI makes a key and reports it (idempotencyKey), and uses it when it retries by itself. A key used for different flags is refused (error idempotency_key_reused). A user can create 60 EABs an hour.
This command calls the PKIaaS server and needs a login.
Its output (the EAB HMAC key) is a secret: it goes to --out FILE, to --out -, or to a terminal, never into a pipe without --out - or into a --json result (error secret_destination).
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--expires | string | when it stops registering accounts: RFC 3339, a date (midnight in this computer’s time zone), or how long from now (12h, 7d) (default: 7 days from now) |
--force | bool | replace the --out file if it exists |
--idempotency-key | string | repeat an earlier run with this key instead of creating a second EAB (default: a new random key) |
--name | string | the EAB’s name: 1 to 50 letters, digits, spaces, hyphens and underscores |
-o, --out | string | the file to write (default: standard output, as with -) |
--policy | string | the name or ID of the CA’s ACME policy to register accounts under (pkiaas acme policy list) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--uses | int | how many ACME accounts it may register (0-65535). Default: 10. |
Examples:
pkiaas acme eab create --policy 205 --name web01 --out web01.eabpkiaas acme eab create --policy "Web servers" --name web02 --out web02.eabpkiaas acme eab create --policy 205 --name web01 --uses 1 --expires 24h --out web01.eab --jsonpkiaas acme eab create --policy 205 --name lab --expires 2026-12-31T23:59:59Z --out lab.eab --ca a1B2c3D4e5 --idempotency-key 8e03978e-40d5-43e8-bc93-6894a57f9324 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the EAB belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the EAB’s ID, which the ‘acme eab’ commands take to name it in its CA |
keyId | string | the EAB key ID (KID) an ACME client sends with the HMAC key, e.g. certbot --eab-kid |
name | string | the EAB’s name |
policy | object | the ACME policy that accounts registered with the EAB belong to |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
enabled | boolean | whether it may register accounts; pkiaas acme eab update ID --enabled on|off changes it |
usesRemaining | integer | how many more ACME accounts it may register; each registration takes one |
expiresAt | string | when it stops registering accounts (ISO 8601, UTC) |
status | string | whether it can register an account now: enabled if it is enabled, unexpired and has uses left; otherwise the first of disabled, expired and used that applies |
createdAccounts | integer | ACME accounts registered with it since ACME v2 (2026-10-27); earlier ones aren’t counted. Accounts keep working when the EAB is disabled or deleted |
directoryUrl | string | the ACME directory to register at with the EAB, e.g. certbot --server |
hmacKeyFile | string | the --out file the EAB’s HMAC key was written to, alone on one line, readable by its owner only; it is shown only this once. Give it to the ACME client without reading it, e.g. certbot --eab-hmac-key ”$(cat FILE)“ |
idempotencyKey | string | the Idempotency-Key it was sent with: the same command with --idempotency-key and this key, within 24 hours, creates no second EAB, but fails with secret_shown, since the HMAC key is shown only once |
Side effects:
- creates an EAB in the ACME policy on the server; with the
--idempotency-keyof an earlier run (within 24 hours), nothing new - with
--outFILE, writes the EAB’s HMAC key to the file, readable by the owner only; with--out- or to a terminal, writes it to standard output, the EAB’s details to standard error, and no result - the CA’s log records it
pkiaas acme eab delete
Delete an ACME external account binding (EAB).
pkiaas acme eab delete ID [--ca NAME|ID] [--yes] [flags]Delete an external account binding (EAB) of a CA, by default the active CA’s, by its ID from pkiaas acme eab list. ACME clients can no longer register accounts with it; the accounts registered with it keep working. It can’t be undone. To stop an EAB for now, disable it instead: pkiaas acme eab update ID --enabled off.
The command first reads the EAB and prints what is deleted. On a terminal, it then asks for confirmation; without a terminal, give --yes, which deletes without asking; without it, the command stops with a usage error.
Running it again after it succeeded fails with not_found, as for an EAB that never existed; if a retry of the same delete finds the EAB gone, the result says it is deleted.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--yes | bool | delete without asking; only after the person saw the EAB and agreed |
Examples:
pkiaas acme eab delete 12pkiaas acme eab delete 12 --yes --jsonpkiaas acme eab delete 12 --ca a1B2c3D4e5 --yes --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the EAB belonged to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
eab | object | the EAB |
eab.id | integer | the EAB’s ID |
eab.keyId | string | its key ID (KID) |
eab.name | string | its name |
eab.createdAccounts | integer | ACME accounts registered with it (since ACME v2), which keep working |
policy | object | the ACME policy the EAB belonged to |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
deleted | boolean | true: the EAB is deleted, also when an earlier try of the same delete did it |
Side effects:
- deletes the EAB on the server: ACME clients can no longer register with it; accounts registered with it keep working
- it can’t be undone; the CA’s log records it
pkiaas acme eab list
List a CA’s ACME external account bindings (EABs), by name.
pkiaas acme eab list [--ca NAME|ID] [--policy NAME|ID] [--status S,...] [--search TEXT] [--sort FIELD [--order asc|desc]] [--limit N] [flags]List the external account bindings (EABs) of a CA, by default the active CA’s, by name: those of all its ACME policies, or with --policy NAME|ID only those of that policy (pkiaas acme policy list). An ACME client registers an account under a policy with an EAB’s key ID and HMAC key; the HMAC key is shown only once, by pkiaas acme eab create, and never listed. The ID is what the other ‘acme eab’ commands take to name an EAB.
--status keeps the EABs with one of these statuses, comma-separated or repeated: enabled (it can register an account now), disabled, expired or used (no uses left). It lists the first --limit EABs (default 50, at most 1000); total says how many match. --search keeps the EABs whose name contains the text, in any case. --sort takes name, keyId, policy, enabled, usesRemaining or expiresAt, in --order asc (the default with --sort) or desc.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many EABs to list (1-1000). Default: 50. |
--order | string | asc or desc (default: asc with --sort) |
--policy | string | only the EABs of this ACME policy, by its name or ID (pkiaas acme policy list) |
--search | string | only EABs with this text in the name |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--sort | string | what to sort by: name, keyId, policy, enabled, usesRemaining, expiresAt (default: name) |
--status | string, repeatable | only EABs with one of these statuses: enabled, disabled, expired, used |
Examples:
pkiaas acme eab listpkiaas acme eab list --policy 205 --status enabled --jsonpkiaas acme eab list --policy "Web servers"pkiaas acme eab list --status expired,used --sort expiresAt --order desc --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the EABs belong to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
total | integer | how many EABs match; more than are listed when it exceeds --limit |
eabs | object[] | the first --limit matching EABs, in the --sort and --order order (by name without --sort); never their HMAC keys |
eabs[].id | integer | the EAB’s ID, which the ‘acme eab’ commands take to name it in its CA |
eabs[].keyId | string | the EAB key ID (KID) an ACME client sends with the HMAC key, e.g. certbot --eab-kid |
eabs[].name | string | the EAB’s name |
eabs[].policy | object | the ACME policy that accounts registered with the EAB belong to |
eabs[].policy.id | integer | the policy’s ID |
eabs[].policy.name | string | the policy’s name |
eabs[].enabled | boolean | whether it may register accounts; pkiaas acme eab update ID --enabled on|off changes it |
eabs[].usesRemaining | integer | how many more ACME accounts it may register; each registration takes one |
eabs[].expiresAt | string | when it stops registering accounts (ISO 8601, UTC) |
eabs[].status | string | whether it can register an account now: enabled if it is enabled, unexpired and has uses left; otherwise the first of disabled, expired and used that applies |
eabs[].createdAccounts | integer | ACME accounts registered with it since ACME v2 (2026-10-27); earlier ones aren’t counted. Accounts keep working when the EAB is disabled or deleted |
pkiaas acme eab show
Show an ACME external account binding (EAB), without its HMAC key.
pkiaas acme eab show ID [--ca NAME|ID] [flags]Show an external account binding (EAB) of a CA, by default the active CA’s, by its ID from pkiaas acme eab list: its key ID, ACME policy, status, uses remaining, expiration and how many ACME accounts were registered with it. Never its HMAC key, which only pkiaas acme eab create showed, once.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas acme eab show 12pkiaas acme eab show 12 --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the EAB belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the EAB’s ID, which the ‘acme eab’ commands take to name it in its CA |
keyId | string | the EAB key ID (KID) an ACME client sends with the HMAC key, e.g. certbot --eab-kid |
name | string | the EAB’s name |
policy | object | the ACME policy that accounts registered with the EAB belong to |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
enabled | boolean | whether it may register accounts; pkiaas acme eab update ID --enabled on|off changes it |
usesRemaining | integer | how many more ACME accounts it may register; each registration takes one |
expiresAt | string | when it stops registering accounts (ISO 8601, UTC) |
status | string | whether it can register an account now: enabled if it is enabled, unexpired and has uses left; otherwise the first of disabled, expired and used that applies |
createdAccounts | integer | ACME accounts registered with it since ACME v2 (2026-10-27); earlier ones aren’t counted. Accounts keep working when the EAB is disabled or deleted |
pkiaas acme eab update
Change an ACME external account binding’s (EAB’s) name, uses or expiration, or turn it on or off.
pkiaas acme eab update ID [--name NAME] [--uses N] [--expires TIME] [--enabled on|off] [--ca NAME|ID] [--dry-run] [flags]Change the settings of an external account binding (EAB) of a CA, by default the active CA’s, by its ID from pkiaas acme eab list, as the website’s Edit, Enable and Disable buttons do. Only the settings whose flags are given change; the others stay as they are. The key ID and HMAC key never change. Accounts registered with it keep working whatever it is set to.
--name is the new name: 1 to 50 letters, digits, spaces, hyphens and underscores. --uses is how many more ACME accounts it may register (0 to 65535). --expires is when it stops registering accounts: an RFC 3339 time (e.g. 2026-11-08T15:00:00Z), a date (midnight in this computer’s time zone), or how long from now (12h, 7d); a time in the past ends it now. --enabled off disables it, so that it registers no accounts until --enabled on.
The command reads the EAB, changes the settings given, and sends them all back with the version it read. If the EAB changed in between (an ACME client registering with it takes a use, too), nothing is saved and it fails with acme_changed: run it again. When the EAB already has the settings given, nothing is sent and the result is the EAB as it is, so the command is safe to run again. --dry-run sends nothing and shows what would change, each setting old → new; with --json, the EAB as it is now with dryRun true and changes.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--dry-run | bool | send nothing; show what would change |
--enabled | string | on lets it register accounts; off disables it |
--expires | string | when it stops registering accounts: RFC 3339, a date (midnight in this computer’s time zone), or how long from now (12h, 7d); a time in the past ends it now |
--name | string | the EAB’s new name: 1 to 50 letters, digits, spaces, hyphens and underscores |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--uses | int | how many more ACME accounts it may register (0-65535). Default: 0. |
Examples:
pkiaas acme eab update 12 --enabled offpkiaas acme eab update 12 --uses 5 --expires 30d --dry-runpkiaas acme eab update 12 --name web02 --expires 2026-12-31T23:59:59Z --enabled on --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the EAB belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the EAB’s ID, which the ‘acme eab’ commands take to name it in its CA |
keyId | string | the EAB key ID (KID) an ACME client sends with the HMAC key, e.g. certbot --eab-kid |
name | string | the EAB’s name |
policy | object | the ACME policy that accounts registered with the EAB belong to |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
enabled | boolean | whether it may register accounts; pkiaas acme eab update ID --enabled on|off changes it |
usesRemaining | integer | how many more ACME accounts it may register; each registration takes one |
expiresAt | string | when it stops registering accounts (ISO 8601, UTC) |
status | string | whether it can register an account now: enabled if it is enabled, unexpired and has uses left; otherwise the first of disabled, expired and used that applies |
createdAccounts | integer | ACME accounts registered with it since ACME v2 (2026-10-27); earlier ones aren’t counted. Accounts keep working when the EAB is disabled or deleted |
dryRun | boolean, optional | true for --dry-run: nothing was sent, and the EAB is as it is now |
changes | object[], optional | --dry-run only: the settings that would change; empty if none would |
changes[].field | string | the setting: name, usesRemaining, expiresAt or enabled |
changes[].from | string | its value now, as text: usesRemaining a number, expiresAt ISO 8601 in UTC, enabled on or off |
changes[].to | string | its new value, as from |
Side effects:
- changes the EAB’s settings on the server, only those given; nothing when the EAB already has them, or with
--dry-run - accounts registered with it keep working whatever it is set to
- the CA’s log records the change
pkiaas acme order
List a CA’s ACME orders: what its ACME clients asked for, what they got, and why orders failed.
pkiaas acme order [flags]Commands:
pkiaas acme order list
List a CA’s ACME orders, or one ACME account’s, newest first.
pkiaas acme order list [--acme-account ID] [--policy NAME|ID] [--ca NAME|ID] [--status S,...] [--search TEXT] [--sort FIELD [--order asc|desc]] [--limit N] [flags]List the ACME orders of a CA, by default the active CA’s, newest first: those of all its ACME accounts, with --acme-account ID only those of that account (the ID from pkiaas acme account list), or with --policy NAME|ID those of the accounts now under that ACME policy (pkiaas acme policy list). An order is an ACME account’s request for a certificate for some identifiers: its client proves control of them, then finalizes the order with a CSR, and a valid order names the certificate it got. Listing changes nothing.
The status is one of: pending waiting for its client to prove control of the identifiers. A legacy order stays pending after that until its client reads it again, so a pending order may really be ready ready validated, waiting for its client to finalize (send its CSR). A finalize refused before signing (an unreadable CSR, the subscription limit) also leaves an order ready; the CA’s log says why (pkiaas log list --ca ID) processing being signed; the server marks it invalid when signing gets stuck valid issued: certificate is the certificate it got (pkiaas cert show SERIAL) invalid failed: a challenge failed validation, signing refused it, or signing got stuck; error says why when the server stored a reason expired a pending or ready order past expiresAt: a renewal its client never finished. Nothing failed, unlike invalid, and the server stored no change
expiresAt is the order’s lifetime (7 days by default), not the certificate’s: after it, the ACME server answers 404 for the order URL whatever the status, and the certificate (pkiaas cert show SERIAL) is what remains. Orders without a certificate are deleted some time after they expire (a server setting, 30 days by default), so an account with no orders may have had only old abandoned ones, or may simply never have ordered. A certificate signed after the server had already marked its order invalid (stuck in processing) isn’t linked to the order. An account that moved to a policy of another CA has its orders listed by that CA, not this one.
Identifiers, contacts and error details are text the ACME client (or its DNS) chose: the text output escapes control characters in them; --json gives them as stored, except that challenge tokens in details are replaced with …. The text output shows an order’s first two identifiers and how many more there are, --json all of them; “Why invalid:” after the table gives the reason of each invalid order shown, not of those past --limit.
--status keeps the orders with one of these statuses, comma-separated or repeated. --search keeps those with an identifier that contains the text; a wildcard is stored without its *., so example.com also finds *.example.com, and an order ID matches its order. It lists the first --limit orders (default 50, at most 1000); total says how many match. --sort takes id, createdAt, account or status, in --order asc (the default with --sort) or desc; orders without a creation time (some very old ones) come last either way.
Why did renewals fail: --status invalid,expired, for the whole CA or with --acme-account ID for one client. Which certificates did a client get: --acme-account ID --status valid, then pkiaas cert show SERIAL for each.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--acme-account | string | only the orders of this ACME account, by its ID (pkiaas acme account list) |
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many orders to list (1-1000). Default: 50. |
--order | string | asc or desc (default: asc with --sort) |
--policy | string | only the orders of the accounts of this ACME policy, by its name or ID (pkiaas acme policy list) |
--search | string | only orders with an identifier containing this text (example.com also finds *.example.com); an ID matches its order |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--sort | string | what to sort by: id, createdAt, account, status (default: createdAt, newest first) |
--status | string, repeatable | only orders with one of these statuses: pending, ready, processing, valid, invalid, expired |
Examples:
pkiaas acme order listpkiaas acme order list --status invalid,expired --jsonpkiaas acme order list --acme-account 1204 --status invalid,expired --jsonpkiaas acme order list --acme-account 1204 --status valid --jsonpkiaas acme order list --policy "Web servers" --search example.com --sort status --ca a1B2c3D4e5With --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the orders’ accounts belong to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
acmeAccountId | integer, optional | the ACME account whose orders are listed; only with --acme-account |
policy | object, optional | the ACME policy whose accounts’ orders are listed; only with --policy |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
orders | object[] | the first --limit matching orders, in the --sort and --order order (newest first without --sort) |
orders[].id | integer | the order’s ID: the number at the end of its URL |
orders[].account | object | the ACME account that made it |
orders[].account.id | integer | the ID of the ACME account that made the order, which --acme-account and pkiaas acme account show ID take |
orders[].account.contact | string or null | the account’s first contact, as stored (usually a mailto: URL); null when it has none. Text the client chose |
orders[].account.policy | object | the ACME policy the account is under now |
orders[].account.policy.id | integer | the policy’s ID |
orders[].account.policy.name | string | the policy’s name |
orders[].url | string | the order URL its ACME client knows; the ACME server answers 404 for it after expiresAt, whatever the status |
orders[].status | string | pending, ready, processing, valid, invalid or expired: see the command’s description |
orders[].identifiers | object[] | all the names the order is for (the text output shows two); empty if the stored ones can’t be read |
orders[].identifiers[].type | string | the identifier’s type, e.g. dns |
orders[].identifiers[].value | string | the name, as the client asked for it (a wildcard as *.example.com). Text the client chose |
orders[].createdAt | string or null | when it was created (ISO 8601, UTC); null for some very old orders |
orders[].expiresAt | string | the end of the order’s lifetime (ISO 8601, UTC; 7 days after it was created by default), not the certificate’s |
orders[].certificate | object or null | the certificate a valid order got; null otherwise, and for a certificate signed after the server had marked the order invalid |
orders[].certificate.serial | string | the certificate’s serial, which pkiaas cert show SERIAL takes |
orders[].certificate.name | string or null | its common name; null when it has none |
orders[].certificate.status | string | valid, revoked or expired, as pkiaas cert list shows it |
orders[].certificate.validTo | string | when the certificate expires (ISO 8601, UTC) |
orders[].error | object or null | why it failed, when the server stored a problem for it; null otherwise |
orders[].error.type | string | the ACME error type, e.g. urn:ietf:params:acme:error:dns |
orders[].error.detail | string | why, as the server stored it (challenge tokens replaced with …). Text that can come from the client or its DNS |
total | integer | how many orders match; more than are listed when it exceeds --limit |
pkiaas acme policy
List a CA’s ACME policies, show one, create, update or delete one, and see or restore its revisions.
pkiaas acme policy [flags]Commands:
pkiaas acme policy createpkiaas acme policy deletepkiaas acme policy listpkiaas acme policy revisionpkiaas acme policy showpkiaas acme policy update
pkiaas acme policy create
Create an ACME policy.
pkiaas acme policy create --name NAME --template NAME|ID [--pre-approved DOMAIN,...] [--ca NAME|ID] [--idempotency-key KEY] [flags]Create an ACME policy in a CA, by default the active CA, as the website’s ACME Policies page does. ACME clients register under a policy with an external account binding (EAB) made for it; the policy says what they get.
--name is the policy’s name: 1 to 50 letters, digits, spaces, hyphens and underscores. --template is the name of one of the CA’s templates, in any case, as pkiaas template list shows it, or its ID (error template_not_found); certificates are issued with it, with the names the order asks for. A name that more than one template has is refused (error template_ambiguous): give the ID then.
--pre-approved lists the domains an order may have without a challenge, comma-separated or repeated: * matches any text, dots included, and *.example.com also matches example.com. They are stored in lowercase; duplicates are dropped. Other names need an http-01, dns-01 or tls-alpn-01 challenge. Without it, every name needs a challenge.
Each run is a new policy, unless it has the --idempotency-key of an earlier run (any text, e.g. a UUID) and the same flags: within 24 hours that gives the earlier result instead of a second policy. Without --idempotency-key, the CLI makes a key and reports it (idempotencyKey), and uses it when it retries by itself. A key used for different flags is refused (error idempotency_key_reused).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--idempotency-key | string | repeat an earlier run with this key instead of creating a second policy (default: a new random key) |
--name | string | the policy’s name: 1 to 50 letters, digits, spaces, hyphens and underscores |
--pre-approved | string, repeatable | the domains orders may have without a challenge, comma-separated or repeated (* matches any text); replaces the whole list, "" clears it |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--template | string | the name or ID of the CA’s template to issue with (pkiaas template list) |
Examples:
pkiaas acme policy create --name "Web servers" --template "Web Server"pkiaas acme policy create --name "Web servers" --template "Web Server" --pre-approved "*.example.com,example.org" --jsonpkiaas acme policy create --name Intranet --template f5IK8ghmT0 --ca a1B2c3D4e5 --idempotency-key 8e03978e-40d5-43e8-bc93-6894a57f9324 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the policy belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the policy’s ID, which the ‘acme policy’ commands take to name it in its CA |
name | string | the policy’s name |
template | object or null | the template certificates are issued with (the names in them come from the order); null if the template was deleted: orders then fail until another is chosen with pkiaas acme policy update --template |
template.id | string | the template’s ID, which --template takes |
template.name | string or null | the template’s name |
preApprovedDomains | string[] | names an order may have without a challenge: * matches any text, dots included, and *.example.com also matches example.com; other names need an http-01, dns-01 or tls-alpn-01 challenge |
eabCount | integer | external account bindings (EABs) of the policy, which ACME clients register with |
provisioningUrlCount | integer | provisioning URLs of the policy (deprecated: no new ones can be made) |
accountCount | integer | ACME accounts registered under the policy |
validOrderCount | integer | orders of the policy’s accounts that were issued a certificate |
idempotencyKey | string | the Idempotency-Key it was sent with: the same command with --idempotency-key and this key, within 24 hours, gives this result again instead of a second policy |
Side effects:
- creates an ACME policy in the CA on the server; with the
--idempotency-keyof an earlier run (within 24 hours), nothing new - the CA’s log records it
pkiaas acme policy delete
Delete an ACME policy, with its EABs, moving its accounts to another policy.
pkiaas acme policy delete NAME|ID [--move-accounts-to NAME|ID] [--ca NAME|ID] [--dry-run] [--yes] [flags]Delete an ACME policy of a CA, by default the active CA’s, by its name or ID from pkiaas acme policy list. Its external account bindings (EABs) and provisioning URLs are deleted with it, so ACME clients can no longer register with them. Its ACME accounts move to the policy --move-accounts-to names, another policy of the same CA, and keep working there; a policy with accounts isn’t deleted without it (error policy_has_accounts). It can’t be undone.
The command first asks the server what the delete takes with it (a dry run, which changes nothing) and prints that. --dry-run stops there; with --json, the result is the dry run. Otherwise, on a terminal, it asks for confirmation; without a terminal, give --yes, which deletes without asking; without it, the command stops with a usage error.
The delete is sent with the version of the policy the dry run saw: if someone changed the policy in between, nothing is deleted and it fails with acme_changed: run the command again to see the impact now. Running it again after it succeeded fails with not_found, as for a policy that never existed; if a retry of the same delete finds the policy gone, the result says it is deleted.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--dry-run | bool | show what the delete would take with it, and delete nothing |
--move-accounts-to | string | the name or ID of another policy of the CA, which gets this policy’s ACME accounts |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--yes | bool | delete without asking; only after the person saw what the delete takes with it and agreed |
Examples:
pkiaas acme policy delete 205 --dry-runpkiaas acme policy delete "Old servers" --move-accounts-to "Web servers" --dry-runpkiaas acme policy delete 205 --move-accounts-to 206 --dry-run --jsonpkiaas acme policy delete 205 --move-accounts-to 206pkiaas acme policy delete 205 --yes --jsonpkiaas acme policy delete 205 --move-accounts-to 206 --ca a1B2c3D4e5 --yes --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the policy belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
policy | object | the policy |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
impact | object | what deleting the policy takes with it |
impact.eabs | integer | external account bindings (EABs) of the policy, deleted with it: ACME clients can no longer register with them |
impact.provisioningUrls | integer | provisioning URLs of the policy, deleted with it |
impact.accounts | integer | ACME accounts of the policy: they move to moveAccountsTo and keep working there; without --move-accounts-to, a policy with accounts isn’t deleted (policy_has_accounts) |
impact.moveAccountsTo | object or null | the policy that gets the accounts (--move-accounts-to); null if none was given |
impact.moveAccountsTo.id | integer | the policy’s ID |
impact.moveAccountsTo.name | string | the policy’s name |
dryRun | boolean, optional | true for --dry-run: nothing was deleted |
deleted | boolean | true: the policy is deleted, also when an earlier try of the same delete did it; false with --dry-run |
Side effects:
- deletes the ACME policy on the server, with its EABs and provisioning URLs; nothing with
--dry-run - with
--move-accounts-to, moves its ACME accounts to that policy, where they keep working - it can’t be undone; the CA’s log records it
pkiaas acme policy list
List a CA’s ACME policies, by name.
pkiaas acme policy list [--ca NAME|ID] [--search TEXT] [--sort FIELD [--order asc|desc]] [--limit N] [flags]List the ACME policies of a CA, by default the active CA’s, by name. An ACME policy is what ACME clients register under, with an external account binding (EAB) made for it: it names the template certificates are issued with, and the domains an order may have without a challenge (pre-approved). The ID is what the other ‘acme policy’ commands take to name a policy.
It lists the first --limit policies (default 50, at most 1000); total says how many match. --search keeps the policies whose name, template or pre-approved domains contain the text, in any case. --sort takes name, template, preApprovedDomains, eabCount, accountCount or validOrderCount, in --order asc (the default with --sort) or desc.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many policies to list (1-1000). Default: 50. |
--order | string | asc or desc (default: asc with --sort) |
--search | string | only policies with this text in the name, template or pre-approved domains |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--sort | string | what to sort by: name, template, preApprovedDomains, eabCount, accountCount, validOrderCount (default: name) |
Examples:
pkiaas acme policy listpkiaas acme policy list --search example.com --jsonpkiaas acme policy list --sort accountCount --order desc --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the policies belong to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
total | integer | how many policies match; more than are listed when it exceeds --limit |
policies | object[] | the first --limit matching policies, in the --sort and --order order (by name without --sort) |
policies[].id | integer | the policy’s ID, which the ‘acme policy’ commands take to name it in its CA |
policies[].name | string | the policy’s name |
policies[].template | object or null | the template certificates are issued with (the names in them come from the order); null if the template was deleted: orders then fail until another is chosen with pkiaas acme policy update --template |
policies[].template.id | string | the template’s ID, which --template takes |
policies[].template.name | string or null | the template’s name |
policies[].preApprovedDomains | string[] | names an order may have without a challenge: * matches any text, dots included, and *.example.com also matches example.com; other names need an http-01, dns-01 or tls-alpn-01 challenge |
policies[].eabCount | integer | external account bindings (EABs) of the policy, which ACME clients register with |
policies[].provisioningUrlCount | integer | provisioning URLs of the policy (deprecated: no new ones can be made) |
policies[].accountCount | integer | ACME accounts registered under the policy |
policies[].validOrderCount | integer | orders of the policy’s accounts that were issued a certificate |
pkiaas acme policy revision
An ACME policy’s saved versions: list them, show one, restore one.
pkiaas acme policy revision [flags]Commands:
pkiaas acme policy revision list
List an ACME policy’s revisions, newest first.
pkiaas acme policy revision list POLICY [--limit N] [--ca NAME|ID] [flags]List the saved versions of an ACME policy, newest first: when each was saved, by whom, from where, and what changed. POLICY is its name in any case or its ID, in the CA --ca names (by default the active CA). Creating the policy and every change of its name, template or pre-approved domains adds one revision, from the website, the CLI or the API. A policy saved before its history started has none until its next change, which first records it as it was (via found).
It lists the first --limit revisions (default 50, at most 1000); total says how many there are. pkiaas acme policy revision show POLICY N shows one, and pkiaas acme policy revision restore POLICY N puts it back.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many revisions to list (1-1000). Default: 50. |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas acme policy revision list "Web servers"pkiaas acme policy revision list 205 --ca "Example CA" --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the policy belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
policy | object | the policy |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
total | integer | how many revisions it has; more than are listed when it exceeds --limit |
items | object[] | the first --limit revisions, newest first |
items[].revision | integer | the revision number, counting from 1 per policy |
items[].savedAt | string | when it was saved, RFC 3339 UTC |
items[].by | string or null | the email of the user who saved it; null for the revisions pkiaas recorded itself (found, outside) |
items[].via | string | where it was saved: app (the website), admin (the website’s classic page), cli, api (another API client); found: the policy as it was when its history started, recorded at its first change; outside: a change made without a revision (such as by an older release of the server), recorded at the next change |
items[].changed | string[] | added for the first revision, else the settings that changed from the revision before: name, template, preApprovedDomains |
items[].restoredFrom | integer or null | the revision it restored; null if it isn’t a restore |
pkiaas acme policy revision restore
Put a revision of an ACME policy back, as a new revision.
pkiaas acme policy revision restore POLICY N [--dry-run] [--ca NAME|ID] [flags]Save revision N of an ACME policy as its newest revision, marked as restored from N; history is never rewritten. POLICY is its name in any case or its ID, in the CA --ca names (by default the active CA). The revision’s name, template and pre-approved domains come back; accounts, EABs and orders stay as they are, and the template and domains apply to the orders that follow. A revision whose template was deleted since is refused (template_not_found), and nothing is saved.
If someone changed the policy since the command read it, nothing is saved and it fails with acme_changed: run it again. Restoring what is current changes nothing. --dry-run sends nothing and shows what would change, old → new. A revision a later release of the server saved is refused (acme_revision_unreadable).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--dry-run | bool | send nothing; show what would change |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas acme policy revision restore "Web servers" 2 --dry-runpkiaas acme policy revision restore 205 2 --ca "Example CA" --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the policy belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the policy’s ID, which the ‘acme policy’ commands take to name it in its CA |
name | string | the policy’s name |
template | object or null | the template certificates are issued with (the names in them come from the order); null if the template was deleted: orders then fail until another is chosen with pkiaas acme policy update --template |
template.id | string | the template’s ID, which --template takes |
template.name | string or null | the template’s name |
preApprovedDomains | string[] | names an order may have without a challenge: * matches any text, dots included, and *.example.com also matches example.com; other names need an http-01, dns-01 or tls-alpn-01 challenge |
eabCount | integer | external account bindings (EABs) of the policy, which ACME clients register with |
provisioningUrlCount | integer | provisioning URLs of the policy (deprecated: no new ones can be made) |
accountCount | integer | ACME accounts registered under the policy |
validOrderCount | integer | orders of the policy’s accounts that were issued a certificate |
dryRun | boolean, optional | true for --dry-run: nothing was sent, and the policy is as it is now |
changes | object[], optional | --dry-run only: the settings that would change; empty if none would |
changes[].field | string | the setting: name, template or preApprovedDomains |
changes[].from | string or null | its value now, as text: for template the template’s ID, for preApprovedDomains the domains separated by commas; null if none |
changes[].to | string or null | its new value, as from |
Side effects:
- saves the revision’s name, template and pre-approved domains as the policy’s newest revision, marked as restored; nothing when they are current already, or with
--dry-run - the template and pre-approved domains apply to the orders that follow; accounts, EABs and orders stay as they are
- the CA’s log records the restore
pkiaas acme policy revision show
Show one revision of an ACME policy.
pkiaas acme policy revision show POLICY N [--ca NAME|ID] [flags]Show one saved version of an ACME policy: what pkiaas acme policy revision restore POLICY N would put back. POLICY is its name in any case or its ID, in the CA --ca names (by default the active CA); N is the revision number from pkiaas acme policy revision list.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas acme policy revision show "Web servers" 2pkiaas acme policy revision show 205 1 --ca "Example CA" --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the policy belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
policy | object | the policy, as it is named now |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
revision | integer | the revision number, counting from 1 per policy |
savedAt | string | when it was saved, RFC 3339 UTC |
by | string or null | the email of the user who saved it; null for the revisions pkiaas recorded itself (found, outside) |
via | string | where it was saved: app (the website), admin (the website’s classic page), cli, api (another API client); found: the policy as it was when its history started, recorded at its first change; outside: a change made without a revision (such as by an older release of the server), recorded at the next change |
changed | string[] | added for the first revision, else the settings that changed from the revision before: name, template, preApprovedDomains |
restoredFrom | integer or null | the revision it restored; null if it isn’t a restore |
readable | boolean | false when a later release of the server saved the revision, which this one can’t read; settings is null then |
settings | object or null | the policy as the revision saved it: what pkiaas acme policy revision restore would put back |
settings.name | string | the policy’s name |
settings.template | object or null | the template it issued with, with its name now; name is null if the template was deleted since, and template is null if it was deleted before the save: a restore of such a revision is refused |
settings.template.id | string | the template’s ID, which --template takes |
settings.template.name | string or null | the template’s name |
settings.preApprovedDomains | string[] | the names that needed no challenge |
pkiaas acme policy show
Show an ACME policy’s settings and counts.
pkiaas acme policy show NAME|ID [--ca NAME|ID] [flags]Show an ACME policy of a CA, by default the active CA’s, by its name or ID from pkiaas acme policy list: its template, its pre-approved domains, and how many EABs, provisioning URLs, ACME accounts and valid orders it has.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas acme policy show 205pkiaas acme policy show "Web servers"pkiaas acme policy show 205 --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the policy belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the policy’s ID, which the ‘acme policy’ commands take to name it in its CA |
name | string | the policy’s name |
template | object or null | the template certificates are issued with (the names in them come from the order); null if the template was deleted: orders then fail until another is chosen with pkiaas acme policy update --template |
template.id | string | the template’s ID, which --template takes |
template.name | string or null | the template’s name |
preApprovedDomains | string[] | names an order may have without a challenge: * matches any text, dots included, and *.example.com also matches example.com; other names need an http-01, dns-01 or tls-alpn-01 challenge |
eabCount | integer | external account bindings (EABs) of the policy, which ACME clients register with |
provisioningUrlCount | integer | provisioning URLs of the policy (deprecated: no new ones can be made) |
accountCount | integer | ACME accounts registered under the policy |
validOrderCount | integer | orders of the policy’s accounts that were issued a certificate |
pkiaas acme policy update
Change an ACME policy’s name, template or pre-approved domains.
pkiaas acme policy update NAME|ID [--name NAME] [--template NAME|ID] [--pre-approved DOMAIN,...] [--ca NAME|ID] [--dry-run] [flags]Change the settings of an ACME policy of a CA, by default the active CA’s, by its name or ID from pkiaas acme policy list, as the website’s Edit button does. Only the settings whose flags are given change; the others stay as they are. Accounts, EABs and orders stay as they are; a new template and new pre-approved domains apply to the orders that follow.
--name is the new name: 1 to 50 letters, digits, spaces, hyphens and underscores. --template is the name (any case) or ID of one of the CA’s templates, as for pkiaas acme policy create. --pre-approved replaces the whole list of domains that need no challenge, comma-separated or repeated (* matches any text); --pre-approved "" clears it, so that every name needs a challenge.
The command reads the policy, changes the settings given, and sends them all back with the version it read. If someone changed the policy in between, nothing is saved and it fails with acme_changed: run it again. When the policy already has the settings given, nothing is sent and the result is the policy as it is, so the command is safe to run again. --dry-run sends nothing and shows what would change, each setting old → new; with --json, the policy as it is now with dryRun true and changes.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--dry-run | bool | send nothing; show what would change |
--name | string | the policy’s new name: 1 to 50 letters, digits, spaces, hyphens and underscores |
--pre-approved | string, repeatable | the domains orders may have without a challenge, comma-separated or repeated (* matches any text); replaces the whole list, "" clears it |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--template | string | the name or ID of the CA’s template to issue with (pkiaas template list) |
Examples:
pkiaas acme policy update 205 --pre-approved "*.example.com,example.org" --dry-runpkiaas acme policy update 205 --name "Web servers 2" --template "Web Server" --jsonpkiaas acme policy update "Web servers" --pre-approved "*.example.com"pkiaas acme policy update 205 --pre-approved "" --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the policy belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the policy’s ID, which the ‘acme policy’ commands take to name it in its CA |
name | string | the policy’s name |
template | object or null | the template certificates are issued with (the names in them come from the order); null if the template was deleted: orders then fail until another is chosen with pkiaas acme policy update --template |
template.id | string | the template’s ID, which --template takes |
template.name | string or null | the template’s name |
preApprovedDomains | string[] | names an order may have without a challenge: * matches any text, dots included, and *.example.com also matches example.com; other names need an http-01, dns-01 or tls-alpn-01 challenge |
eabCount | integer | external account bindings (EABs) of the policy, which ACME clients register with |
provisioningUrlCount | integer | provisioning URLs of the policy (deprecated: no new ones can be made) |
accountCount | integer | ACME accounts registered under the policy |
validOrderCount | integer | orders of the policy’s accounts that were issued a certificate |
dryRun | boolean, optional | true for --dry-run: nothing was sent, and the policy is as it is now |
changes | object[], optional | --dry-run only: the settings that would change; empty if none would |
changes[].field | string | the setting: name, template or preApprovedDomains |
changes[].from | string or null | its value now, as text: for template the template’s ID, for preApprovedDomains the domains separated by commas; null if none |
changes[].to | string or null | its new value, as from |
Side effects:
- changes the policy’s settings on the server, only those given; nothing when the policy already has them, or with
--dry-run - a new template and new pre-approved domains apply to the orders that follow; accounts, EABs and orders stay as they are
- the CA’s log records the change
pkiaas acme provisioning-url
List a CA’s ACME provisioning URLs (deprecated: use EABs), show one, enable, disable or delete one.
pkiaas acme provisioning-url [flags]Commands:
pkiaas acme provisioning-url deletepkiaas acme provisioning-url listpkiaas acme provisioning-url showpkiaas acme provisioning-url update
pkiaas acme provisioning-url delete
Delete an ACME provisioning URL (deprecated).
pkiaas acme provisioning-url delete ID [--ca NAME|ID] [--yes] [flags]Delete an ACME provisioning URL of a CA, by default the active CA’s, by its ID from pkiaas acme provisioning-url list. ACME clients can no longer register accounts with it; the accounts registered with it keep working. It can’t be undone, and provisioning URLs can’t be created any more. To stop one for now, disable it instead: pkiaas acme provisioning-url update ID --enabled off.
The command first reads the provisioning URL and prints what is deleted. On a terminal, it then asks for confirmation; without a terminal, give --yes, which deletes without asking; without it, the command stops with a usage error.
Running it again after it succeeded fails with not_found, as for a provisioning URL that never existed; if a retry of the same delete finds the provisioning URL gone, the result says it is deleted.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--yes | bool | delete without asking; only after the person saw the provisioning URL and agreed |
Examples:
pkiaas acme provisioning-url delete 295pkiaas acme provisioning-url delete 295 --yes --jsonpkiaas acme provisioning-url delete 295 --ca a1B2c3D4e5 --yes --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the provisioning URL belonged to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
provisioningUrl | object | the provisioning URL |
provisioningUrl.id | integer | the provisioning URL’s ID |
provisioningUrl.name | string | its name |
provisioningUrl.createdAccounts | integer | ACME accounts registered with it (since ACME v2), which keep working |
policy | object | the ACME policy the provisioning URL belonged to |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
deleted | boolean | true: the provisioning URL is deleted, also when an earlier try of the same delete did it |
Side effects:
- deletes the provisioning URL on the server: ACME clients can no longer register with it; accounts registered with it keep working
- it can’t be undone, and provisioning URLs can’t be created any more; the CA’s log records it
pkiaas acme provisioning-url list
List a CA’s ACME provisioning URLs (deprecated), by name.
pkiaas acme provisioning-url list [--ca NAME|ID] [--policy NAME|ID] [--status S,...] [--search TEXT] [--sort FIELD [--order asc|desc]] [--limit N] [flags]List the ACME provisioning URLs of a CA, by default the active CA’s, by name: those of all its ACME policies, or with --policy NAME|ID only those of that policy (pkiaas acme policy list). The ID is what the other ‘acme provisioning-url’ commands take to name a provisioning URL.
A provisioning URL is an ACME directory URL with a secret in its path that lets an ACME client register an account under an ACME policy. Provisioning URLs are deprecated: none can be created, so use an external account binding instead (pkiaas acme eab create). Those that exist keep working until they are disabled, used up or expired. Their secret is never shown, since the server stores only its hash.
--status keeps the provisioning URLs with one of these statuses, comma-separated or repeated: enabled (it can register an account now), disabled, expired or used (no uses left). It lists the first --limit provisioning URLs (default 50, at most 1000); total says how many match. --search keeps those whose name contains the text, in any case. --sort takes name, policy, enabled, usesRemaining or expiresAt, in --order asc (the default with --sort) or desc.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many provisioning URLs to list (1-1000). Default: 50. |
--order | string | asc or desc (default: asc with --sort) |
--policy | string | only the provisioning URLs of this ACME policy, by its name or ID (pkiaas acme policy list) |
--search | string | only provisioning URLs with this text in the name |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--sort | string | what to sort by: name, policy, enabled, usesRemaining, expiresAt (default: name) |
--status | string, repeatable | only provisioning URLs with one of these statuses: enabled, disabled, expired, used |
Examples:
pkiaas acme provisioning-url listpkiaas acme provisioning-url list --policy 205 --status enabled --jsonpkiaas acme provisioning-url list --policy "Web servers"pkiaas acme provisioning-url list --status expired,used --sort expiresAt --order desc --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the provisioning URLs belong to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
total | integer | how many provisioning URLs match; more than are listed when it exceeds --limit |
provisioningUrls | object[] | the first --limit matching provisioning URLs, in the --sort and --order order (by name without --sort); never their secrets |
provisioningUrls[].id | integer | the provisioning URL’s ID, which the ‘acme provisioning-url’ commands take to name it in its CA |
provisioningUrls[].name | string | the provisioning URL’s name |
provisioningUrls[].policy | object | the ACME policy that accounts registered with the provisioning URL belong to |
provisioningUrls[].policy.id | integer | the policy’s ID |
provisioningUrls[].policy.name | string | the policy’s name |
provisioningUrls[].enabled | boolean | whether it may register accounts; pkiaas acme provisioning-url update ID --enabled on|off changes it |
provisioningUrls[].usesRemaining | integer | how many more ACME accounts it may register; each registration takes one. It can’t be raised |
provisioningUrls[].expiresAt | string | when it stops registering accounts (ISO 8601, UTC). It can’t be extended |
provisioningUrls[].status | string | whether it can register an account now: enabled if it is enabled, unexpired and has uses left; otherwise the first of disabled, expired and used that applies |
provisioningUrls[].createdAccounts | integer | ACME accounts registered with it since ACME v2 (2026-10-27); earlier ones aren’t counted. Accounts keep working when the provisioning URL is disabled or deleted |
pkiaas acme provisioning-url show
Show an ACME provisioning URL (deprecated), without its secret.
pkiaas acme provisioning-url show ID [--ca NAME|ID] [flags]Show an ACME provisioning URL of a CA, by default the active CA’s, by its ID from pkiaas acme provisioning-url list: its ACME policy, status, uses remaining, expiration and how many ACME accounts were registered with it. Never its secret, which the server stores only as a hash, so the URL itself can’t be shown.
A provisioning URL is an ACME directory URL with a secret in its path that lets an ACME client register an account under an ACME policy. Provisioning URLs are deprecated: none can be created, so use an external account binding instead (pkiaas acme eab create). Those that exist keep working until they are disabled, used up or expired. Their secret is never shown, since the server stores only its hash.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas acme provisioning-url show 295pkiaas acme provisioning-url show 295 --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the provisioning URL belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the provisioning URL’s ID, which the ‘acme provisioning-url’ commands take to name it in its CA |
name | string | the provisioning URL’s name |
policy | object | the ACME policy that accounts registered with the provisioning URL belong to |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
enabled | boolean | whether it may register accounts; pkiaas acme provisioning-url update ID --enabled on|off changes it |
usesRemaining | integer | how many more ACME accounts it may register; each registration takes one. It can’t be raised |
expiresAt | string | when it stops registering accounts (ISO 8601, UTC). It can’t be extended |
status | string | whether it can register an account now: enabled if it is enabled, unexpired and has uses left; otherwise the first of disabled, expired and used that applies |
createdAccounts | integer | ACME accounts registered with it since ACME v2 (2026-10-27); earlier ones aren’t counted. Accounts keep working when the provisioning URL is disabled or deleted |
pkiaas acme provisioning-url update
Turn an ACME provisioning URL (deprecated) on or off.
pkiaas acme provisioning-url update ID --enabled on|off [--ca NAME|ID] [--dry-run] [flags]Enable or disable an ACME provisioning URL of a CA, by default the active CA’s, by its ID from pkiaas acme provisioning-url list, as the website’s Enable and Disable buttons do. --enabled is the only setting that can change, so it is needed: off disables the provisioning URL, so that it registers no accounts until --enabled on. On only restores it, with the uses and expiration it has: they can’t be raised or extended, so one that is used up or expired stays so (its status says why it can’t register accounts). Accounts registered with it keep working either way.
A provisioning URL is an ACME directory URL with a secret in its path that lets an ACME client register an account under an ACME policy. Provisioning URLs are deprecated: none can be created, so use an external account binding instead (pkiaas acme eab create). Those that exist keep working until they are disabled, used up or expired. Their secret is never shown, since the server stores only its hash.
The command reads the provisioning URL and sends the setting back with the version it read. If the provisioning URL changed in between (an ACME client registering with it takes a use, too), nothing is saved and it fails with acme_changed: run it again. When it already has the setting, nothing is sent and the result is the provisioning URL as it is, so the command is safe to run again. --dry-run sends nothing and shows what would change, old → new; with --json, the provisioning URL as it is now with dryRun true and changes.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--dry-run | bool | send nothing; show what would change |
--enabled | string | on enables it again, with the uses and expiration it has; off disables it (needed) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas acme provisioning-url update 295 --enabled offpkiaas acme provisioning-url update 295 --enabled on --dry-runpkiaas acme provisioning-url update 295 --enabled off --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the provisioning URL belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | integer | the provisioning URL’s ID, which the ‘acme provisioning-url’ commands take to name it in its CA |
name | string | the provisioning URL’s name |
policy | object | the ACME policy that accounts registered with the provisioning URL belong to |
policy.id | integer | the policy’s ID |
policy.name | string | the policy’s name |
enabled | boolean | whether it may register accounts; pkiaas acme provisioning-url update ID --enabled on|off changes it |
usesRemaining | integer | how many more ACME accounts it may register; each registration takes one. It can’t be raised |
expiresAt | string | when it stops registering accounts (ISO 8601, UTC). It can’t be extended |
status | string | whether it can register an account now: enabled if it is enabled, unexpired and has uses left; otherwise the first of disabled, expired and used that applies |
createdAccounts | integer | ACME accounts registered with it since ACME v2 (2026-10-27); earlier ones aren’t counted. Accounts keep working when the provisioning URL is disabled or deleted |
dryRun | boolean, optional | true for --dry-run: nothing was sent, and the provisioning URL is as it is now |
changes | object[], optional | --dry-run only: the settings that would change; empty if none would |
changes[].field | string | the setting: enabled, the only one that can change |
changes[].from | string | its value now: on or off |
changes[].to | string | its new value: on or off |
Side effects:
- enables or disables the provisioning URL on the server; nothing when it already has the setting, or with
--dry-run - accounts registered with it keep working either way
- the CA’s log records the change
pkiaas ca
Create certificate authorities, list them, show one, change its settings, export its certificate, CSR or CPS, set the active one, delete one.
pkiaas ca [flags]Commands:
pkiaas ca createpkiaas ca deletepkiaas ca exportpkiaas ca listpkiaas ca setpkiaas ca showpkiaas ca update
pkiaas ca create
Create a CA, self-signed or (with —csr-only) waiting for another CA to sign it.
pkiaas ca create --name NAME [--subject DN] [--key-type TYPE] [--signature-algorithm sha256|sha384|sha512] [--days N] [--path-length N] [--key-usage USAGE]... [--extended-key-usage USAGE]... [--csr-only] [--set] [--idempotency-key KEY] [--yes] [flags]Create a certificate authority owned by you, as the website’s “Create a Managed CA” form does. The platform makes the CA’s key, which never leaves it, and self-signs the CA’s certificate, so the new CA is a root CA. It also makes the CA’s OCSP responder certificate and gives it a copy of the “Web Server” template, so it can issue certificates at once. It takes a few seconds (SLH-DSA keys up to about 5). The result is the new CA, as pkiaas ca show describes it; commands take its id (or name) with --ca. It doesn’t become the active CA unless --set is given, which sets it as pkiaas ca set does.
--name is the CA’s name: its certificate’s common name, at most 64 characters. --subject gives the certificate’s other subject fields in RFC 4514 form (“O=Example,OU=IT,C=US”) or OpenSSL’s (“/C=US/O=Example/OU=IT”): only C, ST, L, O and OU, each at most once. --key-type is the CA’s key type: the flag lists those a CA can have, which pkiaas key types describes. --signature-algorithm is ignored for ML-DSA and SLH-DSA keys, which have their own. sha1 is for testing only: SHA-1 is broken for collisions, and OpenSSL 3 (at its default security level) and Windows reject SHA-1 certificate chains. The command prints a warning on standard error and asks for confirmation on the terminal; without one, it needs --yes. Give --yes only when the person asked for SHA-1. --days is how long the certificate is valid (1 to 36500). --path-length limits how many CAs may follow this one in a chain (0 to 4; 0: it can only issue end-entity certificates); without it there is no limit.
--key-usage and --extended-key-usage (repeatable, or comma-separated) add to the certificate’s key usages, which always include digitalSignature, keyCertSign and cRLSign. A CA usually has no extended key usages: those it has limit every certificate it issues, and Windows and some other clients enforce that.
With --csr-only, the CA isn’t signed: it waits for another CA to sign its CSR, which pkiaas ca export --csr exports, and for the signed certificate to be imported on the website. Until then it can’t issue certificates.
Each run is a new CA, unless it has the --idempotency-key of an earlier run (any text, e.g. a UUID) and the same flags: within 24 hours that gives the earlier result instead of a second CA. Without --idempotency-key, the CLI makes a key and reports it (idempotencyKey), and uses it when it retries by itself. A key used for different flags is refused (error idempotency_key_reused).
You can create at most 20 CAs an hour; beyond that the server refuses with http_429 and says when to try again. If a step fails on the server, nothing is kept and the command fails with ca_creation_failed, naming the step. pkiaas ca delete deletes a CA you no longer need.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--csr-only | bool | leave the CA unsigned, for another CA to sign its CSR (pkiaas ca export --csr) |
--days | int | how many days the CA’s certificate is valid (1-36500). Default: 3650. |
--extended-key-usage | string, repeatable | an extended key usage (repeatable): serverAuth, clientAuth, codeSigning, emailProtection, timeStamping, OCSPSigning, msCodeInd, msCodeCom, msCTLSign, msEFS, ipsecIKE, ipsecEndSystem, ipsecTunnel, ipsecUser |
--idempotency-key | string | repeat an earlier run with this key instead of creating a second CA (default: a new random key) |
--key-type | string | the CA’s key, made on the platform: rsa-2048, rsa-4096, ec-p256, ec-p384, ec-p521, ml-dsa-44, ml-dsa-65, ml-dsa-87, slh-dsa-sha2-128s, slh-dsa-sha2-128f, slh-dsa-sha2-192s, slh-dsa-sha2-192f, slh-dsa-sha2-256s, slh-dsa-sha2-256f, slh-dsa-shake-128s, slh-dsa-shake-128f, slh-dsa-shake-192s, slh-dsa-shake-192f, slh-dsa-shake-256s, slh-dsa-shake-256f. Default: rsa-2048. |
--key-usage | string, repeatable | a key usage to add (repeatable): digitalSignature, keyCertSign, cRLSign, keyEncipherment, nonRepudiation, dataEncipherment, keyAgreement, encipherOnly, decipherOnly |
--name | string | the CA’s name: its certificate’s common name (at most 64 characters) |
--path-length | int | how many CAs may follow this one in a chain, 0-4 (default: no limit) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--set | bool | also make the new CA the active CA, as pkiaas ca set does |
--signature-algorithm | string | the hash the CA signs with: sha1, sha256, sha384 or sha512 (ignored for ML-DSA and SLH-DSA; sha1 for testing only). Default: sha256. |
--subject | string | the certificate’s other subject fields, C, ST, L, O and OU, e.g. “O=Example,OU=IT,C=US” |
--yes | bool | create a SHA-1 CA without asking for confirmation |
Examples:
pkiaas ca create --name "Example Root CA" --subject "O=Example,C=US"pkiaas ca create --name "Example Root CA" --key-type ec-p384 --signature-algorithm sha384 --days 7300 --set --jsonpkiaas ca create --name "Example Issuing CA" --subject "O=Example,OU=IT,C=US" --path-length 0 --csr-only --jsonpkiaas ca create --name "Test CA $RUN" --key-type ec-p256 --days 7 --idempotency-key "$KEY" --jsonpkiaas ca create --name "SHA-1 test CA" --signature-algorithm sha1 --days 7 --yesWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server |
id | string or null | the CA’s ID; null if the account has no CAs |
name | string or null | the CA’s name (its certificate’s common name) |
source | string | how the CA was chosen: flag (--ca), environment (PKIAAS_CA), or as the active CA: set (with pkiaas ca set, or at login), website (the CA last used on the website), first (the first CA by name); none if the account has no CAs. For pkiaas ca create: created, or set with --set |
signed | boolean or null | false while the CA waits for its signed certificate to be imported |
hsm | boolean or null | whether the CA’s private key is on the user’s HSM rather than on the platform |
keyType | string or null | the algorithm of the CA’s key, as OpenSSL names it, e.g. rsaEncryption, id-ecPublicKey, ML-DSA-65 |
keySize | integer or null | the key size in bits (the curve size for EC keys); null where it doesn’t apply, e.g. ML-DSA |
signatureAlgorithm | string or null | the algorithm of the CA certificate’s signature, as OpenSSL names it |
serial | string or null | the CA certificate’s serial number (hex); null if unsigned |
thumbprint | string or null | the CA certificate’s SHA-1 fingerprint (hex), as Windows shows it; null if unsigned |
validFrom | string or null | when the CA’s certificate became valid (ISO 8601, UTC); null if unsigned |
validTo | string or null | when the CA’s certificate expires (ISO 8601, UTC); null if unsigned |
activeCertificates | integer or null | how many certificates the CA issued that have neither expired nor been revoked |
policyOid | string or null | the certificate policy OID the CA puts in the certificates it issues; null if none |
cep | boolean or null | whether Windows certificate enrollment (CEP/CES) is on |
urls | object or null | the CA’s public services; null until the CA is signed |
urls.certificate | string | the CA’s certificate (DER), as the certificates it issues name it (AIA caIssuers) |
urls.chain | string | the CA’s certificate and those that issued it (PKCS#7, DER) |
urls.crl | string | the CRL (CRL distribution point) |
urls.ocsp | string | the OCSP responder (AIA OCSP) |
urls.timestamp | string | the RFC 3161 time-stamping service |
urls.cps | string | the CA’s public page: its certification practice statement and downloads |
urls.cep | string | Windows certificate enrollment (CEP/CES) with a user name and password; works when cep is true |
urls.cepCertificate | string | Windows certificate enrollment (CEP/CES) with a client certificate; works when cep is true |
settings | object or null | the CA’s settings, which pkiaas ca update changes (the website’s Edit CA page); null if the account has no CAs |
settings.policyOid | string or null | the certificate policy OID the CA puts in certificates from templates with policies, next to the address of its CPS page; null if none is set |
settings.cps | object | the certification practice statement on the CA’s public page (urls.cps) |
settings.cps.format | string | markdown, or html for a CPS written in the website’s old editor (shown as it is until someone converts it to Markdown) |
settings.cps.text | string | the CPS as stored; pkiaas ca export --cps writes it to a file |
settings.cep | object | Windows certificate enrollment (CEP/CES) with a user name and password |
settings.cep.enabled | boolean | whether Windows certificate enrollment (CEP/CES) is on |
settings.cep.credentialsSet | boolean | whether a CEP user name and password are stored (they are never shown) |
settings.serviceCertificates | object | the key the OCSP responder and time-stamping certificates get when they are next made: when they expire (yearly) or are revoked |
settings.serviceCertificates.keyType | string or null | the key type, as pkiaas key types names it; null if the stored one is none of them (e.g. the retired dilithium) |
settings.serviceCertificates.signatureAlgorithm | string or null | the hash they are signed with: sha1, sha256, sha384 or sha512; null for ML-DSA and SLH-DSA keys, which have their own |
idempotencyKey | string | the Idempotency-Key it was sent with: the same command with --idempotency-key and this key, within 24 hours, gives this result again instead of a second CA |
Side effects:
- creates a CA owned by the user’s account on the server; with the
--idempotency-keyof an earlier run (within 24 hours), nothing new - the platform makes the CA’s private key and keeps it; it never leaves the platform
- the platform also makes the CA’s OCSP responder certificate and copies the “Web Server” template to the CA
- counts toward the limit of 20 CAs per user an hour
- with
--signature-algorithmsha1 (RSA and EC keys), prints a warning on standard error and asks for confirmation on the terminal (--yesskips the question) - with
--set, keeps the new CA as the active one in the CLI’s config.json, for this server
pkiaas ca delete
Delete a CA, with its certificates, requests and templates.
pkiaas ca delete NAME|ID [--dry-run] [--yes] [flags]Delete a certificate authority, by its name (in any case) or ID from pkiaas ca list. The CA has to be named: it is never the active CA or PKIAAS_CA by default. A name that more than one of your CAs has is refused (error ca_ambiguous): give the ID then. Only the CA’s owner can delete it (error forbidden for a CA shared with you).
Deleting a CA deletes every certificate it issued, its pending requests, templates, ACME policies and log lines. OCSP, the CRL, SCEP, ACME and CEP stop answering for it, so clients can no longer check its certificates, and its public pages are removed. Its ACME accounts stop working, and the other users it is shared with lose it. For a CA whose key is on the user’s HSM, the HSM keeps the key. It can’t be undone.
The command first asks the server what the delete takes with it (a dry run, which changes nothing) and prints that. --dry-run stops there; with --json, the result is the dry run: ca and impact. Otherwise, on a terminal, it asks for the CA’s name to be typed: only the exact name deletes the CA, anything else stops and deletes nothing. Without a terminal, give --yes, which deletes without asking; without it, the command stops with a usage error.
The delete is sent with the version of the CA the dry run saw: if someone changed the CA in between, nothing is deleted and it fails with ca_changed: run the command again to see the impact now. Running it again after it succeeded fails with not_found, as for a CA that never existed; if a retry of the same delete finds the CA gone, the result says it is deleted. If the CA was the active CA on this computer, that setting is cleared: commands then use the CA you last used on the website, else the first by name, as pkiaas ca show says.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--dry-run | bool | show what the delete would take with it, and delete nothing |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--yes | bool | delete without asking for the CA’s name; only after the person saw what the delete takes with it and agreed |
Examples:
pkiaas ca delete "Test CA 1234" --dry-runpkiaas ca delete "Test CA 1234" --dry-run --jsonpkiaas ca delete "Test CA 1234"pkiaas ca delete "Test CA 1234" --yes --jsonpkiaas ca delete a1B2c3D4e5 --yesWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
id | string, optional | the deleted CA’s ID (not with --dry-run) |
name | string, optional | the deleted CA’s name (not with --dry-run) |
deleted | boolean, optional | true: the CA is deleted, also when an earlier try of the same delete did it (not with --dry-run) |
ca | object, optional | --dry-run only: the CA the delete would remove |
ca.id | string | the CA’s ID |
ca.name | string | the CA’s name |
impact | object, optional | --dry-run only: what deleting the CA takes with it |
impact.activeCertificates | integer | issued certificates that are still valid and not revoked: OCSP and the CRL stop answering for them |
impact.certificates | integer | the certificates the CA issued (not its own OCSP, SCEP and timestamp certificates), all deleted |
impact.pendingRequests | integer | requests that wait for approval or signing, all deleted |
impact.templates | integer | the CA’s templates, all deleted |
impact.acmeAccounts | integer | ACME accounts of the CA’s ACME policies, which stop working |
impact.delegates | integer | other users the CA is shared with, who lose it too |
impact.hsm | boolean | the CA’s key is on the user’s HSM, which keeps it; PKIaaS.io deletes only its copy of the CA’s certificate |
impact.reversible | boolean | always false: a deleted CA can never be restored |
Side effects:
- deletes the CA on the server, with every certificate it issued, its pending requests, templates, ACME policies and log lines; nothing with
--dry-run - OCSP, the CRL, SCEP, ACME and CEP stop answering for the CA, its public pages are removed, its ACME accounts stop working, and the users it is shared with lose it
- it can’t be undone; an HSM keeps the key of a CA whose key is on it
- clears the active CA in the CLI’s config.json if it was this CA
pkiaas ca export
Export a CA’s certificate, its chain, the CSR of an unsigned CA, or its CPS.
pkiaas ca export [--chain | --csr | --cps] [--format pem|der] [--out FILE] [--ca NAME|ID] [flags]Export the certificate of a CA, by default the active CA. The chain (--chain) is the CA’s certificate followed by the certificates that issued it, up to the root; for a root CA that is its certificate alone. It is what a server needs beside a certificate the CA issued, and what pkiaas pkcs12 create --chain-file adds to a PKCS#12 file. The certificate of a root CA is what clients add to their trust store.
A CA waiting for its signed certificate fails with ca_not_signed. With --csr, it exports such a CA’s certificate signing request instead (e.g. of a CA made with pkiaas ca create --csr-only), for another CA to sign; the signed certificate is then imported on the website. A signed CA has no CSR to export (error conflict). An --out file with a CSR is readable by its owner only, as for pkiaas cert export --csr.
With --cps, it exports the CA’s certification practice statement, the text of its public page, as stored: Markdown, or HTML for a CPS written in the website’s old editor (the result’s format says which). Edit it and send it back with pkiaas ca update --cps-file. --format doesn’t apply to it.
Without --out (or with --out -), the output goes to standard output, as OpenSSL writes it, to read or to pipe to another command; there is no result then, so --json needs --out. With --out FILE, it is written to the file, which is only replaced with --force, and the result describes it.
--format is pem (default) or der, as OpenSSL’s -outform. PEM is what servers, OpenSSL and pkiaas pkcs12 create read; DER (.cer, .der) is the binary form Windows and Java also take. DER holds one certificate, so it can’t be used with --chain. Like OpenSSL, it goes to standard output as it is, also to a terminal.
With --chain, the output holds the certificate followed by the certificates that issued it, up to the root: what a server sends (e.g. nginx’s ssl_certificate).
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--chain | bool | export the CA’s certificate followed by the certificates that issued it |
--cps | bool | export the CA’s CPS (Markdown, or HTML for an old one) instead, to edit it for pkiaas ca update --cps-file |
--csr | bool | export the CSR of a CA that waits for its signed certificate instead |
--force | bool | replace the --out file if it exists |
--format | string | pem or der (as OpenSSL’s -outform). Default: pem. |
-o, --out | string | the file to write (default: standard output, as with -) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas ca exportpkiaas ca export --out ca.pempkiaas ca export --chain --out chain.pem --jsonpkiaas ca export --ca a1B2c3D4e5 --format der --out root.cerpkiaas ca export --csr --ca a1B2c3D4e5 --out ca.csr --jsonpkiaas ca export --cps > cpspkiaas ca export --cps --ca a1B2c3D4e5 --out cps --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
id | string | the CA’s ID |
name | string or null | the CA’s name |
file | string | the file written (--out) |
format | string | pem or der (--format); for --cps, markdown or html, as the CPS is stored |
content | string | what the file holds: certificate, chain (--chain: the CA’s certificate followed by those that issued it), csr (--csr) or cps (--cps) |
certificates | integer | how many certificates the file holds; 0 for a CSR |
Side effects:
- with
--out, writes the file (readable by everyone for certificates and the CPS, which are public; by its owner only for a CSR); otherwise writes to standard output and prints no result
pkiaas ca list
List the CAs you have access to.
pkiaas ca list [flags]List the certificate authorities your account has access to: your own, and those you were invited to, by name. Commands take a CA’s name, in any case, or its ID; scripts should keep the ID, which never changes and no other CA has. The active CA, which commands work in unless told otherwise, is marked with *.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas ca listpkiaas ca list --jsonWith --json, the result is an array of objects with these fields:
| Field | Type | Description |
|---|---|---|
id | string | the CA’s ID, which commands take to name the CA, like its name; scripts should keep the ID |
name | string or null | the CA’s name (its certificate’s common name) |
signed | boolean | false while the CA waits for its signed certificate to be imported |
validTo | string or null | when the CA’s certificate expires (ISO 8601, UTC); null if unsigned |
active | boolean | whether it is the active CA, which commands work in unless told otherwise |
pkiaas ca set
Set the active CA.
pkiaas ca set NAME|ID [flags]Set the active CA, which commands work in unless told otherwise, by its name (in any case) or ID from pkiaas ca list. A name that more than one of your CAs has is refused (error ca_ambiguous): give the ID then. The ID is kept, so renaming the CA doesn’t change it. It is kept on this computer, for this server, until pkiaas logout; it doesn’t change the CA you work in on the website.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas ca set "Example Issuing CA"pkiaas ca set a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server |
id | string or null | the active CA’s ID; null if the account has no CAs |
name | string or null | the active CA’s name |
source | string | why it is active: set (with pkiaas ca set, or at login), website (the CA last used on the website), first (the first CA by name), or none |
Side effects:
- keeps the CA as the active one in the CLI’s config.json, for this server
pkiaas ca show
Show a CA’s details, by default the active CA’s.
pkiaas ca show [--ca NAME|ID] [flags]Show a CA’s details: its key, certificate (serial, thumbprint, validity), how many certificates it has issued that are still valid, and the URLs of its public services (certificate, chain, CRL, OCSP, time stamping, CPS page and Windows enrollment).
Without --ca or PKIAAS_CA, it shows the active CA: the CA that commands work in unless told otherwise. It is the one set with pkiaas ca set (or at login), on this computer for this server. Until one is set, it is the CA you last worked in on the website. The result’s source says how the CA was chosen. When the account has no CAs, the id, the name and the details are null, and source is none.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas ca showpkiaas ca show --jsonpkiaas ca show --ca "Example Issuing CA"pkiaas ca show --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server |
id | string or null | the CA’s ID; null if the account has no CAs |
name | string or null | the CA’s name (its certificate’s common name) |
source | string | how the CA was chosen: flag (--ca), environment (PKIAAS_CA), or as the active CA: set (with pkiaas ca set, or at login), website (the CA last used on the website), first (the first CA by name); none if the account has no CAs. For pkiaas ca create: created, or set with --set |
signed | boolean or null | false while the CA waits for its signed certificate to be imported |
hsm | boolean or null | whether the CA’s private key is on the user’s HSM rather than on the platform |
keyType | string or null | the algorithm of the CA’s key, as OpenSSL names it, e.g. rsaEncryption, id-ecPublicKey, ML-DSA-65 |
keySize | integer or null | the key size in bits (the curve size for EC keys); null where it doesn’t apply, e.g. ML-DSA |
signatureAlgorithm | string or null | the algorithm of the CA certificate’s signature, as OpenSSL names it |
serial | string or null | the CA certificate’s serial number (hex); null if unsigned |
thumbprint | string or null | the CA certificate’s SHA-1 fingerprint (hex), as Windows shows it; null if unsigned |
validFrom | string or null | when the CA’s certificate became valid (ISO 8601, UTC); null if unsigned |
validTo | string or null | when the CA’s certificate expires (ISO 8601, UTC); null if unsigned |
activeCertificates | integer or null | how many certificates the CA issued that have neither expired nor been revoked |
policyOid | string or null | the certificate policy OID the CA puts in the certificates it issues; null if none |
cep | boolean or null | whether Windows certificate enrollment (CEP/CES) is on |
urls | object or null | the CA’s public services; null until the CA is signed |
urls.certificate | string | the CA’s certificate (DER), as the certificates it issues name it (AIA caIssuers) |
urls.chain | string | the CA’s certificate and those that issued it (PKCS#7, DER) |
urls.crl | string | the CRL (CRL distribution point) |
urls.ocsp | string | the OCSP responder (AIA OCSP) |
urls.timestamp | string | the RFC 3161 time-stamping service |
urls.cps | string | the CA’s public page: its certification practice statement and downloads |
urls.cep | string | Windows certificate enrollment (CEP/CES) with a user name and password; works when cep is true |
urls.cepCertificate | string | Windows certificate enrollment (CEP/CES) with a client certificate; works when cep is true |
settings | object or null | the CA’s settings, which pkiaas ca update changes (the website’s Edit CA page); null if the account has no CAs |
settings.policyOid | string or null | the certificate policy OID the CA puts in certificates from templates with policies, next to the address of its CPS page; null if none is set |
settings.cps | object | the certification practice statement on the CA’s public page (urls.cps) |
settings.cps.format | string | markdown, or html for a CPS written in the website’s old editor (shown as it is until someone converts it to Markdown) |
settings.cps.text | string | the CPS as stored; pkiaas ca export --cps writes it to a file |
settings.cep | object | Windows certificate enrollment (CEP/CES) with a user name and password |
settings.cep.enabled | boolean | whether Windows certificate enrollment (CEP/CES) is on |
settings.cep.credentialsSet | boolean | whether a CEP user name and password are stored (they are never shown) |
settings.serviceCertificates | object | the key the OCSP responder and time-stamping certificates get when they are next made: when they expire (yearly) or are revoked |
settings.serviceCertificates.keyType | string or null | the key type, as pkiaas key types names it; null if the stored one is none of them (e.g. the retired dilithium) |
settings.serviceCertificates.signatureAlgorithm | string or null | the hash they are signed with: sha1, sha256, sha384 or sha512; null for ML-DSA and SLH-DSA keys, which have their own |
pkiaas ca update
Change a CA’s settings: its CPS, policy identifier, Windows enrollment (CEP) and service certificate key.
pkiaas ca update [--ca NAME|ID] [--cps-file FILE] [--policy-oid OID] [--cep on|off] [--cep-username NAME --cep-password-env NAME | --cep-password-file FILE] [--service-key-type TYPE] [--service-signature-algorithm sha256|sha384|sha512|sha1] [--dry-run] [flags]Change the settings of a CA, by default the active CA, as the website’s Edit CA page does. Only the settings whose flags are given change; the others stay as they are. The CA’s name, key and certificate can’t be changed. Changing settings needs the modify privilege in the CA (error forbidden without it).
--cps-file is the CA’s new certification practice statement (CPS), the text of its public page, in Markdown (- for standard input). To edit the CPS, export it (pkiaas ca export --cps > cps), change the file, and send it back (pkiaas ca update --cps-file cps). An HTML CPS written in the website’s old editor is replaced by the Markdown you send; convert it on the website to keep its formatting.
--policy-oid is the certificate policy OID (dotted, at most 50 characters) the CA puts in the certificates of templates with policies, next to the address of its CPS page. --policy-oid none removes it: certificates then get neither the policy nor the CPS address.
--cep on|off turns Windows certificate enrollment (CEP/CES) on or off. It needs a user name and password, which Windows clients enroll with: --cep-username with the password from --cep-password-env NAME (an environment variable) or --cep-password-file FILE (its first line; - for standard input), never as an argument. Both replace the stored ones; without them the stored ones are kept. The CA’s CEP URLs are in pkiaas ca show.
--service-key-type is the key of the CA’s OCSP responder and time-stamping certificates, as pkiaas key types names it. --service-signature-algorithm is the hash they are signed with; ML-DSA and SLH-DSA keys have their own, so it doesn’t apply to them. With a new RSA or EC key type and no --service-signature-algorithm, the stored hash is kept (sha256 if there is none). The certificates get the new key when they are next made: when they expire (yearly) or are revoked.
The command reads the CA’s settings, changes those given, and sends them all back with the version it read. If someone changed the CA in between, nothing is saved and it fails with ca_changed: run it again. Running it again after it succeeded changes nothing more. When the CA already has the settings given, nothing is sent and the result is the CA as it is. --dry-run sends nothing and shows what would change, each setting old → new; with --json, the CA as it is now with dryRun true and changes.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--cep | string | turn Windows certificate enrollment (CEP/CES) on or off |
--cep-password-env | string | read the CEP password from this environment variable. Not with --cep-password-file. |
--cep-password-file | string | read the CEP password from this file’s first line (- for standard input). Not with --cep-password-env. |
--cep-username | string | the CEP user name, with the password from --cep-password-env or --cep-password-file; replaces the stored ones |
--cps-file | string | the new CPS, in Markdown, from this file (- for standard input); pkiaas ca export --cps exports the current one |
--dry-run | bool | send nothing; show what would change |
--policy-oid | string | the certificate policy OID, in dotted form, e.g. 2.5.29.32.0 (at most 50 characters), or none |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--service-key-type | string | the key of the OCSP and time-stamping certificates: rsa-2048, rsa-4096, ec-p256, ec-p384, ec-p521, ml-dsa-44, ml-dsa-65, ml-dsa-87, slh-dsa-sha2-128s, slh-dsa-sha2-128f, slh-dsa-sha2-192s, slh-dsa-sha2-192f, slh-dsa-sha2-256s, slh-dsa-sha2-256f, slh-dsa-shake-128s, slh-dsa-shake-128f, slh-dsa-shake-192s, slh-dsa-shake-192f, slh-dsa-shake-256s, slh-dsa-shake-256f |
--service-signature-algorithm | string | the hash they are signed with: sha256, sha384, sha512 or sha1 (not for ML-DSA and SLH-DSA keys; default: the stored one, else sha256) |
Examples:
pkiaas ca update --cps-file cpspkiaas ca update --cps-file cps --dry-runpkiaas ca update --cep on --cep-username enroll --cep-password-env CEP_PASSWORD --jsonpkiaas ca update --cep offpkiaas ca update --ca a1B2c3D4e5 --policy-oid 1.3.6.1.4.1.99999.1 --jsonpkiaas ca update --ca "Example CA" --policy-oid none --dry-runpkiaas ca update --service-key-type ec-p384 --service-signature-algorithm sha384 --dry-run --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server |
id | string or null | the CA’s ID; null if the account has no CAs |
name | string or null | the CA’s name (its certificate’s common name) |
source | string | how the CA was chosen: flag (--ca), environment (PKIAAS_CA), or as the active CA: set (with pkiaas ca set, or at login), website (the CA last used on the website), first (the first CA by name); none if the account has no CAs. For pkiaas ca create: created, or set with --set |
signed | boolean or null | false while the CA waits for its signed certificate to be imported |
hsm | boolean or null | whether the CA’s private key is on the user’s HSM rather than on the platform |
keyType | string or null | the algorithm of the CA’s key, as OpenSSL names it, e.g. rsaEncryption, id-ecPublicKey, ML-DSA-65 |
keySize | integer or null | the key size in bits (the curve size for EC keys); null where it doesn’t apply, e.g. ML-DSA |
signatureAlgorithm | string or null | the algorithm of the CA certificate’s signature, as OpenSSL names it |
serial | string or null | the CA certificate’s serial number (hex); null if unsigned |
thumbprint | string or null | the CA certificate’s SHA-1 fingerprint (hex), as Windows shows it; null if unsigned |
validFrom | string or null | when the CA’s certificate became valid (ISO 8601, UTC); null if unsigned |
validTo | string or null | when the CA’s certificate expires (ISO 8601, UTC); null if unsigned |
activeCertificates | integer or null | how many certificates the CA issued that have neither expired nor been revoked |
policyOid | string or null | the certificate policy OID the CA puts in the certificates it issues; null if none |
cep | boolean or null | whether Windows certificate enrollment (CEP/CES) is on |
urls | object or null | the CA’s public services; null until the CA is signed |
urls.certificate | string | the CA’s certificate (DER), as the certificates it issues name it (AIA caIssuers) |
urls.chain | string | the CA’s certificate and those that issued it (PKCS#7, DER) |
urls.crl | string | the CRL (CRL distribution point) |
urls.ocsp | string | the OCSP responder (AIA OCSP) |
urls.timestamp | string | the RFC 3161 time-stamping service |
urls.cps | string | the CA’s public page: its certification practice statement and downloads |
urls.cep | string | Windows certificate enrollment (CEP/CES) with a user name and password; works when cep is true |
urls.cepCertificate | string | Windows certificate enrollment (CEP/CES) with a client certificate; works when cep is true |
settings | object or null | the CA’s settings, which pkiaas ca update changes (the website’s Edit CA page); null if the account has no CAs |
settings.policyOid | string or null | the certificate policy OID the CA puts in certificates from templates with policies, next to the address of its CPS page; null if none is set |
settings.cps | object | the certification practice statement on the CA’s public page (urls.cps) |
settings.cps.format | string | markdown, or html for a CPS written in the website’s old editor (shown as it is until someone converts it to Markdown) |
settings.cps.text | string | the CPS as stored; pkiaas ca export --cps writes it to a file |
settings.cep | object | Windows certificate enrollment (CEP/CES) with a user name and password |
settings.cep.enabled | boolean | whether Windows certificate enrollment (CEP/CES) is on |
settings.cep.credentialsSet | boolean | whether a CEP user name and password are stored (they are never shown) |
settings.serviceCertificates | object | the key the OCSP responder and time-stamping certificates get when they are next made: when they expire (yearly) or are revoked |
settings.serviceCertificates.keyType | string or null | the key type, as pkiaas key types names it; null if the stored one is none of them (e.g. the retired dilithium) |
settings.serviceCertificates.signatureAlgorithm | string or null | the hash they are signed with: sha1, sha256, sha384 or sha512; null for ML-DSA and SLH-DSA keys, which have their own |
dryRun | boolean, optional | true for --dry-run: nothing was sent, and the CA is as it is now |
changes | object[], optional | --dry-run only: the settings that would change; empty if none would |
changes[].field | string | the setting, as in settings: policyOid, cps.format, cps.text, cep.enabled, cep.credentials, serviceCertificates.keyType or serviceCertificates.signatureAlgorithm |
changes[].from | string or null | its value now, as text: for cps.text the size, e.g. “2153 bytes”; for cep.enabled on or off; for cep.credentials set, or null if none are stored; null if not set |
changes[].to | string or null | its new value, as from; for cep.credentials always “replaced” (the user name and password are never shown) |
Side effects:
- changes the CA’s settings on the server, only those given; nothing when the CA already has them, or with
--dry-run - with
--cep-username, replaces the stored CEP user name and password, which Windows clients enroll with - OCSP and time-stamping certificates use the new key from their next renewal (yearly, or when revoked)
- an HTML CPS written in the website’s old editor is replaced by the Markdown you send; convert it on the website to keep its formatting
- the CA’s log records the change
pkiaas cert
List the certificates a CA issued, show one, export it, its chain or its CSR, revoke it.
pkiaas cert [flags]Commands:
pkiaas cert export
Export a certificate, with its chain, or the CSR it was issued from, as PEM or DER.
pkiaas cert export SERIAL [--chain | --csr] [--format pem|der] [--out FILE] [--ca NAME|ID] [flags]Export a certificate that a CA issued, by default the active CA, by its serial number from pkiaas cert list.
With --csr, it exports the certificate signing request the certificate was issued from instead. It is stored for most certificates, but not all (e.g. not for ACME): pkiaas cert show says whether (hasCsr), and a certificate without one fails with csr_not_stored. A CSR sent by SCEP holds the enrollment’s challenge password, so every exported CSR is a secret: an --out file with it is readable by its owner only, and without --out it goes to standard output only when that is a terminal (in a pipe or captured output the command fails with secret_destination); give --out - to pipe it.
Without --out (or with --out -), the output goes to standard output, as OpenSSL writes it, to read or to pipe to another command; there is no result then, so --json needs --out. With --out FILE, it is written to the file, which is only replaced with --force, and the result describes it.
--format is pem (default) or der, as OpenSSL’s -outform. PEM is what servers, OpenSSL and pkiaas pkcs12 create read; DER (.cer, .der) is the binary form Windows and Java also take. DER holds one certificate, so it can’t be used with --chain. Like OpenSSL, it goes to standard output as it is, also to a terminal.
With --chain, the output holds the certificate followed by the certificates that issued it, up to the root: what a server sends (e.g. nginx’s ssl_certificate).
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
This command calls the PKIaaS server and needs a login.
Its output (the CSR, with —csr) is a secret: it goes to --out FILE, to --out -, or to a terminal, never into a pipe without --out - or into a --json result (error secret_destination).
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--chain | bool | export the certificate followed by the CA’s certificate and those that issued the CA |
--csr | bool | export the CSR the certificate was issued from instead |
--force | bool | replace the --out file if it exists |
--format | string | pem or der (as OpenSSL’s -outform). Default: pem. |
-o, --out | string | the file to write (default: standard output, as with -) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas cert export 25ab765c7238b3d28d2bab03271f5fa8f2fccf86pkiaas cert export 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 | openssl x509 -noout -subjectpkiaas cert export 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --chain --out fullchain.pem --jsonpkiaas cert export 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --format der --out www.cerpkiaas cert export 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --csr --out - | openssl req -noout -textWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
issuer | object | the CA that issued the certificate |
issuer.id | string | the ID of the CA that issued the certificate, which --ca takes |
issuer.name | string or null | the CA’s name (its certificate’s common name) |
serial | string | the certificate’s serial number |
name | string or null | the certificate’s common name |
file | string | the file written (--out) |
format | string | pem or der (--format) |
content | string | what the file holds: certificate, chain (--chain: the certificate, the CA’s certificate and those that issued the CA) or csr (--csr) |
certificates | integer | how many certificates the file holds; 0 for a CSR |
Side effects:
- with
--outFILE, writes the file (readable by everyone for certificates, by its owner only for a CSR); otherwise writes to standard output (a CSR only with--out- or to a terminal) and prints no result
pkiaas cert list
List the certificates a CA issued, the newest first.
pkiaas cert list [--ca NAME|ID] [--search TEXT] [--match FIELD:VALUE]... [--status S] [--expires-within DAYS] [--template NAME|ID] [--key-type T] [--reason R] [--sort FIELD [--order asc|desc]] [--limit N] [flags]List the certificates a CA issued, by default the active CA’s: every certificate it signed, also expired and revoked ones and the CAs it signed, the newest first. The serial is what commands take to name a certificate.
It lists the first --limit certificates (default 50, at most 1000); total says how many match, so when it is more, narrow the list with the filters or sort it to bring the ones you need first. --sort takes name, revocationReason, template, validFrom, validTo, keyType or keySize, in --order asc (the default with --sort) or desc. Without --sort: validFrom, desc.
The filters are checked on the server, and a certificate is listed when all that are given hold: --search TEXT the text is in the common name, a subject value or a SAN value, in any case; when it is hex (at least 8 digits; colons and spaces between the bytes are ignored), also in the serial or the SHA-1 thumbprint --match FIELD:VALUE one subject attribute or SAN type has this whole value, in any case; * matches any text (dns:*.example.com also matches the wildcard name *.example.com itself). FIELD is a subject attribute by its OpenSSL short or long name (CN, C, ST, L, O, OU, postalCode, street, emailAddress, serialNumber, businessCategory, jurisdictionC, jurisdictionST, jurisdictionL; e.g. organizationName) or a SAN type (DNS, IP, URI, email, RID, dirName, otherName). Repeat it for more, up to 10; all have to match --status S,… valid, expired or revoked --expires-within DAYS expires within this many days (1-3650) and hasn’t expired yet; revoked ones too, so add --status valid for the certificates to renew --template NAME|ID issued with this template (its name or ID from pkiaas template list, enabled or not) --key-type TYPE,… the key’s keyType as the list shows it, e.g. rsaEncryption, id-ecPublicKey, ML-DSA-65 --reason R,… revoked with one of these reasons, e.g. keyCompromise, superseded, certificateHold
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--expires-within | int | only certificates that expire within this many days and haven’t expired. Default: 0. |
--key-type | string, repeatable | only certificates with one of these key types, e.g. rsaEncryption, id-ecPublicKey |
--limit | int | how many certificates to list (1-1000). Default: 50. |
--match | string, repeatable | only certificates whose subject attribute or SAN FIELD has this VALUE, * for any text (repeatable) |
--order | string | asc or desc (default: asc with --sort) |
--reason | string, repeatable | only certificates revoked with one of these reasons, e.g. keyCompromise |
--search | string | only certificates with this text in the common name, a subject or SAN value, or (hex) the serial or thumbprint |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--sort | string | what to sort by: name, revocationReason, template, validFrom, validTo, keyType, keySize (default: validFrom, desc) |
--status | string, repeatable | only certificates with one of these statuses: valid, expired, revoked |
--template | string | only certificates issued with this template, by name or ID |
Examples:
pkiaas cert listpkiaas cert list --search example.com --jsonpkiaas cert list --match dns:*.example.com --match o:Contoso --jsonpkiaas cert list --status valid --expires-within 30 --sort validTo --jsonpkiaas cert list --search 25:ab:76:5c:72:38:b3:d2 --jsonpkiaas cert list --status revoked --reason keyCompromise,cACompromise --jsonpkiaas cert list --template "Web Server" --key-type rsaEncryption --limit 200 --jsonpkiaas cert list --sort name --order desc --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
issuer | object | the CA that issued the certificates |
issuer.id | string | the ID of the CA that issued the certificate, which --ca takes |
issuer.name | string or null | the CA’s name (its certificate’s common name) |
total | integer | how many certificates match; more than are listed when it exceeds --limit |
certificates | object[] | the first --limit matching certificates, in the --sort and --order order |
certificates[].serial | string | the serial number in hex, which commands take to name the certificate in its CA |
certificates[].name | string or null | the certificate’s common name |
certificates[].status | string | valid, expired, or revoked (also when it has expired since) |
certificates[].template | string or null | the template it was issued with; null for a CA certificate the CA signed, or a deleted template |
certificates[].validFrom | string | when it became valid (ISO 8601, UTC) |
certificates[].validTo | string | when it expires (ISO 8601, UTC) |
certificates[].keyType | string | the algorithm of its key, as OpenSSL names it, e.g. rsaEncryption, id-ecPublicKey |
certificates[].keySize | integer or null | the key size in bits (the curve size for EC keys); null where it doesn’t apply, e.g. ML-DSA |
certificates[].revocation | object or null | null unless the certificate is revoked |
certificates[].revocation.reason | string or null | the reason, as RFC 5280 names it, e.g. keyCompromise, superseded or certificateHold |
certificates[].revocation.revokedAt | string or null | when it was revoked (ISO 8601, UTC); null for the few revocations stored without a date |
pkiaas cert revoke
Revoke a certificate.
pkiaas cert revoke SERIAL --reason REASON [--ca NAME|ID] [--yes] [flags]Revoke a certificate that a CA issued, by default the active CA’s, by its serial number from pkiaas cert list. The CA’s next CRL and OCSP responses list it as revoked.
--reason is one of RFC 5280’s reasons: unspecified, keyCompromise, cACompromise, affiliationChanged, superseded, cessationOfOperation or certificateHold. certificateHold suspends the certificate: pkiaas cert unrevoke undoes it, and revoking it again with another reason makes it final, from the time it was put on hold. Every other reason is final: it can’t be undone or changed (error revocation_final).
It asks for confirmation on a terminal; without one, give --yes. Revoking a certificate that is revoked with the same reason changes nothing and succeeds, so the command is safe to run again. Revoking needs a subscription, the user’s or the CA owner’s (error subscription_required).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--reason | string | why: unspecified, keyCompromise, cACompromise, affiliationChanged, superseded, cessationOfOperation or certificateHold |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--yes | bool | revoke without asking for confirmation |
Examples:
pkiaas cert revoke 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --reason keyCompromisepkiaas cert revoke 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --reason superseded --yes --jsonpkiaas cert revoke 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --reason certificateHold --ca a1B2c3D4e5 --yes --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
issuer | object | the CA that issued the certificate |
issuer.id | string | the ID of the CA that issued the certificate, which --ca takes |
issuer.name | string or null | the CA’s name (its certificate’s common name) |
serial | string | the certificate’s serial number |
name | string or null | the certificate’s common name |
reason | string | the reason it is revoked with, as RFC 5280 names it |
revokedAt | string or null | when it was revoked (ISO 8601, UTC); for a certificate taken off hold for good, when it was put on hold |
Side effects:
- revokes the certificate on the server, and clears the CA’s cached CRL and the certificate’s OCSP responses; only certificateHold can be undone (cert unrevoke)
pkiaas cert show
Show a certificate’s details.
pkiaas cert show SERIAL [--ca NAME|ID] [--text] [flags]Show a certificate that a CA issued, by default the active CA, by its serial number from pkiaas cert list: its status (valid, expired or revoked, with the reason and date), template, validity, key, signature algorithm and thumbprint, and whether its CSR is stored. The serial is hex, with or without colons, in any case.
With --text, it adds every field and extension of the certificate as ‘openssl x509 -text’ describes them (its subject alternative names, key usages, policies and so on).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--text | bool | add the certificate as ‘openssl x509 -text’ describes it |
Examples:
pkiaas cert show 25ab765c7238b3d28d2bab03271f5fa8f2fccf86pkiaas cert show 25:AB:76:5C:72:38:B3:D2:8D:2B:AB:03:27:1F:5F:A8:F2:FC:CF:86 --jsonpkiaas cert show 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --text --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
issuer | object | the CA that issued the certificate |
issuer.id | string | the ID of the CA that issued the certificate, which --ca takes |
issuer.name | string or null | the CA’s name (its certificate’s common name) |
serial | string | the serial number in hex |
name | string or null | the certificate’s common name |
status | string | valid, expired, or revoked (also when it has expired since) |
template | string or null | the template it was issued with; null for a CA certificate the CA signed, or a deleted template |
validFrom | string | when it became valid (ISO 8601, UTC) |
validTo | string | when it expires (ISO 8601, UTC) |
keyType | string | the algorithm of its key, as OpenSSL names it |
keySize | integer or null | the key size in bits (the curve size for EC keys); null where it doesn’t apply |
signatureAlgorithm | string | the algorithm of its signature, as OpenSSL names it |
thumbprint | string | its SHA-1 fingerprint (hex), as Windows shows it |
revocation | object or null | null unless the certificate is revoked |
revocation.reason | string or null | the reason, as RFC 5280 names it, e.g. keyCompromise, superseded or certificateHold |
revocation.revokedAt | string or null | when it was revoked (ISO 8601, UTC); null for the few revocations stored without a date |
hasCsr | boolean | whether the CSR it was issued from is stored, for pkiaas cert export --csr |
text | string or null | with --text, the certificate as ‘openssl x509 -text’ describes it; otherwise null |
pkiaas cert unrevoke
Take a certificate off hold (certificateHold).
pkiaas cert unrevoke SERIAL [--ca NAME|ID] [flags]Take a certificate that is on hold (revoked with reason certificateHold) off hold, so that the CA’s next CRL and OCSP responses show it as valid again. Other reasons are final (error revocation_final).
A certificate that isn’t revoked stays as it is, and the command succeeds, so it is safe to run again. Unrevoking needs a subscription, the user’s or the CA owner’s (error subscription_required).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas cert unrevoke 25ab765c7238b3d28d2bab03271f5fa8f2fccf86pkiaas cert unrevoke 25ab765c7238b3d28d2bab03271f5fa8f2fccf86 --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
issuer | object | the CA that issued the certificate |
issuer.id | string | the ID of the CA that issued the certificate, which --ca takes |
issuer.name | string or null | the CA’s name (its certificate’s common name) |
serial | string | the certificate’s serial number |
name | string or null | the certificate’s common name |
Side effects:
- deletes the certificate’s revocation (certificateHold) on the server, and clears the CA’s cached CRL and the certificate’s OCSP responses
pkiaas csr
Create certificate signing requests on this computer.
pkiaas csr [flags]Commands:
pkiaas csr create
Create a certificate signing request (CSR).
pkiaas csr create --key FILE (--cn NAME | --subject DN) [--out FILE] [--format pem|der] [flags]Create a PKCS#10 certificate signing request signed with your private key.
The subject is either just a common name (--cn) or a full distinguished name (--subject), in RFC 4514 form (“CN=host.example.com,O=Example,C=US”) or OpenSSL’s form (“/C=US/O=Example/CN=host.example.com”). In Git Bash, use the RFC 4514 form: Git Bash rewrites arguments that start with ”/“.
Subject alternative names (--san, repeatable) are dns:NAME, ip:ADDRESS, email:ADDRESS or uri:URI; without a prefix the kind is guessed. If no --san is given and the common name is a DNS name, it is added as one, because browsers and most clients only check SANs. With --san, list the common name too.
--key is a PEM or DER file, or - for standard input. An encrypted key’s passphrase then has to come from --key-passphrase-env or --key-passphrase-file, since it can’t be prompted for.
Without --out (or with --out -), the CSR goes to standard output, as OpenSSL writes it, to read or to pipe to another command; there is no result then, so --json needs --out. --format is pem (default) or der, as OpenSSL’s -outform.
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
Flags:
| Flag | Type | Description |
|---|---|---|
--cn | string | the subject’s common name. Not with --subject. |
--force | bool | replace the --out file if it exists |
--format | string | pem or der (as OpenSSL’s -outform). Default: pem. |
-k, --key | string | the private key file, PEM or DER (- for standard input). Required. |
--key-passphrase-env | string | read the key passphrase from this environment variable. Not with --key-passphrase-file. |
--key-passphrase-file | string | read the key passphrase from this file’s first line (- for standard input). Not with --key-passphrase-env. |
-o, --out | string | the file to write (default: standard output, as with -) |
--san | string, repeatable | a subject alternative name (repeatable) |
--subject | string | the subject’s distinguished name. Not with --cn. |
Examples:
pkiaas csr create --key server.key --cn www.example.com --san www.example.com --san example.com --out server.csrpkiaas csr create --key server.key --key-passphrase-env KEY_PASSPHRASE --subject "CN=www.example.com,O=Example,C=US" --san ip:192.0.2.10 --out server.csr --jsonpkiaas csr create --key server.key --cn www.example.com | openssl req -noout -textWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
path | string | the CSR file (--out) |
keyType | string | the key’s type, as in pkiaas key types |
subject | string | the subject’s distinguished name, RFC 4514 form |
sans | string[] | the subject alternative names, each as kind:value (dns:, ip:, email:, uri:) |
publicKeySha256 | string | the SHA-256 of the public key (DER SubjectPublicKeyInfo), in hex |
Side effects:
- with
--out, writes the file; otherwise writes the CSR to standard output and no result
pkiaas help
Show help for a command, or the guide for AI agents.
pkiaas help [command... | agents] [flags]Show help for a command. pkiaas help agents shows the guide for AI agents: how to run pkiaas without prompts, keep secrets out of transcripts, log in, and handle each error code.
With --json, the command and those under it are described as JSON: every flag, example, result field, side effect, exit code and error code. pkiaas <command> --help --json does the same.
Examples:
pkiaas help agentspkiaas help --jsonpkiaas help --json key createpkiaas hsm
List the CAs whose keys are on IoT HSMs, show what the platform last heard from one, ping it, forget a replaced appliance.
pkiaas hsm [flags]Commands:
pkiaas hsm forget
Forget an IoT-HSM appliance that was replaced, so CAs no longer list it.
pkiaas hsm forget --appliance ID [flags]Forget an appliance (an iot-hsm agent, 1.0.0 or later) for every CA of the account that may be modified, so they no longer list it in agents (pkiaas hsm show). Use it for an appliance that was replaced or switched off for good. It signs nothing, sends nothing to the appliance and changes nothing on it: if it answers for a CA again (a signature or a ping), the CA lists it again.
You rarely need it: once another appliance answers for a CA and this one has been silent for 7 days, it is hidden (agents[].hidden), and deleted once silent for 90 days. A CA’s only appliance is never hidden. A standby that is never chosen to sign is heard only when the CA is pinged, so run pkiaas hsm ping before forgetting one.
--appliance takes agents[].id: 16 lowercase hexadecimal characters. forgotten counts the CAs it was forgotten for, kept those that still list it because the account lacks the modify privilege in them. Safe to run again.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--appliance | string | the appliance’s ID (agents[].id) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas hsm forget --appliance 3f9a1c0be27d4a85pkiaas hsm forget --appliance 3f9a1c0be27d4a85 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
appliance | string | the appliance’s agent ID |
forgotten | integer | how many of the account’s CAs no longer list it in agents; 0 when there was nothing to forget |
kept | integer | how many of the account’s CAs still list it, because the account may not modify them |
Side effects:
- removes the appliance from the agents of each of the account’s IoT HSM CAs it may modify, until it answers for one again
- each of those CAs’ logs records it
- sends nothing to the appliance and signs nothing
pkiaas hsm list
List the CAs whose keys are on IoT HSMs, with what the platform last heard from each.
pkiaas hsm list [--limit N] [flags]List the account’s CAs whose keys are on an IoT HSM (the user’s own appliance, which signs through the iot-hsm agent), by name. Each row shows what the platform last heard from the CA’s agent: its version (and whether a newer release exists), the token that holds the key and its PIN state, when it last answered, the outcome of the last ping, and whether it is dormant or busy. CAs on the same agent share agent.id. APPLIANCES counts the appliances (iot-hsm 1.0.0 or later) known to have the CA key, for high availability; agents lists them.
There is no live status: an idle agent and one that is off look the same until the CA is pinged (pkiaas hsm ping) or asked to sign. Listing sends nothing to the agents.
It lists the first --limit CAs (default 50, at most 1000); total says how many there are.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--limit | int | how many CAs to list (1-1000). Default: 50. |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas hsm listpkiaas hsm list --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
total | integer | how many of the account’s CAs have their keys on IoT HSMs; more than are listed when it exceeds --limit |
hsms | object[] | the first --limit of them, by CA name |
hsms[].ca | object | the CA whose key is on the IoT HSM; --ca takes its id or name |
hsms[].ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
hsms[].ca.name | string or null | the CA’s name (its certificate’s common name) |
hsms[].agent | object or null | what the agent that last answered first or signed for the CA said about itself, plus what the platform knows of its releases; null until an agent answers a request for the CA (a signature or a ping) after the platform began recording it |
hsms[].agent.id | string or null | identifies the agent: CAs with the same ID are on the same agent; null if it gave none |
hsms[].agent.version | string or null | the agent’s version (iot-hsm), or null for an agent from before 1.0.0, which doesn’t say |
hsms[].agent.olderAgent | boolean | the agent is from before 1.0.0: it answers and signs, but says nothing about itself |
hsms[].agent.commit | string or null | the git commit the agent runs, when it has one |
hsms[].agent.versions | object | what the agent runs on, name to version: node, nodeOpenssl (built into Node), openssl (the command it runs), pubnub, nodePkiSigner, nodeOpensslCert2; only those it reported |
hsms[].agent.clockOffsetSeconds | integer or null | how far the agent’s clock was ahead of the platform’s (negative: behind) when it last answered, including the time its answer took to arrive |
hsms[].agent.latestVersion | string or null | the agent’s latest release, as the platform last read it; null if it hasn’t read one |
hsms[].agent.releaseUrl | string or null | the latest release’s notes |
hsms[].agent.updateAvailable | boolean or null | a newer release than the agent exists (always for an agent from before 1.0.0); null when the platform doesn’t know the latest release |
hsms[].agents | object[] | every appliance (iot-hsm 1.0.0 or later) known to have the CA key, most recent answer first, hidden ones included; a ping hears all of them. Agents before 1.0.0 are never listed here, only in agent |
hsms[].agents[].id | string | the appliance’s agent ID (as agent.id); pkiaas hsm forget --appliance takes it |
hsms[].agents[].version | string or null | the agent’s version (iot-hsm) |
hsms[].agents[].commit | string or null | the git commit the agent runs, when it has one |
hsms[].agents[].versions | object | what the agent runs on, name to version, as agent.versions |
hsms[].agents[].clockOffsetSeconds | integer or null | how far the agent’s clock was ahead of the platform’s (negative: behind) when it last answered |
hsms[].agents[].latestVersion | string or null | the agent’s latest release, as the platform last read it; null if it hasn’t read one |
hsms[].agents[].releaseUrl | string or null | the latest release’s notes |
hsms[].agents[].updateAvailable | boolean or null | a newer release than the agent exists; null when the platform doesn’t know the latest release |
hsms[].agents[].token | object or null | the token on this appliance that holds the CA key; null if it didn’t say |
hsms[].agents[].token.type | string or null | the token that holds the CA key: yubikey, google, softhsm or unknown |
hsms[].agents[].token.pinState | string or null | the token’s PIN: ok; countLow, finalTry or locked as the token’s flags say (they don’t say how many tries are left); rejected: the token refused the PIN the agent has, so it signs nothing until its PIN is corrected and its slots reloaded. Null if the token or agent does not say |
hsms[].agents[].token.pinStateRead | string or null | when the agent last read the PIN state from the token (ISO 8601, UTC) |
hsms[].agents[].capabilities | object or null | what this appliance can sign with the CA key; null if it didn’t say |
hsms[].agents[].capabilities.nativeSigning | boolean or null | the agent signs with node-pki-signer rather than OpenSSL; null if it doesn’t say |
hsms[].agents[].capabilities.signTypes | string[] | what it can sign, e.g. csr, cms, crl |
hsms[].agents[].capabilities.keyType | string or null | the CA key’s algorithm, e.g. rsa |
hsms[].agents[].capabilities.keyBits | integer or null | the CA key’s size in bits, e.g. 2048 |
hsms[].agents[].capabilities.curve | string or null | the CA key’s curve, for an EC key, e.g. prime256v1 |
hsms[].agents[].capabilities.certificateHash | string or null | the hash the agent signs certificates with for this key, e.g. sha256 |
hsms[].agents[].capabilities.subjectEscaping | boolean | the agent signs subjects with ”/”, ”+” or "" in them; older agents refuse such requests |
hsms[].agents[].busy | boolean | its last answer for the CA said it was too busy to sign, or that its PIN was rejected |
hsms[].agents[].channelCertificateExpires | string or null | when the certificate this appliance signs its messages for the CA with expires (ISO 8601, UTC) |
hsms[].agents[].firstSeenAt | string | when it first answered for the CA (ISO 8601, UTC) |
hsms[].agents[].lastAnswerAt | string | when it last answered for the CA: an offer, busy, a signature or a ping (ISO 8601, UTC) |
hsms[].agents[].lastOfferAt | string or null | when it last offered to sign or said it was busy (ISO 8601, UTC) |
hsms[].agents[].lastSignatureAt | string or null | when it last signed for the CA (ISO 8601, UTC) |
hsms[].agents[].hidden | boolean | another appliance answered for the CA since, and this one has been silent for 7 days: the IoT-HSM page doesn’t show the CA under it, and the platform deletes it once silent for 90 days; a standby that is never chosen to sign is heard only when the CA is pinged, so ping before taking it for replaced; a CA’s only appliance is never hidden; answering again unhides it |
hsms[].token | object or null | the token that holds the CA key, as the agent described it; null if it didn’t |
hsms[].token.type | string or null | the token that holds the CA key: yubikey, google, softhsm or unknown |
hsms[].token.pinState | string or null | the token’s PIN: ok; countLow, finalTry or locked as the token’s flags say (they don’t say how many tries are left); rejected: the token refused the PIN the agent has, so it signs nothing until its PIN is corrected and its slots reloaded. Null if the token or agent does not say |
hsms[].token.pinStateRead | string or null | when the agent last read the PIN state from the token (ISO 8601, UTC) |
hsms[].capabilities | object or null | what the agent can sign with the CA key; null until the agent answers |
hsms[].capabilities.nativeSigning | boolean or null | the agent signs with node-pki-signer rather than OpenSSL; null if it doesn’t say |
hsms[].capabilities.signTypes | string[] | what it can sign, e.g. csr, cms, crl |
hsms[].capabilities.keyType | string or null | the CA key’s algorithm, e.g. rsa |
hsms[].capabilities.keyBits | integer or null | the CA key’s size in bits, e.g. 2048 |
hsms[].capabilities.curve | string or null | the CA key’s curve, for an EC key, e.g. prime256v1 |
hsms[].capabilities.certificateHash | string or null | the hash the agent signs certificates with for this key, e.g. sha256 |
hsms[].capabilities.subjectEscaping | boolean | the agent signs subjects with ”/”, ”+” or "" in them; older agents refuse such requests |
hsms[].busy | boolean | its last answer said it was too busy to sign, or that its PIN was rejected |
hsms[].channelCertificateExpires | string or null | when the certificate the agent signs its messages with expires (ISO 8601, UTC); the agent renews it with the CA key, so a ping after that costs one HSM signature |
hsms[].lastAnswerAt | string or null | when the agent last answered anything: an offer, busy, a signature or a ping (ISO 8601, UTC) |
hsms[].lastOfferAt | string or null | when the agent last offered to sign or said it was busy, which updates agent, token and capabilities (ISO 8601, UTC) |
hsms[].lastSignatureAt | string or null | when it last signed (ISO 8601, UTC) |
hsms[].lastAgentStartAt | string or null | when its agent last started, fetching its connection data (ISO 8601, UTC) |
hsms[].dormant | boolean | the agent hasn’t answered for days and missed a request, so requests fail at once except one every few minutes; an answer (a ping too) or an agent start ends it |
hsms[].dormantSince | string or null | when it became dormant (ISO 8601, UTC) |
hsms[].lastPing | object or null | the CA’s last ping (pkiaas hsm ping); null if it was never pinged |
hsms[].lastPing.at | string | when the ping was sent (ISO 8601, UTC) |
hsms[].lastPing.outcome | string | answered: the agent offered to sign; busy: it is too busy to sign in time; pinRejected: the token refused the agent’s PIN; noAnswer: the ping reached the agent’s channel and nothing answered in 10 seconds; unreachable: the platform’s own connection to PubNub didn’t work, so it says nothing about the agent; failed: anything else (message says what) |
hsms[].lastPing.seconds | number | how long the (first) answer took, in seconds |
hsms[].lastPing.message | string or null | why it did not answer, for noAnswer, unreachable and failed; null otherwise |
pkiaas hsm ping
Check that a CA’s IoT HSM answers, without signing anything.
pkiaas hsm ping [--ca NAME|ID] [flags]Ping the IoT HSM of a CA, by default the active CA: the platform asks the CA’s agent to offer to sign, as every signature starts, and stops at its signed answer, so nothing is signed. After the first answer it listens 2 seconds more, so it hears every appliance that has the CA key, and takes up to 12 seconds. The answers update what pkiaas hsm show shows (agent and agents), and end dormancy.
ping.outcome says how the agent answered: answered, busy (too busy to sign in time), pinRejected (the token refused the agent’s PIN), noAnswer (nothing answered in 10 seconds: the appliance or its agent may be off), unreachable (the platform couldn’t reach PubNub, so this says nothing about the IoT HSM) or failed (message says why). The command succeeds (exit 0) whenever the ping ran, whatever the outcome: read ping.outcome.
A ping costs about 3 PubNub messages per appliance, and one HSM signature if the agent’s channel certificate has expired (channelCertificateExpires in pkiaas hsm show). Within a minute of the last ping, the CA gets that ping back (cached is true; ping.at says when it was sent) and nothing is sent. Each CA can be pinged 60 times a day; beyond that, or while a ping of the CA is running, the server refuses with http_429 and says when to try again. Pinging needs the sign privilege in the CA (forbidden without it). Safe to run again.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas hsm pingpkiaas hsm ping --ca "Example Root CA"pkiaas hsm ping --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA whose IoT HSM was pinged |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
ping | object | the ping: how the agent answered |
ping.at | string | when the ping was sent (ISO 8601, UTC) |
ping.outcome | string | answered: the agent offered to sign; busy: it is too busy to sign in time; pinRejected: the token refused the agent’s PIN; noAnswer: the ping reached the agent’s channel and nothing answered in 10 seconds; unreachable: the platform’s own connection to PubNub didn’t work, so it says nothing about the agent; failed: anything else (message says what) |
ping.seconds | number | how long the (first) answer took, in seconds |
ping.message | string or null | why it did not answer, for noAnswer, unreachable and failed; null otherwise |
cached | boolean | the CA was pinged moments ago, so this is that ping, not a new one; ping.at says when it was sent |
hsm | object | what the platform knows of the CA’s IoT HSM now, as pkiaas hsm show shows it |
hsm.ca | object | the CA whose key is on the IoT HSM; --ca takes its id or name |
hsm.ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
hsm.ca.name | string or null | the CA’s name (its certificate’s common name) |
hsm.agent | object or null | what the agent that last answered first or signed for the CA said about itself, plus what the platform knows of its releases; null until an agent answers a request for the CA (a signature or a ping) after the platform began recording it |
hsm.agent.id | string or null | identifies the agent: CAs with the same ID are on the same agent; null if it gave none |
hsm.agent.version | string or null | the agent’s version (iot-hsm), or null for an agent from before 1.0.0, which doesn’t say |
hsm.agent.olderAgent | boolean | the agent is from before 1.0.0: it answers and signs, but says nothing about itself |
hsm.agent.commit | string or null | the git commit the agent runs, when it has one |
hsm.agent.versions | object | what the agent runs on, name to version: node, nodeOpenssl (built into Node), openssl (the command it runs), pubnub, nodePkiSigner, nodeOpensslCert2; only those it reported |
hsm.agent.clockOffsetSeconds | integer or null | how far the agent’s clock was ahead of the platform’s (negative: behind) when it last answered, including the time its answer took to arrive |
hsm.agent.latestVersion | string or null | the agent’s latest release, as the platform last read it; null if it hasn’t read one |
hsm.agent.releaseUrl | string or null | the latest release’s notes |
hsm.agent.updateAvailable | boolean or null | a newer release than the agent exists (always for an agent from before 1.0.0); null when the platform doesn’t know the latest release |
hsm.agents | object[] | every appliance (iot-hsm 1.0.0 or later) known to have the CA key, most recent answer first, hidden ones included; a ping hears all of them. Agents before 1.0.0 are never listed here, only in agent |
hsm.agents[].id | string | the appliance’s agent ID (as agent.id); pkiaas hsm forget --appliance takes it |
hsm.agents[].version | string or null | the agent’s version (iot-hsm) |
hsm.agents[].commit | string or null | the git commit the agent runs, when it has one |
hsm.agents[].versions | object | what the agent runs on, name to version, as agent.versions |
hsm.agents[].clockOffsetSeconds | integer or null | how far the agent’s clock was ahead of the platform’s (negative: behind) when it last answered |
hsm.agents[].latestVersion | string or null | the agent’s latest release, as the platform last read it; null if it hasn’t read one |
hsm.agents[].releaseUrl | string or null | the latest release’s notes |
hsm.agents[].updateAvailable | boolean or null | a newer release than the agent exists; null when the platform doesn’t know the latest release |
hsm.agents[].token | object or null | the token on this appliance that holds the CA key; null if it didn’t say |
hsm.agents[].token.type | string or null | the token that holds the CA key: yubikey, google, softhsm or unknown |
hsm.agents[].token.pinState | string or null | the token’s PIN: ok; countLow, finalTry or locked as the token’s flags say (they don’t say how many tries are left); rejected: the token refused the PIN the agent has, so it signs nothing until its PIN is corrected and its slots reloaded. Null if the token or agent does not say |
hsm.agents[].token.pinStateRead | string or null | when the agent last read the PIN state from the token (ISO 8601, UTC) |
hsm.agents[].capabilities | object or null | what this appliance can sign with the CA key; null if it didn’t say |
hsm.agents[].capabilities.nativeSigning | boolean or null | the agent signs with node-pki-signer rather than OpenSSL; null if it doesn’t say |
hsm.agents[].capabilities.signTypes | string[] | what it can sign, e.g. csr, cms, crl |
hsm.agents[].capabilities.keyType | string or null | the CA key’s algorithm, e.g. rsa |
hsm.agents[].capabilities.keyBits | integer or null | the CA key’s size in bits, e.g. 2048 |
hsm.agents[].capabilities.curve | string or null | the CA key’s curve, for an EC key, e.g. prime256v1 |
hsm.agents[].capabilities.certificateHash | string or null | the hash the agent signs certificates with for this key, e.g. sha256 |
hsm.agents[].capabilities.subjectEscaping | boolean | the agent signs subjects with ”/”, ”+” or "" in them; older agents refuse such requests |
hsm.agents[].busy | boolean | its last answer for the CA said it was too busy to sign, or that its PIN was rejected |
hsm.agents[].channelCertificateExpires | string or null | when the certificate this appliance signs its messages for the CA with expires (ISO 8601, UTC) |
hsm.agents[].firstSeenAt | string | when it first answered for the CA (ISO 8601, UTC) |
hsm.agents[].lastAnswerAt | string | when it last answered for the CA: an offer, busy, a signature or a ping (ISO 8601, UTC) |
hsm.agents[].lastOfferAt | string or null | when it last offered to sign or said it was busy (ISO 8601, UTC) |
hsm.agents[].lastSignatureAt | string or null | when it last signed for the CA (ISO 8601, UTC) |
hsm.agents[].hidden | boolean | another appliance answered for the CA since, and this one has been silent for 7 days: the IoT-HSM page doesn’t show the CA under it, and the platform deletes it once silent for 90 days; a standby that is never chosen to sign is heard only when the CA is pinged, so ping before taking it for replaced; a CA’s only appliance is never hidden; answering again unhides it |
hsm.token | object or null | the token that holds the CA key, as the agent described it; null if it didn’t |
hsm.token.type | string or null | the token that holds the CA key: yubikey, google, softhsm or unknown |
hsm.token.pinState | string or null | the token’s PIN: ok; countLow, finalTry or locked as the token’s flags say (they don’t say how many tries are left); rejected: the token refused the PIN the agent has, so it signs nothing until its PIN is corrected and its slots reloaded. Null if the token or agent does not say |
hsm.token.pinStateRead | string or null | when the agent last read the PIN state from the token (ISO 8601, UTC) |
hsm.capabilities | object or null | what the agent can sign with the CA key; null until the agent answers |
hsm.capabilities.nativeSigning | boolean or null | the agent signs with node-pki-signer rather than OpenSSL; null if it doesn’t say |
hsm.capabilities.signTypes | string[] | what it can sign, e.g. csr, cms, crl |
hsm.capabilities.keyType | string or null | the CA key’s algorithm, e.g. rsa |
hsm.capabilities.keyBits | integer or null | the CA key’s size in bits, e.g. 2048 |
hsm.capabilities.curve | string or null | the CA key’s curve, for an EC key, e.g. prime256v1 |
hsm.capabilities.certificateHash | string or null | the hash the agent signs certificates with for this key, e.g. sha256 |
hsm.capabilities.subjectEscaping | boolean | the agent signs subjects with ”/”, ”+” or "" in them; older agents refuse such requests |
hsm.busy | boolean | its last answer said it was too busy to sign, or that its PIN was rejected |
hsm.channelCertificateExpires | string or null | when the certificate the agent signs its messages with expires (ISO 8601, UTC); the agent renews it with the CA key, so a ping after that costs one HSM signature |
hsm.lastAnswerAt | string or null | when the agent last answered anything: an offer, busy, a signature or a ping (ISO 8601, UTC) |
hsm.lastOfferAt | string or null | when the agent last offered to sign or said it was busy, which updates agent, token and capabilities (ISO 8601, UTC) |
hsm.lastSignatureAt | string or null | when it last signed (ISO 8601, UTC) |
hsm.lastAgentStartAt | string or null | when its agent last started, fetching its connection data (ISO 8601, UTC) |
hsm.dormant | boolean | the agent hasn’t answered for days and missed a request, so requests fail at once except one every few minutes; an answer (a ping too) or an agent start ends it |
hsm.dormantSince | string or null | when it became dormant (ISO 8601, UTC) |
hsm.lastPing | object or null | the CA’s last ping (pkiaas hsm ping); null if it was never pinged |
hsm.lastPing.at | string | when the ping was sent (ISO 8601, UTC) |
hsm.lastPing.outcome | string | answered: the agent offered to sign; busy: it is too busy to sign in time; pinRejected: the token refused the agent’s PIN; noAnswer: the ping reached the agent’s channel and nothing answered in 10 seconds; unreachable: the platform’s own connection to PubNub didn’t work, so it says nothing about the agent; failed: anything else (message says what) |
hsm.lastPing.seconds | number | how long the (first) answer took, in seconds |
hsm.lastPing.message | string or null | why it did not answer, for noAnswer, unreachable and failed; null otherwise |
Side effects:
- sends a ping to the CA’s IoT HSM agents through PubNub (about 3 PubNub messages per appliance; one HSM signature if an agent’s channel certificate has expired); within a minute of the last ping, nothing (cached)
- the agents’ answers update what the platform knows of them (
pkiaas hsm show, agent and agents) and end its dormancy - the CA’s log records the ping and its outcome
- a ping that is sent (not a cached one) counts toward the CA’s 60 pings a day
pkiaas hsm show
Show what the platform last heard from a CA’s IoT HSM.
pkiaas hsm show [--ca NAME|ID] [flags]Show what the platform last heard from the IoT HSM of a CA, by default the active CA: the agent’s version and what it runs on, whether a newer release exists, the token that holds the key and its PIN state, what the agent can sign, whether it is busy or dormant, when it last answered, signed and started, when its channel certificate expires, and the last ping. Below them, every appliance (iot-hsm 1.0.0 or later) known to have the CA key, for high availability; pkiaas hsm forget forgets one that was replaced.
There is no live status: these are the details of the agent’s last answer, and an idle agent and one that is off look the same. pkiaas hsm ping asks the agent to answer now. Showing sends nothing to the agent.
A CA whose key is on the platform has no IoT HSM (error ca_not_hsm); pkiaas hsm list lists those that have one.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas hsm showpkiaas hsm show --ca "Example Root CA"pkiaas hsm show --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA whose key is on the IoT HSM; --ca takes its id or name |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
agent | object or null | what the agent that last answered first or signed for the CA said about itself, plus what the platform knows of its releases; null until an agent answers a request for the CA (a signature or a ping) after the platform began recording it |
agent.id | string or null | identifies the agent: CAs with the same ID are on the same agent; null if it gave none |
agent.version | string or null | the agent’s version (iot-hsm), or null for an agent from before 1.0.0, which doesn’t say |
agent.olderAgent | boolean | the agent is from before 1.0.0: it answers and signs, but says nothing about itself |
agent.commit | string or null | the git commit the agent runs, when it has one |
agent.versions | object | what the agent runs on, name to version: node, nodeOpenssl (built into Node), openssl (the command it runs), pubnub, nodePkiSigner, nodeOpensslCert2; only those it reported |
agent.clockOffsetSeconds | integer or null | how far the agent’s clock was ahead of the platform’s (negative: behind) when it last answered, including the time its answer took to arrive |
agent.latestVersion | string or null | the agent’s latest release, as the platform last read it; null if it hasn’t read one |
agent.releaseUrl | string or null | the latest release’s notes |
agent.updateAvailable | boolean or null | a newer release than the agent exists (always for an agent from before 1.0.0); null when the platform doesn’t know the latest release |
agents | object[] | every appliance (iot-hsm 1.0.0 or later) known to have the CA key, most recent answer first, hidden ones included; a ping hears all of them. Agents before 1.0.0 are never listed here, only in agent |
agents[].id | string | the appliance’s agent ID (as agent.id); pkiaas hsm forget --appliance takes it |
agents[].version | string or null | the agent’s version (iot-hsm) |
agents[].commit | string or null | the git commit the agent runs, when it has one |
agents[].versions | object | what the agent runs on, name to version, as agent.versions |
agents[].clockOffsetSeconds | integer or null | how far the agent’s clock was ahead of the platform’s (negative: behind) when it last answered |
agents[].latestVersion | string or null | the agent’s latest release, as the platform last read it; null if it hasn’t read one |
agents[].releaseUrl | string or null | the latest release’s notes |
agents[].updateAvailable | boolean or null | a newer release than the agent exists; null when the platform doesn’t know the latest release |
agents[].token | object or null | the token on this appliance that holds the CA key; null if it didn’t say |
agents[].token.type | string or null | the token that holds the CA key: yubikey, google, softhsm or unknown |
agents[].token.pinState | string or null | the token’s PIN: ok; countLow, finalTry or locked as the token’s flags say (they don’t say how many tries are left); rejected: the token refused the PIN the agent has, so it signs nothing until its PIN is corrected and its slots reloaded. Null if the token or agent does not say |
agents[].token.pinStateRead | string or null | when the agent last read the PIN state from the token (ISO 8601, UTC) |
agents[].capabilities | object or null | what this appliance can sign with the CA key; null if it didn’t say |
agents[].capabilities.nativeSigning | boolean or null | the agent signs with node-pki-signer rather than OpenSSL; null if it doesn’t say |
agents[].capabilities.signTypes | string[] | what it can sign, e.g. csr, cms, crl |
agents[].capabilities.keyType | string or null | the CA key’s algorithm, e.g. rsa |
agents[].capabilities.keyBits | integer or null | the CA key’s size in bits, e.g. 2048 |
agents[].capabilities.curve | string or null | the CA key’s curve, for an EC key, e.g. prime256v1 |
agents[].capabilities.certificateHash | string or null | the hash the agent signs certificates with for this key, e.g. sha256 |
agents[].capabilities.subjectEscaping | boolean | the agent signs subjects with ”/”, ”+” or "" in them; older agents refuse such requests |
agents[].busy | boolean | its last answer for the CA said it was too busy to sign, or that its PIN was rejected |
agents[].channelCertificateExpires | string or null | when the certificate this appliance signs its messages for the CA with expires (ISO 8601, UTC) |
agents[].firstSeenAt | string | when it first answered for the CA (ISO 8601, UTC) |
agents[].lastAnswerAt | string | when it last answered for the CA: an offer, busy, a signature or a ping (ISO 8601, UTC) |
agents[].lastOfferAt | string or null | when it last offered to sign or said it was busy (ISO 8601, UTC) |
agents[].lastSignatureAt | string or null | when it last signed for the CA (ISO 8601, UTC) |
agents[].hidden | boolean | another appliance answered for the CA since, and this one has been silent for 7 days: the IoT-HSM page doesn’t show the CA under it, and the platform deletes it once silent for 90 days; a standby that is never chosen to sign is heard only when the CA is pinged, so ping before taking it for replaced; a CA’s only appliance is never hidden; answering again unhides it |
token | object or null | the token that holds the CA key, as the agent described it; null if it didn’t |
token.type | string or null | the token that holds the CA key: yubikey, google, softhsm or unknown |
token.pinState | string or null | the token’s PIN: ok; countLow, finalTry or locked as the token’s flags say (they don’t say how many tries are left); rejected: the token refused the PIN the agent has, so it signs nothing until its PIN is corrected and its slots reloaded. Null if the token or agent does not say |
token.pinStateRead | string or null | when the agent last read the PIN state from the token (ISO 8601, UTC) |
capabilities | object or null | what the agent can sign with the CA key; null until the agent answers |
capabilities.nativeSigning | boolean or null | the agent signs with node-pki-signer rather than OpenSSL; null if it doesn’t say |
capabilities.signTypes | string[] | what it can sign, e.g. csr, cms, crl |
capabilities.keyType | string or null | the CA key’s algorithm, e.g. rsa |
capabilities.keyBits | integer or null | the CA key’s size in bits, e.g. 2048 |
capabilities.curve | string or null | the CA key’s curve, for an EC key, e.g. prime256v1 |
capabilities.certificateHash | string or null | the hash the agent signs certificates with for this key, e.g. sha256 |
capabilities.subjectEscaping | boolean | the agent signs subjects with ”/”, ”+” or "" in them; older agents refuse such requests |
busy | boolean | its last answer said it was too busy to sign, or that its PIN was rejected |
channelCertificateExpires | string or null | when the certificate the agent signs its messages with expires (ISO 8601, UTC); the agent renews it with the CA key, so a ping after that costs one HSM signature |
lastAnswerAt | string or null | when the agent last answered anything: an offer, busy, a signature or a ping (ISO 8601, UTC) |
lastOfferAt | string or null | when the agent last offered to sign or said it was busy, which updates agent, token and capabilities (ISO 8601, UTC) |
lastSignatureAt | string or null | when it last signed (ISO 8601, UTC) |
lastAgentStartAt | string or null | when its agent last started, fetching its connection data (ISO 8601, UTC) |
dormant | boolean | the agent hasn’t answered for days and missed a request, so requests fail at once except one every few minutes; an answer (a ping too) or an agent start ends it |
dormantSince | string or null | when it became dormant (ISO 8601, UTC) |
lastPing | object or null | the CA’s last ping (pkiaas hsm ping); null if it was never pinged |
lastPing.at | string | when the ping was sent (ISO 8601, UTC) |
lastPing.outcome | string | answered: the agent offered to sign; busy: it is too busy to sign in time; pinRejected: the token refused the agent’s PIN; noAnswer: the ping reached the agent’s channel and nothing answered in 10 seconds; unreachable: the platform’s own connection to PubNub didn’t work, so it says nothing about the agent; failed: anything else (message says what) |
lastPing.seconds | number | how long the (first) answer took, in seconds |
lastPing.message | string or null | why it did not answer, for noAnswer, unreachable and failed; null otherwise |
pkiaas key
Create private keys on this computer.
pkiaas key [flags]Commands:
pkiaas key create
Create a private key.
pkiaas key create [--out FILE] [--format pem|der] [flags]Create a private key in PKCS#8 form, and save it in a file that only you can read.
The key is encrypted with a passphrase (AES-256-CBC, PBKDF2-HMAC-SHA256 with 600,000 iterations) unless --no-passphrase is given. Run pkiaas key types to list the key types.
The key is a secret, so without --out it goes to standard output only when that is a terminal, followed by a notice that it wasn’t saved; in a pipe or captured output the command fails with secret_destination. --out - sends it to standard output anyway, as OpenSSL writes it, to pipe to another command. There is no result then, so --json needs --out FILE. Prefer --out FILE: a key on standard output can end up in logs and transcripts. --format is pem (default) or der, as OpenSSL’s -outform.
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
Its output (the key) is a secret: it goes to --out FILE, to --out -, or to a terminal, never into a pipe without --out - or into a --json result (error secret_destination).
Flags:
| Flag | Type | Description |
|---|---|---|
--force | bool | replace the --out file if it exists |
--format | string | pem or der (as OpenSSL’s -outform). Default: pem. |
--no-passphrase | bool | save the key unencrypted |
-o, --out | string | the file to write (default: standard output, as with -) |
--passphrase-env | string | read the key passphrase from this environment variable. Not with --passphrase-file. |
--passphrase-file | string | read the key passphrase from this file’s first line (- for standard input). Not with --passphrase-env. |
--type | string | the key type. Default: rsa-2048. |
Examples:
pkiaas key create --out server.keypkiaas key create --type ml-dsa-65 --out pq.key --passphrase-env KEY_PASSPHRASE --jsonpkiaas key create --type ec-p256 --out ci.key --no-passphrase --jsonpkiaas key create --type ec-p256 --no-passphrase --out - | openssl pkey -noout -textWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
path | string | the key file (--out) |
type | string | the key type, as in pkiaas key types |
encrypted | boolean | whether the key is encrypted with a passphrase |
publicKeySha256 | string | the SHA-256 of the public key (DER SubjectPublicKeyInfo), in hex; the CSR and PKCS#12 commands report the same value |
Side effects:
- with
--outFILE, writes the file, readable by the owner only; with--out- or to a terminal, writes the key to standard output and no result
pkiaas key types
List the key types.
pkiaas key types [flags]List the key types pkiaas key create --type accepts: RSA, EC, Ed25519 and Ed448, and the post-quantum ML-DSA and SLH-DSA types. PKIaaS signs CSRs for all of them, but few clients accept the post-quantum types yet.
Examples:
pkiaas key types --jsonWith --json, the result is an array of objects with these fields:
| Field | Type | Description |
|---|---|---|
name | string | the name to give to --type |
description | string | what the key type is |
default | boolean | whether it is the default type |
pkiaas log
List what the platform logged for your CAs, for troubleshooting.
pkiaas log [flags]Commands:
pkiaas log list
List the latest log lines of your CAs.
pkiaas log list [--ca NAME|ID]... [--level LEVEL] [--since TIME] [--until TIME] [--search TEXT] [--sort time|ca [--order asc|desc]] [--limit N] [flags]List what the platform logged for your CAs, as the website’s Logs page does: SCEP, CEP/CES and ACME requests, certificate approvals, revocations and the errors they met, by default the latest ones. Use it to find out why something failed, e.g. a device’s enrollment or a signing. It changes nothing.
By default it lists the lines of all the CAs your account has, its own and those it was invited to: unlike the commands that work in one CA, it doesn’t use the active CA or PKIAAS_CA. --ca NAME|ID (any case for a name) keeps the lines of that CA; repeat it for more, up to 20. Lines are deleted after a while (by default 30 days).
--level LEVEL keeps the lines of this level and the more severe ones: emergency, alert, critical, error, warning, notice, info or debug (the least severe), e.g. --level warning for warnings and errors.
--since TIME keeps the lines logged at that time or later, --until TIME those logged before it. TIME is an RFC 3339 time (2026-10-24T08:00:00Z, or with an offset such as -05:00), a date (2026-10-24, midnight in this computer’s time zone), or how long ago: a number with m, h or d (90m, 24h, 7d). The result says which times they stood for.
--search TEXT keeps the lines with that text in the message or the client’s IP address, in any case, e.g. a device’s name, a certificate’s serial or an error.
It lists --limit lines (default 50, at most 1000), the latest ones; total says how many match, so when it is more, narrow the list with --ca, --level, --since, --until or --search. It lists them in time order, as logs are read: the oldest first, the newest last, by the prompt. --sort time --order asc lists the earliest lines instead. --sort ca groups the lines by the CA’s name, in --order asc (the default) or desc, each group in time order; it picks the lines of the first names, the latest of each.
Each line shows, as log tools do: the time (RFC 3339, in this computer’s time zone, which TZ changes, e.g. TZ=UTC), the level, the CA’s name in brackets (a ] or \ in it escaped with ), the IP address of the client whose request it logs (- for the platform’s own work) and the message. Control characters in it show as escapes such as \x1b. --json has the CA’s id and name, the level, the time (UTC), the IP address ("" for none) and the message, unescaped.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string, repeatable | only the lines of this CA, by its name (any case) or ID from pkiaas ca list; repeatable, up to 20 (default: all your CAs, not the active CA) |
--level | string | only lines of this level or more severe: emergency, alert, critical, error, warning, notice, info, debug |
--limit | int | how many lines to list (1-1000). Default: 50. |
--order | string | asc or desc (default: desc with --sort time, the latest lines; asc with --sort ca) |
--search | string | only lines with this text in the message or the IP address, in any case (at most 100 characters) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--since | string | only lines logged at this time or later: RFC 3339, a date (midnight in this computer’s time zone), or how long ago (90m, 24h, 7d) |
--sort | string | what picks the lines: time, ca (default: time, desc, the latest lines); they are listed in time order, grouped by CA with ca |
--until | string | only lines logged before this time: RFC 3339, a date (midnight in this computer’s time zone), or how long ago (90m, 24h, 7d) |
Examples:
pkiaas log listpkiaas log list --ca "Example Root CA" --level warningpkiaas log list --since 24h --search "challenge password"pkiaas log list --since 2026-10-24 --until 2026-10-25 --search 203.0.113.7 --jsonpkiaas log list --ca a1B2c3D4e5 --ca f6G7h8I9j0 --level error --jsonpkiaas log list --sort ca --jsonpkiaas log list --json --limit 200With --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
since | string, optional | the time --since stands for (ISO 8601, UTC): only lines logged then or later; only with --since |
until | string, optional | the time --until stands for (ISO 8601, UTC): only lines logged before it; only with --until |
total | integer | how many lines match; more than are listed when it exceeds --limit |
logs | object[] | --limit matching lines, the latest unless --sort time --order asc, in time order: the oldest first, the newest last (with --sort ca grouped by the CA’s name, in time order within it) |
logs[].ca | object | the CA the line belongs to |
logs[].ca.id | string | the ID of the CA the line belongs to, which --ca takes |
logs[].ca.name | string or null | the CA’s name (its certificate’s common name) |
logs[].level | string | how severe it is, as syslog names the levels: emergency, alert, critical, error, warning, notice, info or debug |
logs[].time | string | when it was logged (ISO 8601, UTC) |
logs[].ip | string | the IP address of the client whose request it logs; empty for the platform’s own work |
logs[].message | string | what happened, e.g. a SCEP, CEP/CES or ACME request, an approval or a revocation, and why it failed |
pkiaas login
Log in to a PKIaaS server.
pkiaas login [flags]Log in to a PKIaaS server, by default https://pkiaas.io or the server of your last login.
Your browser opens to log in and to allow the CLI. On a computer without a browser (e.g. over SSH), use --device: it shows a code to enter on another device. The token is kept in the system keyring, or where there is none in a file only you can read. PKIAAS_TOKEN, if set, is used instead of a stored token.
Login shows the active CA, which commands work in unless told otherwise: the one set before with pkiaas ca set, else the CA you last worked in on the website. Change it with pkiaas ca set.
A person has to approve the login in their browser. AI agents: ask the user to run it, see pkiaas help agents.
This command calls the PKIaaS server and needs the user to take part.
Flags:
| Flag | Type | Description |
|---|---|---|
--device | bool | log in by entering a code in a browser on another device |
--server | string | the PKIaaS server, e.g. https://pkiaas.io (default: the last one you logged in to) |
Examples:
pkiaas loginpkiaas login --devicepkiaas login --server https://pki.example.comWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server logged in to |
email | string or null | the account’s email address |
displayName | string or null | the account’s name |
provider | string | the identity provider the account signs in with, e.g. google |
storedIn | string | where the token is kept: the system keyring, or the path of the owner-only file |
activeCaId | string or null | the active CA’s ID, which commands work in unless told otherwise; null if the account has no CAs |
activeCaName | string or null | the active CA’s name |
Side effects:
- stores the token in the system keyring or an owner-only file
- remembers the server for later commands
- keeps the active CA: the one set before, else the CA last used on the website
- emails the account about the new login, if it has an email address
pkiaas logout
Log out of a PKIaaS server.
pkiaas logout [flags]Log out: revoke the token on the server and delete it from this computer.
With --all, every CLI login of your account is revoked, on every computer. Use it if a token may have leaked.
This command calls the PKIaaS server.
Flags:
| Flag | Type | Description |
|---|---|---|
--all | bool | revoke every CLI login of your account, on every computer |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas logoutpkiaas logout --allWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server logged out of |
revoked | integer, optional | with --all, how many logins were revoked on the server |
removedLocalToken | boolean | whether a token stored on this computer was deleted |
Side effects:
- revokes the token on the server (with
--all, every CLI login of the account) - deletes the stored token
- forgets the active CA for the server
pkiaas pkcs12
Create PKCS#12 (.pfx/.p12) files on this computer.
pkiaas pkcs12 [flags]Commands:
pkiaas pkcs12 create
Combine a key and its certificate into a PKCS#12 file.
pkiaas pkcs12 create --key FILE --cert FILE [--chain-file FILE] [--out FILE] [flags]Combine a private key, its certificate and the CA chain into a PKCS#12 (.pfx/.p12) file.
--key may be PEM or DER; --cert and --chain-file may be PEM, DER or PKCS#7 (.p7b) files. One of them may be - for standard input, e.g. a certificate piped from pkiaas cert export; passphrases then have to come from an environment variable or a file, since they can’t be prompted for. --cert may hold the whole chain (e.g. a fullchain.pem); the certificate whose public key matches the key is used, and the others are added as the chain, followed by any in --chain-file.
The file is protected with AES-256-CBC, PBKDF2-HMAC-SHA256 and an HMAC-SHA256 MAC, which Windows 10 1709 and later, macOS, Java 12 and later, and OpenSSL 1.1.1 and later read. --legacy uses 3DES and a SHA-1 MAC for older systems. --no-passphrase writes the key unencrypted, for programs that load PKCS#12 files without a password; protect such a file like a plain private key.
The PKCS#12 file holds the key, so it is a secret: without --out, it (always DER, as OpenSSL writes it) goes to standard output only when that is a terminal, and in a pipe or captured output the command fails with secret_destination. --out - sends it to standard output anyway, to pipe to another command. There is no result then, so --json needs --out FILE.
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
Its output (the PKCS#12 file) is a secret: it goes to --out FILE, to --out -, or to a terminal, never into a pipe without --out - or into a --json result (error secret_destination).
Flags:
| Flag | Type | Description |
|---|---|---|
--cert | string | the certificate file (PEM, DER or PKCS#7; may include the chain; - for standard input). Required. |
--chain-file | string | a file with the CA certificates (PEM, DER or PKCS#7; - for standard input). Not with --chain. |
--force | bool | replace the --out file if it exists |
-k, --key | string | the private key file, PEM or DER (- for standard input). Required. |
--key-passphrase-env | string | read the key passphrase from this environment variable. Not with --key-passphrase-file. |
--key-passphrase-file | string | read the key passphrase from this file’s first line (- for standard input). Not with --key-passphrase-env. |
--legacy | bool | use 3DES and SHA-1 for older Windows, macOS and Java |
--no-passphrase | bool | don’t encrypt the file |
-o, --out | string | the file to write (default: standard output, as with -) |
--passphrase-env | string | read the PKCS#12 password from this environment variable. Not with --passphrase-file. |
--passphrase-file | string | read the PKCS#12 password from this file’s first line (- for standard input). Not with --passphrase-env. |
Examples:
pkiaas pkcs12 create --key server.key --cert server.pem --chain-file ca.pem --out server.pfxpkiaas pkcs12 create --key server.key --key-passphrase-env KEY_PASSPHRASE --cert server.pem --chain-file ca.pem --out server.pfx --passphrase-env PFX_PASSPHRASE --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
path | string | the PKCS#12 file (--out) |
format | string | how the file is protected: aes-256, legacy-3des or unencrypted |
subject | string | the certificate’s subject |
certificates | integer | how many certificates the file holds, the certificate and its chain |
publicKeySha256 | string | the SHA-256 of the public key (DER SubjectPublicKeyInfo), in hex |
Side effects:
- with
--outFILE, writes the file, readable by the owner only; with--out- or to a terminal, writes the PKCS#12 file to standard output and no result
pkiaas request
Request certificates from a CA, list the pending requests, approve or decline them.
pkiaas request [flags]Commands:
pkiaas request approvepkiaas request createpkiaas request declinepkiaas request listpkiaas request show
pkiaas request approve
Approve a request: the CA signs its CSR and issues the certificate.
pkiaas request approve ID [--subject DN] [--san NAME]... [--not-before TIME] [--not-after TIME] [--ca NAME|ID] [--out FILE|- [--chain] [--format pem|der] [--force]] [flags]Approve a request to a CA, by default the active CA, by its ID from pkiaas request list: the CA signs its CSR as the request’s template says, as the website’s Sign button does without changes, and the command ends once the certificate is issued (on a CA whose key is on an IoT HSM, that can take a few seconds). The result’s serial is the certificate’s: pkiaas cert export SERIAL outputs it. Check the request first with pkiaas request show.
By default the certificate holds what the CSR asks for, as the template allows. --subject, --san, --not-before and --not-after change that, as the website’s “Override requested attributes” and “Override validity time” do, for a request that is readyToBeSigned (statusDetail in pkiaas request show): --subject DN the subject in place of the CSR’s, in RFC 4514 form (“CN=www.example.com,O=Example,C=US”) or OpenSSL’s (“/C=US/O=Example/CN=www.example.com”), as pkiaas csr create takes it; the template’s subject attributes still win --san NAME the subject alternative names in place of the CSR’s (repeatable; list them all): dns:NAME, ip:ADDRESS, email:ADDRESS or uri:URI, or a bare name whose kind is guessed --not-after TIME when the certificate expires, in place of the template’s validity (RFC 3339, e.g. 2027-01-31T00:00:00Z); it is valid from now, or from --not-before TIME Without a subscription, while the CA has a validity limit (validityLimitDays), the validity can’t be changed (subscription_required). Values OpenSSL won’t take are refused (invalid_overrides), and nothing is signed.
Only a request that waits for approval (pendingApproval) and has a CSR can be approved; otherwise the error is request_not_approvable (no CSR, pending email confirmation, pre-approved, or changes to a request that isn’t readyToBeSigned), request_declined, or request_processing while it is being signed. If the CA can’t sign it (e.g. its IoT HSM doesn’t answer), the error is signing_failed: the request waits for approval again, and the CA’s log on the website says why.
Approving a request that is issued already changes nothing and succeeds, so the command is safe to run again, e.g. after a lost connection; the certificate is never signed again, so changes given then aren’t applied.
With --out FILE, it also writes the issued certificate to the file (PEM, or DER with --format der; with --chain, followed by the certificates that issued it, up to the root), which is only replaced with --force; the result names it (file). With --out -, standard output holds only the certificate, for piping, and there is no result (so no --json). The file is checked before anything is approved.
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--chain | bool | with --out: add the CA’s certificate and those that issued the CA, up to the root |
--force | bool | with --out: replace the file if it exists |
--format | string | with --out: pem or der (as OpenSSL’s -outform). Default: pem. |
--not-after | string | the certificate expires at this time (RFC 3339) in place of the template’s validity |
--not-before | string | the certificate is valid from this time (RFC 3339) in place of now; needs --not-after |
-o, --out | string | also write the issued certificate to this file; - for standard output, instead of the result |
--san | string, repeatable | issue the certificate with this subject alternative name in place of the CSR’s (repeatable) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--subject | string | issue the certificate with this subject (distinguished name) in place of the CSR’s |
Examples:
pkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fGpkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --out - > www.pempkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --chain --out fullchain.pem --jsonpkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --san www.example.com --san example.com --not-after 2027-01-31T00:00:00Z --jsonpkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --subject "CN=www.example.com,O=Example,C=US" --jsonpkiaas request approve k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the request went to, which issued the certificate |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the request’s ID |
status | string | issued |
name | string or null | the request’s name (the CSR’s common name) |
template | string or null | the template’s name |
templateId | string or null | the template’s ID |
serial | string or null | the certificate’s serial number: pkiaas cert export SERIAL outputs it |
file | string or null | the --out file the certificate was written to (with --chain, followed by its chain); null without --out |
Side effects:
- the CA signs the request’s CSR and issues the certificate on the server, with the
--subject,--sanand validity changes if given; for a request issued already, nothing - with
--outFILE, writes the certificate to the file; with--out-, writes it to standard output and prints no result
pkiaas request create
Request a certificate with a CSR; it waits for approval, or is issued with —approve.
pkiaas request create --csr FILE --template NAME|ID [--approve [--subject DN] [--san NAME]... [--not-before TIME] [--not-after TIME] [--out FILE|- [--chain] [--format pem|der] [--force]]] [--ca NAME|ID] [--idempotency-key KEY] [flags]Send a CSR to a CA, by default the active CA, as the website’s “Request a Certificate” does. The request waits for a member of the CA to approve it (pkiaas request approve, or the website’s Pending Requests page); approving it issues the certificate. No email is sent.
With --approve, the command approves the request too, as pkiaas request approve does, and ends once the certificate is issued: serial is the certificate’s. If approving fails, the request stays, waiting for approval: the error says its ID. To get the certificate in the same command, add --out (see below). --subject, --san, --not-before and --not-after change what it is issued with, as for pkiaas request approve (see its help); they need --approve.
--csr is a PEM or DER file (e.g. from pkiaas csr create), or - for standard input. Only the CSR is sent, never anything else in the file. The server checks its signature (error invalid_csr). --template is the name of one of the CA’s enabled templates, in any case, as the website and pkiaas template list show it, or its ID (error template_not_found); it says what the certificate will hold. A name that more than one enabled template has is refused (error template_ambiguous): give the ID then.
Each run is a new request, unless it has the --idempotency-key of an earlier run (any text, e.g. a UUID) and the same CSR, template and CA: within 24 hours that gives the earlier result instead of a second request. Without --idempotency-key, the CLI makes a key and reports it (idempotencyKey), and uses it when it retries by itself. A key used for a different request is refused (error idempotency_key_reused). With --approve, running the same command again with the reported key approves the same request, which is safe: an issued request stays as it is.
With --approve, --out FILE also writes the issued certificate to the file (PEM, or DER with --format der; with --chain, followed by the certificates that issued it, up to the root), which is only replaced with --force; the result names it (file). With --out -, standard output holds only the certificate, for piping, and there is no result (so no --json). The file is checked before anything is approved.
In Windows PowerShell 5.1, > and | re-encode output, so write files with --out (PowerShell 7.4 and later keep the bytes).
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--approve | bool | approve the request too, so the CA issues the certificate |
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--chain | bool | with --out: add the CA’s certificate and those that issued the CA, up to the root |
--csr | string | the CSR file, PEM or DER (- for standard input) |
--force | bool | with --out: replace the file if it exists |
--format | string | with --out: pem or der (as OpenSSL’s -outform). Default: pem. |
--idempotency-key | string | repeat an earlier run with this key instead of making a second request (default: a new random key) |
--not-after | string | the certificate expires at this time (RFC 3339) in place of the template’s validity |
--not-before | string | the certificate is valid from this time (RFC 3339) in place of now; needs --not-after |
-o, --out | string | also write the issued certificate to this file; - for standard output, instead of the result |
--san | string, repeatable | issue the certificate with this subject alternative name in place of the CSR’s (repeatable) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--subject | string | issue the certificate with this subject (distinguished name) in place of the CSR’s |
--template | string | the name or ID of one of the CA’s enabled templates (pkiaas template list) |
Examples:
pkiaas request create --csr www.csr --template "Web Server"pkiaas request create --csr www.csr --template "Web Server" --approve --jsonpkiaas request create --csr www.csr --template "Web Server" --approve --out - > www.pempkiaas request create --csr www.csr --template "Web Server" --approve --chain --out fullchain.pem --jsonpkiaas request create --csr www.csr --template "Web Server" --approve --not-after 2027-01-31T00:00:00Z --jsonpkiaas request create --csr - --template "Web Server" --json < www.csrpkiaas request create --csr www.csr --template f5IK8ghmT0 --ca a1B2c3D4e5 --idempotency-key 8e03978e-40d5-43e8-bc93-6894a57f9324 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the request went to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the request’s ID |
status | string | pendingApproval: it waits for a member of the CA to approve it (pkiaas request approve, or the website’s Pending Requests page); with --approve, issued |
name | string or null | the CSR’s common name (or its first subject attribute), which the website shows as the request’s name |
template | string or null | the template’s name |
templateId | string or null | the template’s ID (--template) |
requestedAt | string or null | when it was requested (ISO 8601, UTC) |
serial | string or null | with --approve, the issued certificate’s serial number (pkiaas cert export SERIAL); otherwise null |
file | string or null | with --approve --out FILE, the file the certificate was written to (with --chain, followed by its chain); otherwise null |
idempotencyKey | string | the Idempotency-Key it was sent with: the same command with --idempotency-key and this key, within 24 hours, gives this result again instead of a second request |
Side effects:
- creates a certificate request on the server, which waits for approval; with the
--idempotency-keyof an earlier run (within 24 hours), nothing new - with
--approve, the CA signs the CSR and issues the certificate, with the--subject,--sanand validity changes if given - with
--approve--outFILE, writes the certificate to the file; with--out-, writes it to standard output and prints no result
pkiaas request decline
Decline a request for good.
pkiaas request decline ID [--ca NAME|ID] [--yes] [flags]Decline a request to a CA, by default the active CA, by its ID from pkiaas request list: it will never be issued, and its voucher, email confirmation link and SCEP challenge stop working. This can’t be undone; the requester can make a new request.
It asks for confirmation on a terminal; without one, give --yes. Declining a request that is declined already changes nothing and succeeds, so the command is safe to run again. An issued request can’t be declined (error request_issued): revoke its certificate with pkiaas cert revoke instead. A request being signed can’t be declined (error request_processing) until it has been processing for 10 minutes, when it counts as stuck.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--yes | bool | decline without asking for confirmation |
Examples:
pkiaas request decline k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fGpkiaas request decline k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --yes --jsonpkiaas request decline k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --ca a1B2c3D4e5 --yes --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the request went to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the request’s ID |
status | string | declined |
name | string or null | the request’s name (the CSR’s common name) |
Side effects:
- declines the request on the server for good, and deletes its voucher, email confirmation and SCEP challenge; can’t be undone
pkiaas request list
List the requests that wait for something, the newest first.
pkiaas request list [--ca NAME|ID] [--search TEXT] [--sort FIELD [--order asc|desc]] [--limit N] [flags]List a CA’s pending requests, by default the active CA’s, as the website’s Pending Requests page does: the requests that wait for approval, for the requester’s email confirmation or for the requester to pick up a pre-approved certificate, and those being signed. Issued and declined requests aren’t listed (pkiaas request show ID shows any request), nor are requests from ACME.
pendingApproval: it waits for a member of the CA to approve it (approve it if hasCsr is true; one without a CSR needs an approved voucher, which only the website sends). pendingEmailVerification: it waits for the requester to confirm their email address. preApproved: it is issued when the requester picks it up with its voucher or SCEP challenge. processing: it is being signed; signing takes seconds, so one processing for more than 10 minutes (processingSince) is stuck. issued: the certificate is signed (serial). declined: it will never be issued.
It lists the first --limit requests (default 50, at most 1000); total says how many match. --search keeps the requests whose name contains the text, in any case. --sort takes requestedAt, name or template, in --order asc (the default with --sort) or desc. Without --sort: requestedAt, desc.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many requests to list (1-1000). Default: 50. |
--order | string | asc or desc (default: asc with --sort) |
--search | string | only requests whose name contains this text |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--sort | string | what to sort by: requestedAt, name, template (default: requestedAt, desc) |
Examples:
pkiaas request listpkiaas request list --jsonpkiaas request list --search example.com --sort name --jsonpkiaas request list --ca a1B2c3D4e5 --limit 200 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the requests went to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
total | integer | how many requests match; more than are listed when it exceeds --limit |
requests | object[] | the first --limit matching requests, in the --sort and --order order |
requests[].id | string | the request’s ID, which the request commands take |
requests[].status | string | pendingApproval, pendingEmailVerification, preApproved or processing (see the command’s help) |
requests[].name | string or null | the CSR’s common name (or its first subject attribute), which the website shows as the request’s name |
requests[].template | string or null | the template’s name |
requests[].templateId | string or null | the template’s ID |
requests[].requestedAt | string or null | when it was requested (ISO 8601, UTC) |
requests[].hasCsr | boolean | it has a CSR, so pkiaas request approve can issue it; one without needs an approved voucher, which only the website sends |
requests[].source | string or null | where it came from: scep, web, system, createCa, ces or api (this CLI and the new pages); null if unknown |
requests[].expiresAt | string or null | when the pre-approval (voucher, email confirmation or SCEP challenge) expires (ISO 8601, UTC); null if it never does |
requests[].processingSince | string or null | while it is processing, when signing started (ISO 8601, UTC); otherwise null |
pkiaas request show
Show a request’s details: its status and what its CSR asks for.
pkiaas request show ID [--ca NAME|ID] [flags]Show a request to a CA, by default the active CA, by its ID from pkiaas request list or pkiaas request create: its status, template and source, and what its CSR asks for (subject, subject alternative names, key), so it can be checked before it is approved. The template, not the CSR, decides what the certificate holds. Once it is issued, serial is the certificate’s serial number. Requests from ACME aren’t shown.
pendingApproval: it waits for a member of the CA to approve it (approve it if hasCsr is true; one without a CSR needs an approved voucher, which only the website sends). pendingEmailVerification: it waits for the requester to confirm their email address. preApproved: it is issued when the requester picks it up with its voucher or SCEP challenge. processing: it is being signed; signing takes seconds, so one processing for more than 10 minutes (processingSince) is stuck. issued: the certificate is signed (serial). declined: it will never be issued.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas request show k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fGpkiaas request show k3J9xQ2mP7vR1sT8wY4zA6bC0dE5fG --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the request went to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the request’s ID |
status | string | pendingApproval, pendingEmailVerification, preApproved, processing, issued or declined (see the command’s help) |
name | string or null | the CSR’s common name (or its first subject attribute), which the website shows as the request’s name |
template | string or null | the template’s name; the template, not the CSR, decides what the certificate holds |
templateId | string or null | the template’s ID |
source | string or null | where it came from: scep, web, system, createCa, ces or api (this CLI and the new pages); null if unknown |
requestedAt | string or null | when it was requested (ISO 8601, UTC) |
expiresAt | string or null | when the pre-approval (voucher, email confirmation or SCEP challenge) expires (ISO 8601, UTC); null if it never does |
processingSince | string or null | while it is processing, when signing started (ISO 8601, UTC); otherwise null |
serial | string or null | once it is issued, the certificate’s serial number (pkiaas cert export SERIAL); otherwise null |
hasCsr | boolean | it has a CSR, so pkiaas request approve can issue it |
subject | string or null | the CSR’s subject as OpenSSL prints it, e.g. C=US, O=Example, CN=www.example.com; null without a CSR |
subjectAltNames | string[] | the CSR’s subject alternative names as OpenSSL writes them, e.g. DNS:www.example.com; empty without a CSR |
keyType | string or null | the algorithm of the CSR’s key, as OpenSSL names it, e.g. rsaEncryption, id-ecPublicKey |
keySize | integer or null | the key size in bits (the curve size for EC keys) |
pkiaas template
Show and change a CA’s certificate templates, and their revisions.
pkiaas template [flags]Commands:
pkiaas template list
List a CA’s templates, by name.
pkiaas template list [--ca NAME|ID] [--limit N] [flags]List the certificate templates of a CA, by default the active CA’s, by name, enabled or not. A template says what the certificates it issues hold; pkiaas request create --template takes its name or ID, and only enabled templates take requests. pkiaas template show shows one’s settings and pkiaas template update changes them; templates are made on the website.
It lists the first --limit templates (default 50, at most 1000); total says how many there are.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many templates to list (1-1000). Default: 50. |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas template listpkiaas template list --ca a1B2c3D4e5 --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the templates belong to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
total | integer | how many templates the CA has; more than are listed when it exceeds --limit |
templates | object[] | the first --limit templates, by name |
templates[].id | string | the template’s ID; pkiaas request create --template takes it or the name |
templates[].name | string or null | the template’s name |
templates[].enabled | boolean | whether it takes requests; a disabled template is refused (template_not_found) |
pkiaas template revision
A template’s saved versions: list them, show one, restore one.
pkiaas template revision [flags]Commands:
pkiaas template revision list
List a template’s revisions, newest first.
pkiaas template revision list TEMPLATE [--limit N] [--ca NAME|ID] [flags]List the saved versions of a template’s settings, newest first: when each was saved, by whom, and what changed. TEMPLATE is its name in any case or its ID, in the CA --ca names (by default the active CA). Every change of settings adds a revision; secrets (the SCEP passphrase, Intune, Microsoft basic auth) add none. History starts with the settings as they were when the server began keeping it (revision 1).
It lists the first --limit revisions (default 50, at most 1000); total says how many there are. pkiaas template revision show TEMPLATE N shows one’s settings, and pkiaas template revision restore TEMPLATE N puts them back.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--limit | int | how many revisions to list (1-1000). Default: 50. |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas template revision list "Web Server"pkiaas template revision list f5IK8ghmT0 --ca "Example CA" --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the template belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
template | object | the template |
template.id | string | the template’s ID |
template.name | string or null | the template’s name |
total | integer | how many revisions it has; more than are listed when it exceeds --limit |
items | object[] | the first --limit revisions, newest first |
items[].revision | integer | the revision number; certificates name the revision that issued them |
items[].savedAt | string | when it was saved, RFC 3339 UTC |
items[].by | string or null | the email of the user who saved it; null for the revisions pkiaas recorded itself (see via) |
items[].via | string | where it was saved: admin (the website’s classic pages), app (the website), cli, api; migration: the settings when history started; created: as the template was made; outside: a change an older version of the server made |
items[].changed | string[] | what changed from the revision before, as the CA log names it |
items[].restoredFrom | integer or null | the revision it restored; null if it isn’t a restore |
pkiaas template revision restore
Put a revision’s settings back, as a new revision.
pkiaas template revision restore TEMPLATE N [--dry-run] [--ca NAME|ID] [flags]Save the settings of revision N as the template’s newest revision, marked as restored from N; history is never rewritten. TEMPLATE is its name in any case or its ID, in the CA --ca names (by default the active CA). The SCEP passphrase, Intune, Microsoft basic auth and CES stay as they are. Restoring needs the modify privilege in the template’s CA (error forbidden without it).
The restored settings are signed on a throwaway CA first, as pkiaas template update does, so a revision that can’t be signed today (e.g. because the CA’s policy changed since) is refused (http_400) and nothing is saved. If someone changed the template since the command read it, nothing is saved and it fails with template_changed: run it again. Restoring settings that are current already changes nothing. --dry-run shows what would change, old → new, and saves nothing.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--dry-run | bool | save nothing: the server checks the restore and runs the signing trial, and shows what would change |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas template revision restore "Web Server" 7 --dry-runpkiaas template revision restore "Web Server" 7pkiaas template revision restore f5IK8ghmT0 1 --ca "Example CA" --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the template belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the template’s ID (read-only) |
name | string or null | the template’s name |
revision | integer | the revision of these settings (read-only); every change of settings adds one |
modifiedAt | string | when the settings last changed, RFC 3339 UTC (read-only) |
enabled | boolean | only enabled templates take requests |
publicRequests | boolean | anyone may request a certificate on the CA’s public page; approval still applies |
renewal | object | automatic renewal with a valid certificate |
renewal.allowed | boolean | a valid certificate may be renewed with itself |
renewal.revokeOld | boolean | the renewed certificate is revoked |
renewal.requireWithinDays | boolean | as stored by the website; renewal always keeps to withinDays |
renewal.withinDays | integer or null | renewal is allowed this many days before expiry |
renewal.copyNames | boolean | the new certificate gets the subject and alternative names of the old one |
signingAlgorithm | string or null | the signature hash, e.g. sha256 |
validityDays | integer or null | how many days certificates are valid |
subject | object | the certificate’s subject |
subject.fromRequest | boolean | the website’s Supplied by the CSR box; certificates always start from the request’s subject, with attributes over it |
subject.attributes | object[] | attributes the template sets over the request’s, in certificate order |
subject.attributes[].type | string | the attribute, e.g. organizationName, countryName |
subject.attributes[].value | string | its value |
keyUsage | object or null | the key usage extension (RFC 5280 names); null for none |
keyUsage.critical | boolean | the extension is critical |
keyUsage.usages | string[] | the usages |
extendedKeyUsage | object or null | the extended key usage extension: OpenSSL names (serverAuth, clientAuth …) or OIDs; null for none |
extendedKeyUsage.critical | boolean | the extension is critical |
extendedKeyUsage.usages | string[] | the usages |
basicConstraints | object or null | the basic constraints extension; null for none |
basicConstraints.critical | boolean | the extension is critical |
basicConstraints.ca | boolean | certificates are CA certificates |
basicConstraints.pathLength | integer or null | for a CA: how many CAs may follow it; null for no limit |
authorityInfoAccess | object | the authority information access extension |
authorityInfoAccess.caIssuers | boolean | certificates get the address of the CA certificate |
authorityInfoAccess.caIssuersUrls | string[] | own CA issuers addresses; empty for the platform’s |
authorityInfoAccess.ocsp | boolean | certificates get the OCSP address |
crlDistributionPoints | boolean | certificates get the CA’s CRL address |
certificatePolicies | object | the certificate policies extension |
certificatePolicies.enabled | boolean | certificates get the CA’s policy and the template’s |
certificatePolicies.policyOid | string or null | the template’s own policy OID; null for none |
certificatePolicies.issued | string[] | the policies certificates really get, in order (read-only) |
ctLogs | string[] | the Certificate Transparency logs certificates are submitted to (https addresses) |
scep | object | SCEP enrollment |
scep.enabled | boolean | SCEP enrollment is on |
scep.staticPassphraseSet | boolean | a static challenge passphrase is set (read-only; --scep-passphrase sets it) |
scep.stripRootFromGetCaCert | boolean | GetCACert leaves out the root certificate |
scep.microsoftCompatibility | object | the Microsoft (NDES-style) endpoints |
scep.microsoftCompatibility.enabled | boolean | the Microsoft endpoints are on |
scep.microsoftCompatibility.basicAuth | object | basic authentication on them (read-only; changed on the website) |
scep.microsoftCompatibility.basicAuth.enabled | boolean | it is on |
scep.ipAcl | object | which IPv4 addresses may use SCEP |
scep.ipAcl.scepRequests | boolean | the ACL applies to SCEP requests |
scep.ipAcl.microsoftUi | boolean | the ACL applies to the Microsoft pages |
scep.ipAcl.allowedIps | string[] | the addresses allowed |
scep.intune | object | Intune (read-only; changed on the website) |
scep.intune.enabled | boolean | the template is connected to Intune |
scep.intune.mode | string or null | connector (the PKIaaS.io Intune Connector) or app (the template’s own app registration); null when off |
scep.intune.tenant | string or null | the Intune tenant; null when off |
rules | object | request rules; always {} in this version |
changes | object[] | the settings that changed (or would); empty when none |
changes[].field | string | what changed, as the CA log names it: name, enabled, public requests, renewal, signing algorithm, validity, subject, key usage, extended key usage, basic constraints, authority information access, CRL distribution point, certificate policies, template policy, CT logs, SCEP, SCEP IP ACL |
changes[].from | string | its value before, as text |
changes[].to | string | its value after, as text |
dryRun | boolean, optional | true for --dry-run: nothing was saved, and the template is as it would be |
trial | object or null | the signing trial, which runs when a field that reaches certificates changes; null when it didn’t run |
trial.passed | boolean | both signed what the settings ask for |
trial.certificate | object or null | what a certificate from these settings gets; null if the trial didn’t sign |
trial.certificate.subject | string[] | the subject’s attributes in order, e.g. CN=trial.example.com |
trial.certificate.validity | string | how long it is valid, e.g. 90d |
trial.certificate.extensions | object[] | its extensions, in order |
trial.certificate.extensions[].name | string | the extension, e.g. keyUsage |
trial.certificate.extensions[].critical | boolean | it is critical |
trial.certificate.extensions[].value | string | its value, as text |
scepPassphrase | string, optional | what happened to the SCEP passphrase: set, removed, or with --dry-run would be set or would be removed (never the passphrase) |
scepPassphraseFile | string, optional | with --scep-passphrase new, the --out file it was written to, alone on one line, readable by its owner only |
compatibility | object[], optional | the uses of the template (today Windows enrollment, on a server with it) that the change makes it incompatible with, or compatible with again: its key usage, validity or certificate policies no longer suit what they ask, or suit it again; left out when there are none, or when the check couldn’t run (a notice on standard error says so) |
compatibility[].use | string | what uses the template: Windows enrollment |
compatibility[].compatible | boolean | whether the template is compatible with it after the change (or would be, with --dry-run) |
compatibility[].wasCompatible | boolean | whether it was compatible before the change |
compatibility[].problems | string[] | why the template is incompatible, one sentence each; empty when compatible |
Side effects:
- saves the revision’s settings as the template’s newest revision, marked as restored; nothing when they are current already, or with
--dry-run - leaves the SCEP passphrase, Intune, Microsoft basic auth and CES as they are
- Windows clients see changed settings in their next policy answer
- the CA’s log records the restore
pkiaas template revision show
Show the settings of one revision of a template.
pkiaas template revision show TEMPLATE N [--ca NAME|ID] [flags]Show one saved version of a template’s settings: what pkiaas template revision restore TEMPLATE N would put back. TEMPLATE is its name in any case or its ID, in the CA --ca names (by default the active CA); N is the revision number from pkiaas template revision list. Revisions keep no secrets, so the SCEP passphrase, Intune and Microsoft basic auth are shown as they are now.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas template revision show "Web Server" 7pkiaas template revision show f5IK8ghmT0 1 --ca "Example CA" --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the template belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
revision | integer | the revision number; certificates name the revision that issued them |
savedAt | string | when it was saved, RFC 3339 UTC |
by | string or null | the email of the user who saved it; null for the revisions pkiaas recorded itself (see via) |
via | string | where it was saved: admin (the website’s classic pages), app (the website), cli, api; migration: the settings when history started; created: as the template was made; outside: a change an older version of the server made |
changed | string[] | what changed from the revision before, as the CA log names it |
restoredFrom | integer or null | the revision it restored; null if it isn’t a restore |
template | object | the revision’s settings, as pkiaas template show --json has them; the SCEP passphrase, Intune and Microsoft basic auth as they are now, since revisions keep no secrets |
template.id | string | the template’s ID (read-only) |
template.name | string or null | the template’s name |
template.revision | integer | the revision of these settings (read-only); every change of settings adds one |
template.modifiedAt | string | when the settings last changed, RFC 3339 UTC (read-only) |
template.enabled | boolean | only enabled templates take requests |
template.publicRequests | boolean | anyone may request a certificate on the CA’s public page; approval still applies |
template.renewal | object | automatic renewal with a valid certificate |
template.renewal.allowed | boolean | a valid certificate may be renewed with itself |
template.renewal.revokeOld | boolean | the renewed certificate is revoked |
template.renewal.requireWithinDays | boolean | as stored by the website; renewal always keeps to withinDays |
template.renewal.withinDays | integer or null | renewal is allowed this many days before expiry |
template.renewal.copyNames | boolean | the new certificate gets the subject and alternative names of the old one |
template.signingAlgorithm | string or null | the signature hash, e.g. sha256 |
template.validityDays | integer or null | how many days certificates are valid |
template.subject | object | the certificate’s subject |
template.subject.fromRequest | boolean | the website’s Supplied by the CSR box; certificates always start from the request’s subject, with attributes over it |
template.subject.attributes | object[] | attributes the template sets over the request’s, in certificate order |
template.subject.attributes[].type | string | the attribute, e.g. organizationName, countryName |
template.subject.attributes[].value | string | its value |
template.keyUsage | object or null | the key usage extension (RFC 5280 names); null for none |
template.keyUsage.critical | boolean | the extension is critical |
template.keyUsage.usages | string[] | the usages |
template.extendedKeyUsage | object or null | the extended key usage extension: OpenSSL names (serverAuth, clientAuth …) or OIDs; null for none |
template.extendedKeyUsage.critical | boolean | the extension is critical |
template.extendedKeyUsage.usages | string[] | the usages |
template.basicConstraints | object or null | the basic constraints extension; null for none |
template.basicConstraints.critical | boolean | the extension is critical |
template.basicConstraints.ca | boolean | certificates are CA certificates |
template.basicConstraints.pathLength | integer or null | for a CA: how many CAs may follow it; null for no limit |
template.authorityInfoAccess | object | the authority information access extension |
template.authorityInfoAccess.caIssuers | boolean | certificates get the address of the CA certificate |
template.authorityInfoAccess.caIssuersUrls | string[] | own CA issuers addresses; empty for the platform’s |
template.authorityInfoAccess.ocsp | boolean | certificates get the OCSP address |
template.crlDistributionPoints | boolean | certificates get the CA’s CRL address |
template.certificatePolicies | object | the certificate policies extension |
template.certificatePolicies.enabled | boolean | certificates get the CA’s policy and the template’s |
template.certificatePolicies.policyOid | string or null | the template’s own policy OID; null for none |
template.certificatePolicies.issued | string[] | the policies certificates really get, in order (read-only) |
template.ctLogs | string[] | the Certificate Transparency logs certificates are submitted to (https addresses) |
template.scep | object | SCEP enrollment |
template.scep.enabled | boolean | SCEP enrollment is on |
template.scep.staticPassphraseSet | boolean | a static challenge passphrase is set (read-only; --scep-passphrase sets it) |
template.scep.stripRootFromGetCaCert | boolean | GetCACert leaves out the root certificate |
template.scep.microsoftCompatibility | object | the Microsoft (NDES-style) endpoints |
template.scep.microsoftCompatibility.enabled | boolean | the Microsoft endpoints are on |
template.scep.microsoftCompatibility.basicAuth | object | basic authentication on them (read-only; changed on the website) |
template.scep.microsoftCompatibility.basicAuth.enabled | boolean | it is on |
template.scep.ipAcl | object | which IPv4 addresses may use SCEP |
template.scep.ipAcl.scepRequests | boolean | the ACL applies to SCEP requests |
template.scep.ipAcl.microsoftUi | boolean | the ACL applies to the Microsoft pages |
template.scep.ipAcl.allowedIps | string[] | the addresses allowed |
template.scep.intune | object | Intune (read-only; changed on the website) |
template.scep.intune.enabled | boolean | the template is connected to Intune |
template.scep.intune.mode | string or null | connector (the PKIaaS.io Intune Connector) or app (the template’s own app registration); null when off |
template.scep.intune.tenant | string or null | the Intune tenant; null when off |
template.rules | object | request rules; always {} in this version |
pkiaas template show
Show everything a template sets.
pkiaas template show TEMPLATE [--ca NAME|ID] [flags]Show a template’s settings, as the website’s Edit Template page has them: who may request with it, how long certificates are valid, their subject and extensions, and SCEP. TEMPLATE is its name in any case or its ID, in the CA --ca names (by default the active CA). Secrets are never shown: only whether a SCEP passphrase is set.
With --json, the result is the template as the API has it, with the CA. Edit that JSON and send it back with pkiaas template update TEMPLATE --file FILE to change several settings at once.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas template show "Web Server"pkiaas template show f5IK8ghmT0 --ca "Example CA" --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the template belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the template’s ID (read-only) |
name | string or null | the template’s name |
revision | integer | the revision of these settings (read-only); every change of settings adds one |
modifiedAt | string | when the settings last changed, RFC 3339 UTC (read-only) |
enabled | boolean | only enabled templates take requests |
publicRequests | boolean | anyone may request a certificate on the CA’s public page; approval still applies |
renewal | object | automatic renewal with a valid certificate |
renewal.allowed | boolean | a valid certificate may be renewed with itself |
renewal.revokeOld | boolean | the renewed certificate is revoked |
renewal.requireWithinDays | boolean | as stored by the website; renewal always keeps to withinDays |
renewal.withinDays | integer or null | renewal is allowed this many days before expiry |
renewal.copyNames | boolean | the new certificate gets the subject and alternative names of the old one |
signingAlgorithm | string or null | the signature hash, e.g. sha256 |
validityDays | integer or null | how many days certificates are valid |
subject | object | the certificate’s subject |
subject.fromRequest | boolean | the website’s Supplied by the CSR box; certificates always start from the request’s subject, with attributes over it |
subject.attributes | object[] | attributes the template sets over the request’s, in certificate order |
subject.attributes[].type | string | the attribute, e.g. organizationName, countryName |
subject.attributes[].value | string | its value |
keyUsage | object or null | the key usage extension (RFC 5280 names); null for none |
keyUsage.critical | boolean | the extension is critical |
keyUsage.usages | string[] | the usages |
extendedKeyUsage | object or null | the extended key usage extension: OpenSSL names (serverAuth, clientAuth …) or OIDs; null for none |
extendedKeyUsage.critical | boolean | the extension is critical |
extendedKeyUsage.usages | string[] | the usages |
basicConstraints | object or null | the basic constraints extension; null for none |
basicConstraints.critical | boolean | the extension is critical |
basicConstraints.ca | boolean | certificates are CA certificates |
basicConstraints.pathLength | integer or null | for a CA: how many CAs may follow it; null for no limit |
authorityInfoAccess | object | the authority information access extension |
authorityInfoAccess.caIssuers | boolean | certificates get the address of the CA certificate |
authorityInfoAccess.caIssuersUrls | string[] | own CA issuers addresses; empty for the platform’s |
authorityInfoAccess.ocsp | boolean | certificates get the OCSP address |
crlDistributionPoints | boolean | certificates get the CA’s CRL address |
certificatePolicies | object | the certificate policies extension |
certificatePolicies.enabled | boolean | certificates get the CA’s policy and the template’s |
certificatePolicies.policyOid | string or null | the template’s own policy OID; null for none |
certificatePolicies.issued | string[] | the policies certificates really get, in order (read-only) |
ctLogs | string[] | the Certificate Transparency logs certificates are submitted to (https addresses) |
scep | object | SCEP enrollment |
scep.enabled | boolean | SCEP enrollment is on |
scep.staticPassphraseSet | boolean | a static challenge passphrase is set (read-only; --scep-passphrase sets it) |
scep.stripRootFromGetCaCert | boolean | GetCACert leaves out the root certificate |
scep.microsoftCompatibility | object | the Microsoft (NDES-style) endpoints |
scep.microsoftCompatibility.enabled | boolean | the Microsoft endpoints are on |
scep.microsoftCompatibility.basicAuth | object | basic authentication on them (read-only; changed on the website) |
scep.microsoftCompatibility.basicAuth.enabled | boolean | it is on |
scep.ipAcl | object | which IPv4 addresses may use SCEP |
scep.ipAcl.scepRequests | boolean | the ACL applies to SCEP requests |
scep.ipAcl.microsoftUi | boolean | the ACL applies to the Microsoft pages |
scep.ipAcl.allowedIps | string[] | the addresses allowed |
scep.intune | object | Intune (read-only; changed on the website) |
scep.intune.enabled | boolean | the template is connected to Intune |
scep.intune.mode | string or null | connector (the PKIaaS.io Intune Connector) or app (the template’s own app registration); null when off |
scep.intune.tenant | string or null | the Intune tenant; null when off |
rules | object | request rules; always {} in this version |
pkiaas template update
Change a template’s settings and its SCEP passphrase.
pkiaas template update TEMPLATE [--file FILE] [--enabled on|off] [--public-requests on|off] [--validity-days N] [--signing-algorithm NAME] [--policy-oid OID|none] [--scep on|off] [--scep-passphrase new --out FILE | --scep-passphrase none | --scep-passphrase-env NAME | --scep-passphrase-file FILE] [--dry-run] [--ca NAME|ID] [flags]Change a template’s settings, as the website’s Edit Template page does. TEMPLATE is its name in any case or its ID, in the CA --ca names (by default the active CA). Only what the flags give changes; the rest stays as it is. Changing a template needs the modify privilege in its CA (error forbidden without it).
--file FILE (- for standard input) is the whole template as pkiaas template show --json writes it: edit that file and send it back to change several settings at once; its read-only fields (id, revision, modifiedAt, certificatePolicies.issued, scep.staticPassphraseSet, scep.intune, scep.microsoftCompatibility.basicAuth) and the ca field are ignored. The other flags change one setting each, also on top of --file: --enabled and --public-requests on|off, --validity-days N, --signing-algorithm (sha256, sha384, sha512 or what the server offers), --policy-oid (the template’s own certificate policy, or none), and --scep on|off.
Every change of settings is saved as a new revision (pkiaas template revision list). A change that reaches certificates (validity, signing algorithm, subject, extensions, policies, CT logs) is first signed on a throwaway CA with OpenSSL and natively, on the server: settings that would break signing are refused (http_400, naming the field) and nothing is saved. Fields left as they were are never checked again, so an old template keeps values the website allowed then.
The SCEP passphrase is a secret, never shown, and its own flags: --scep-passphrase new makes one (24 letters and digits) and writes it to --out FILE, alone on one line, readable by you only (--out - or a terminal shows it instead); --scep-passphrase-env NAME and --scep-passphrase-file FILE set your own (16 to 128 printable characters, never as an argument); --scep-passphrase none removes it. Some older SCEP devices accept only letters and digits. It is set after the settings are saved, and changes no revision.
The command reads the template, changes what the flags give, and sends it all back with the version it read. If someone changed the template in between, or since the --file was written (its revision differs), nothing is saved and it fails with template_changed: run it again (with --file, show the template again and redo the edit). Running it again after it succeeded changes nothing more. --dry-run asks the server to check the change and run the signing trial, and saves nothing; it shows what would change, old → new.
This command calls the PKIaaS server and needs a login.
Its output (the SCEP passphrase, with —scep-passphrase new) is a secret: it goes to --out FILE, to --out -, or to a terminal, never into a pipe without --out - or into a --json result (error secret_destination).
Flags:
| Flag | Type | Description |
|---|---|---|
--ca | string | the CA to work in, by its name (any case) or ID from pkiaas ca list (default: PKIAAS_CA, else the active CA) |
--dry-run | bool | save nothing: the server checks the change and runs the signing trial, and shows what would change |
--enabled | string | turn the template on or off: only enabled templates take requests |
--file | string | the whole template as pkiaas template show --json writes it, from this file (- for standard input) |
--force | bool | replace the --out file if it exists |
-o, --out | string | the file to write (default: standard output, as with -) |
--policy-oid | string | the template’s certificate policy OID, in dotted form (at most 50 characters), or none |
--public-requests | string | on or off: anyone may request a certificate on the CA’s public page |
--scep | string | turn SCEP enrollment on or off |
--scep-passphrase | string | new: make a SCEP passphrase (24 letters and digits) and write it to --out; none: remove it. Not with --scep-passphrase-env, --scep-passphrase-file. |
--scep-passphrase-env | string | read the SCEP passphrase from this environment variable. Not with --scep-passphrase-file, --scep-passphrase. |
--scep-passphrase-file | string | read the SCEP passphrase from this file’s first line (- for standard input). Not with --scep-passphrase-env, --scep-passphrase. |
--server | string | the PKIaaS server (default: the last one you logged in to) |
--signing-algorithm | string | the signature hash: sha256, sha384, sha512 (or what the server offers) |
--validity-days | int | how many days certificates are valid (1 or more). Default: 0. |
Examples:
pkiaas template update "Web Server" --validity-days 90 --dry-runpkiaas template update "Web Server" --validity-days 90pkiaas template update "Web Server" --file web-server.json --jsonpkiaas template update f5IK8ghmT0 --scep on --scep-passphrase new --out scep-passphrase.txtpkiaas template update "Web Server" --scep-passphrase-env SCEP_PASSPHRASE --ca "Example CA"pkiaas template update "Web Server" --enabled off --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
ca | object | the CA the template belongs to |
ca.id | string | the ID of the CA that issued the certificate, which --ca takes |
ca.name | string or null | the CA’s name (its certificate’s common name) |
id | string | the template’s ID (read-only) |
name | string or null | the template’s name |
revision | integer | the revision of these settings (read-only); every change of settings adds one |
modifiedAt | string | when the settings last changed, RFC 3339 UTC (read-only) |
enabled | boolean | only enabled templates take requests |
publicRequests | boolean | anyone may request a certificate on the CA’s public page; approval still applies |
renewal | object | automatic renewal with a valid certificate |
renewal.allowed | boolean | a valid certificate may be renewed with itself |
renewal.revokeOld | boolean | the renewed certificate is revoked |
renewal.requireWithinDays | boolean | as stored by the website; renewal always keeps to withinDays |
renewal.withinDays | integer or null | renewal is allowed this many days before expiry |
renewal.copyNames | boolean | the new certificate gets the subject and alternative names of the old one |
signingAlgorithm | string or null | the signature hash, e.g. sha256 |
validityDays | integer or null | how many days certificates are valid |
subject | object | the certificate’s subject |
subject.fromRequest | boolean | the website’s Supplied by the CSR box; certificates always start from the request’s subject, with attributes over it |
subject.attributes | object[] | attributes the template sets over the request’s, in certificate order |
subject.attributes[].type | string | the attribute, e.g. organizationName, countryName |
subject.attributes[].value | string | its value |
keyUsage | object or null | the key usage extension (RFC 5280 names); null for none |
keyUsage.critical | boolean | the extension is critical |
keyUsage.usages | string[] | the usages |
extendedKeyUsage | object or null | the extended key usage extension: OpenSSL names (serverAuth, clientAuth …) or OIDs; null for none |
extendedKeyUsage.critical | boolean | the extension is critical |
extendedKeyUsage.usages | string[] | the usages |
basicConstraints | object or null | the basic constraints extension; null for none |
basicConstraints.critical | boolean | the extension is critical |
basicConstraints.ca | boolean | certificates are CA certificates |
basicConstraints.pathLength | integer or null | for a CA: how many CAs may follow it; null for no limit |
authorityInfoAccess | object | the authority information access extension |
authorityInfoAccess.caIssuers | boolean | certificates get the address of the CA certificate |
authorityInfoAccess.caIssuersUrls | string[] | own CA issuers addresses; empty for the platform’s |
authorityInfoAccess.ocsp | boolean | certificates get the OCSP address |
crlDistributionPoints | boolean | certificates get the CA’s CRL address |
certificatePolicies | object | the certificate policies extension |
certificatePolicies.enabled | boolean | certificates get the CA’s policy and the template’s |
certificatePolicies.policyOid | string or null | the template’s own policy OID; null for none |
certificatePolicies.issued | string[] | the policies certificates really get, in order (read-only) |
ctLogs | string[] | the Certificate Transparency logs certificates are submitted to (https addresses) |
scep | object | SCEP enrollment |
scep.enabled | boolean | SCEP enrollment is on |
scep.staticPassphraseSet | boolean | a static challenge passphrase is set (read-only; --scep-passphrase sets it) |
scep.stripRootFromGetCaCert | boolean | GetCACert leaves out the root certificate |
scep.microsoftCompatibility | object | the Microsoft (NDES-style) endpoints |
scep.microsoftCompatibility.enabled | boolean | the Microsoft endpoints are on |
scep.microsoftCompatibility.basicAuth | object | basic authentication on them (read-only; changed on the website) |
scep.microsoftCompatibility.basicAuth.enabled | boolean | it is on |
scep.ipAcl | object | which IPv4 addresses may use SCEP |
scep.ipAcl.scepRequests | boolean | the ACL applies to SCEP requests |
scep.ipAcl.microsoftUi | boolean | the ACL applies to the Microsoft pages |
scep.ipAcl.allowedIps | string[] | the addresses allowed |
scep.intune | object | Intune (read-only; changed on the website) |
scep.intune.enabled | boolean | the template is connected to Intune |
scep.intune.mode | string or null | connector (the PKIaaS.io Intune Connector) or app (the template’s own app registration); null when off |
scep.intune.tenant | string or null | the Intune tenant; null when off |
rules | object | request rules; always {} in this version |
changes | object[] | the settings that changed (or would); empty when none |
changes[].field | string | what changed, as the CA log names it: name, enabled, public requests, renewal, signing algorithm, validity, subject, key usage, extended key usage, basic constraints, authority information access, CRL distribution point, certificate policies, template policy, CT logs, SCEP, SCEP IP ACL |
changes[].from | string | its value before, as text |
changes[].to | string | its value after, as text |
dryRun | boolean, optional | true for --dry-run: nothing was saved, and the template is as it would be |
trial | object or null | the signing trial, which runs when a field that reaches certificates changes; null when it didn’t run |
trial.passed | boolean | both signed what the settings ask for |
trial.certificate | object or null | what a certificate from these settings gets; null if the trial didn’t sign |
trial.certificate.subject | string[] | the subject’s attributes in order, e.g. CN=trial.example.com |
trial.certificate.validity | string | how long it is valid, e.g. 90d |
trial.certificate.extensions | object[] | its extensions, in order |
trial.certificate.extensions[].name | string | the extension, e.g. keyUsage |
trial.certificate.extensions[].critical | boolean | it is critical |
trial.certificate.extensions[].value | string | its value, as text |
scepPassphrase | string, optional | what happened to the SCEP passphrase: set, removed, or with --dry-run would be set or would be removed (never the passphrase) |
scepPassphraseFile | string, optional | with --scep-passphrase new, the --out file it was written to, alone on one line, readable by its owner only |
compatibility | object[], optional | the uses of the template (today Windows enrollment, on a server with it) that the change makes it incompatible with, or compatible with again: its key usage, validity or certificate policies no longer suit what they ask, or suit it again; left out when there are none, or when the check couldn’t run (a notice on standard error says so) |
compatibility[].use | string | what uses the template: Windows enrollment |
compatibility[].compatible | boolean | whether the template is compatible with it after the change (or would be, with --dry-run) |
compatibility[].wasCompatible | boolean | whether it was compatible before the change |
compatibility[].problems | string[] | why the template is incompatible, one sentence each; empty when compatible |
Side effects:
- changes the template’s settings on the server, only those given, as a new revision; nothing when it has them already, or with
--dry-run - with
--scep-passphrase, sets or removes the template’s SCEP passphrase (no revision); with new, writes it to the--outfile, readable by the owner only, or with--out- or to a terminal to standard output (the details then go to standard error and there is no result) - Windows clients see changed settings in their next policy answer
- the CA’s log records the change, never the passphrase
pkiaas version
Show the CLI’s version.
pkiaas version [flags]Show the CLI’s version, and the Go version and platform it was built for. With --licenses, show the licences of the third-party code in the CLI instead (as text, even with --json).
Flags:
| Flag | Type | Description |
|---|---|---|
--licenses | bool | show the licences of the third-party code in the CLI |
Examples:
pkiaas version --jsonpkiaas version --licensesWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
version | string | the CLI’s version, e.g. 0.1.0+af1cf3e (semantic version + build) |
goVersion | string | the Go version it was built with |
os | string | the operating system it was built for, e.g. linux |
arch | string | the processor architecture it was built for, e.g. amd64 |
pkiaas whoami
Show who you are logged in as.
pkiaas whoami [flags]Show the server and the account the CLI is logged in to, and where the token comes from. Use it to check for a login: without one, it fails with exit code 3 and the code not_logged_in or invalid_token.
This command calls the PKIaaS server and needs a login.
Flags:
| Flag | Type | Description |
|---|---|---|
--server | string | the PKIaaS server (default: the last one you logged in to) |
Examples:
pkiaas whoami --jsonWith --json, the result is an object with these fields:
| Field | Type | Description |
|---|---|---|
server | string | the server |
email | string or null | the account’s email address |
displayName | string or null | the account’s name |
provider | string | the identity provider the account signs in with, e.g. google |
tokenSource | string | where the token came from: environment (PKIAAS_TOKEN), keyring or file |