hashicorp / hashicorp/consul

Add support for generating CSRs and using intermediate non-root certs to the `consul tls` command

Open
#6,267 0 comments 6 reactions 0 assignees View on GitHub
theme/tls type/enhancement
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

#### Feature Description

Currently the `consul tls` command can generate a CA (root cert / key) as well as server and client certificates. This requires having the root cert and key every place that you are generating certs.

This then requires either copying the root cert and key to all systems that need a certificate or copying each servers cert and key from the common place where the CA lives. Both of these scenarios involve copying key material around which is generally not a good practice.

Additionally it would be great to allow for signing certificates with an intermediate key rather than a root.

To fix all of this we should provide a way to:

1. Generate CSR instead of the final cert which can be copied around at will without ever transmitting the key material
2. Provide a way to sign CSRs
3. Provide a way to generate intermediate ca certs and then use them for signing.

One other bonus would be to have a command like `consul tls ca agent` or something similar that could run a longer lived process to handle incoming CSR signing requests over the network and then return the signed cert. Obviously we would need some mechanism like unique single use tokens to be provided along with the CSR to ensure its coming from a known source and should be allowed to be signed. If it could be done though it could be an incredibly nice UX.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.