google-cloud-kms-csr

command module
v0.0.0-...-ea6cec8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2022 License: Unlicense Imports: 15 Imported by: 0

README

CSR with Google Cloud KMS

Quick utility tool that creates a CSR cert and signs it with a private key coming from Google Cloud KMS or HSM. The private key never leaves Google, everyone is happy. The CSR can then be used to get cert from CA.

I would've done it with openssl, but there is no Google Cloud KMS engine available. (Sept. 2018)

Usage

go build -o csr
./csr -key <key-resource-id> -out my.csr --common-name MyOrg

Get the key-resource-id by running the following command:

gcloud kms keys versions list  --key <keyname> --keyring <keyring-name> --location=<region>

Key Resource Id Version has the following format:

projects/xxx/locations/xxx/keyRings/xxx/cryptoKeys/xxx/cryptoKeyVersions/xxx

Make sure to use an asymmetric key.

You can verify my.csr with:

openssl req -text -noout -verify -in my.csr

Google's application credentials are used for authenticating with the Google API. If you haven't done so already, you can set the application default credentials locally with:

gcloud auth application-default login

Docs

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL