@@ -107,7 +107,35 @@ each with optional fraction and a unit suffix, such as "300ms", "1.5h", or "2h45
107107Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
108108
109109** --kms** =` uri `
110- The ` uri ` to configure a Cloud KMS or an HSM.
110+ The ` uri ` to configure a (cloud) KMS or an HSM.
111+ ` uri ` is formatted as ** kmstype:[ key=value;...] ?[ key=value&...] ** . The ** ;** -separated
112+ parameters identify the KMS, and ** &** -separated parameters contain credentials and additional configuration for those credentials.
113+
114+ Supported KMS types:
115+
116+ - ** YubiKey PIV** : Use ** yubikey:** URIs. Parameters: ** serial** , ** pin-value** , ** pin-source** , ** management-key** , ** management-key-source** .
117+
118+ - ** PKCS #11 ** : Use ** pkcs11:** URIs. Parameters: ** module-path** , ** token** , ** id** , ** object** , ** pin-value** , ** pin-source** .
119+
120+ - ** TPM 2.0** : Use ** tpmkms:** URIs. Parameters: ** name** , ** device** , ** attestation-ca-url** .
121+
122+ - ** Google Cloud KMS** : Use ** cloudkms:** URIs. Parameters: ** credentials-file** .
123+
124+ - ** AWS KMS** : Use ** awskms:** URIs. Parameters: ** region** , ** profile** , ** credentials-file** .
125+
126+ - ** Azure Key Vault** : Use ** azurekms:** URIs. Parameters: ** tenant-id** , ** client-id** , ** client-secret** , ** client-certificate-file** .
127+
128+ Examples:
129+
130+ ``` shell
131+ yubikey:pin-value=123456
132+ pkcs11:module-path=/usr/lib/softhsm/libsofthsm2.so; token=smallstep? pin-value=pass
133+ tpmkms:name=my-key; device=/dev/tpmrm0
134+ awskms:region=us-east-1
135+ azurekms:client-id=fooo; client-secret=bar; tenant-id=9de53416-4431-4181-7a8b-23af3EXAMPLE
136+ ```
137+
138+ For more information, see https://smallstep.com/docs/step-ca/cryptographic-protection/ .
111139
112140** --kty** =` kty `
113141The ` kty ` to build the certificate upon.
@@ -179,12 +207,22 @@ Rekey a certificate forcing the overwrite of the previous certificate and key
179207$ step ca rekey --force internal.crt internal.key
180208```
181209
182- Rekey a certificate which key is in a KMS, with another from the same KMS:
210+ Rekey a certificate using a KMS, with another from the same KMS:
211+ ``` shell
212+ $ step ca rekey --private-key ' yubikey:slot-id=9a?pin-value=123456' \
213+ yubikey.crt ' yubikey:slot-id=82?pin-value=123456'
214+ ```
215+
216+ Rekey a certificate using a KMS with the ` --kms ` flag:
183217``` shell
184218$ step ca rekey \
185219 --kms ' pkcs11:module-path=/usr/local/lib/softhsm/libsofthsm2.so;token=smallstep?pin-value=password' \
186- --private-key ' pkcs11:id=4002'
187- pkcs11.crt ' pkcs11:id=4001'
220+ --private-key ' pkcs11:id=4002' pkcs11.crt ' pkcs11:id=4001'
221+ ```
222+
223+ ``` shell
224+ $ step ca rekey --key yubikey:pin-value=123456 --private-key yubikey:slot-id=9a \
225+ yubikey.crt ' yubikey:slot-id=82
188226```
189227
190228Rekey a certificate providing the `--ca-url` and `--root` flags:
0 commit comments