hashicorp / hashicorp/consul

Connect: CA change

Open
#6,501 3 comments 5 reactions 0 assignees View on GitHub
theme/certificates theme/connect theme/consul-vault theme/operator-usability type/bug
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

Hi Team !

I'm trying to force Connect to use `consul` as CA **after** it was enabled with `vault` as CA provider.
Long story short, I tried to configure Connect to use Vault as CA but I've messed up configuration (Vault token didn't have enough capabilities to configure PKI backend) and wanted to get back to "defaults" (`provider=consul`) but moving from Vault to Consul as CA provider doesn't work.

#### Reproduction Steps
1. Enable Connect with Vault as CA
2. Change CA provider to `consul` (and restart all servers to apply change)
3. `consul connect ca get-config` will still show old Consul Connect setup (Vault as CA provider)

### Operating system and Environment details

OS: `Ubuntu 18.04 LTS`
Consul: `1.6.1` (both server & client)

### Debugging
I tried to update config using API and get this:
```
rpc error making call: error having Vault cross-sign cert: Error making API request.

URL: PUT http://localhost:8200/v1/consul-connect-root/root/sign-self-issued
Code: 500. Errors:

* 1 error occurred:
* error signing self-issued certificate: x509: requested SignatureAlgorithm does not match private key type
```
Config:
```
{
"Provider": "consul",
"Config": {
"LeafCertTTL": "72h",
"RotationPeriod": "2160h"
}
}
```
Also no effect after setting `PrivateKeyType` and `PrivateKeyBits`.

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.