Debian Codegraph @

command/ca/provisioner/provisioner.go

raw symbols SCIP
1 package provisioner
2
3 import "github.com/urfave/cli"
4
5 // Command returns the jwk subcommand.
6 func Command() cli.Command {
7 return cli.Command{
8 Name: "provisioner",
9 Usage: "create and manage the certificate authority provisioners",
10 UsageText: "step ca provisioner <subcommand> [arguments] [global-flags] [subcommand-flags]",
11 Subcommands: cli.Commands{
12 listCommand(),
13 getEncryptedKeyCommand(),
14 addCommand(),
15 removeCommand(),
16 },
17 Description: `The **step ca provisioner** command group provides facilities for managing the
18 certificate authority provisioner.
19
20 A provisioner is an entity that controls provisioning credentials, which are
21 used to generate provisioning tokens.
22
23 Provisioning credentials are simple JWK key pairs using public-key cryptography.
24 The public key is used to verify a provisioning token while the private key is
25 used to sign the provisioning token.
26
27 Provisioning tokens are JWT tokens signed by the JWK private key. These JWT
28 tokens are used to get a valid TLS certificate from the certificate authority.
29 Each provisioner is able to manage a different set of rules that can be used to
30 configure the bounds of the certificate.
31
32 In the certificate authority, a provisioner is configured with a JSON object
33 with the following properties:
34
35 * **name**: the provisioner name, it will become the JWT issuer and a good
36 practice is to use an email address for this.
37 * **type**: the provisioner type, currently only "jwk" is supported.
38 * **key**: the JWK public key used to verify the provisioning tokens.
39 * **encryptedKey** (optional): the JWE compact serialization of the private key
40 used to sign the provisioning tokens.
41 * **claims** (optional): an object with custom options for each provisioner.
42 Options supported are:
43 * **minTLSCertDuration**: minimum duration of a certificate, set to 5m by
44 default.
45 * **maxTLSCertDuration**: maximum duration of a certificate, set to 24h by
46 default.
47 * **defaultTLSCertDuration**: default duration of the certificate, set to 24h
48 by default.
49 * **disableRenewal**: whether or not to disable certificate renewal, set to false
50 by default.
51
52 ## EXAMPLES
53
54 List the active provisioners:
55 '''
56 $ step ca provisioner list
57 '''
58
59 Retrieve the encrypted private jwk for the given kid:
60 '''
61 $ step ca provisioner jwe-key 1234 --ca-url https://127.0.0.1 --root ./root.crt
62 '''
63
64 Add a single provisioner:
65 '''
66 $ step ca provisioner add [email protected] max-laptop.jwk --ca-config ca.json
67 '''
68
69 Remove the provisioner matching a given issuer and kid:
70 '''
71 $ step ca provisioner remove [email protected] --kid 1234 --ca-config ca.json
72 '''`,
73 }
74 }