Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,42 @@ flag exists so it can be configured in $STEPPATH/config/defaults.json.`,
}

KMSUri = cli.StringFlag{
Name: "kms",
Usage: "The <uri> to configure a Cloud KMS or an HSM.",
Name: "kms",
Usage: `The <uri> to configure a (cloud) KMS or an HSM.
<uri> is formatted as **kmstype:[key=value;...]?[key=value&...]**. The **;**-separated
parameters identify the KMS, and **&**-separated parameters contain credentials and additional configuration for those credentials.

: Supported KMS types:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want capi, mackms, softkms and sshagentkms here too, to make the list from https://github.com/smallstep/step-kms-plugin/blob/main/main.go#L19-L29 complete? They're not all as well-known as the ones you already listed, but capi can be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with just having the most common options shown, and if people dig into step-kms-plugin for the others. I guess I'm sensitive to the length of the help text.


**YubiKey PIV**
: Use **yubikey:** URIs. Parameters: **serial**, **pin-value**, **pin-source**, **management-key**, **management-key-source**.

**PKCS #11**
: Use **pkcs11:** URIs. Parameters: **module-path**, **token**, **id**, **object**, **pin-value**, **pin-source**.

**TPM 2.0**
: Use **tpmkms:** URIs. Parameters: **name**, **device**, **attestation-ca-url**.

**Google Cloud KMS**
: Use **cloudkms:** URIs. Parameters: **credentials-file**.

**AWS KMS**
: Use **awskms:** URIs. Parameters: **region**, **profile**, **credentials-file**.

**Azure Key Vault**
: Use **azurekms:** URIs. Parameters: **tenant-id**, **client-id**, **client-secret**, **client-certificate-file**.

: Examples:

'''
yubikey:pin-value=123456
pkcs11:module-path=/usr/lib/softhsm/libsofthsm2.so;token=smallstep?pin-value=pass
tpmkms:name=my-key;device=/dev/tpmrm0
awskms:region=us-east-1
azurekms:client-id=fooo;client-secret=bar;tenant-id=9de53416-4431-4181-7a8b-23af3EXAMPLE
'''

For more information, see https://smallstep.com/docs/step-ca/cryptographic-protection/.`,
}

AttestationURI = cli.StringFlag{
Expand Down