Skip to content

Commit b36ab17

Browse files
committed
Add more kms examples
1 parent 3da5429 commit b36ab17

5 files changed

Lines changed: 20 additions & 6 deletions

File tree

command/ca/certificate.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ Request a new certificate with an X5C provisioner:
109109
$ step ca certificate foo.internal foo.crt foo.key --x5c-cert x5c.cert --x5c-key x5c.key
110110
'''
111111
112+
Request a new certificate with an X5C using an certificate from a Yubikey:
113+
'''
114+
$ step ca certificate [email protected] joe.crt joe.key \
115+
--x5c-cert yubikey:slot-id=9a \
116+
--x5c-key 'yubikey:slot-id=9a?pin=value=123456'
117+
'''
118+
112119
**Certificate Templates** - With a provisioner configured with a custom
113120
template we can use the **--set** flag to pass user variables:
114121
'''

command/ca/rekey.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ $ step ca rekey --force internal.crt internal.key
8585
8686
Rekey a certificate using a KMS, with another from the same KMS:
8787
'''
88-
$ step ca rekey --private-key yubikey:slot-id=9a yubikey.crt yubikey:slot-id=82
88+
$ step ca rekey --private-key 'yubikey:slot-id=9a?pin-value=123456' \
89+
yubikey.crt 'yubikey:slot-id=82?pin-value=123456'
8990
'''
9091
9192
Rekey a certificate using a KMS with the <--kms> flag:
@@ -95,6 +96,11 @@ $ step ca rekey \
9596
--private-key 'pkcs11:id=4002' pkcs11.crt 'pkcs11:id=4001'
9697
'''
9798
99+
'''
100+
$ step ca rekey --key yubikey:pin-value=123456 --private-key yubikey:slot-id=9a \
101+
yubikey.crt 'yubikey:slot-id=82
102+
'''
103+
98104
Rekey a certificate providing the <--ca-url> and <--root> flags:
99105
'''
100106
$ step ca rekey --ca-url https://ca.smallstep.com:9000 \

command/ca/renew.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ $ step ca renew --mtls=false --force internal.crt internal.key
107107
108108
Renew a certificate which key is in a KMS:
109109
'''
110-
$ step ca renew yubikey.crt yubikey:slot-id=9a
110+
$ step ca renew yubikey.crt 'yubikey:slot-id=9a?pin-value=123456'
111111
'''
112112
113113
Renew a certificate which key is in a KMS, using the <--kms> flag:

command/ca/token.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,9 @@ Generate an X5C provisioner token using a certificate in a YubiKey. Note that a
173173
YubiKey does not support storing a certificate bundle. To make it work, you must
174174
add the intermediate and the root in the provisioner configuration:
175175
'''
176-
$ step ca token --kms yubikey:pin-value=123456 \
177-
--x5c-cert yubikey:slot-id=82 --x5c-key yubikey:slot-id=82 \
176+
$ step ca token \
177+
--x5c-cert yubikey:slot-id=82 \
178+
--x5c-key 'yubikey:slot-id=82?pin=value=123456' \
178179
internal.example.com
179180
'''
180181

command/certificate/create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ $ step certificate create --csr --template csr.tpl --san [email protected] \
332332
333333
Create a CSR using <step-kms-plugin>:
334334
'''
335-
$ step certificate create --csr --key yubikey:slot-id=9a [email protected] coyote.csr
335+
$ step certificate create --csr --key 'yubikey:slot-id=9a?pin=value=123456' [email protected] coyote.csr
336336
'''
337337
338338
Create a root certificate using <step-kms-plugin>:
339339
'''
340-
$ step certificate create --profile root-ca --key yubikey:slot-id=9a 'KMS Root' root_ca.crt
340+
$ step certificate create --profile root-ca --key 'yubikey:slot-id=9a?pin=value=123456' 'KMS Root' root_ca.crt
341341
'''
342342
343343
Create a root certificate using <step-kms-plugin> and the <--kms> flag:

0 commit comments

Comments
 (0)