hashicorp / hashicorp/consul

Consul Connect CA: can't change provider

Open
#9,268 7 comments 0 reactions 1 assignee Claimed by @rboyer View on GitHub
theme/certificates theme/connect theme/consul-vault
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

Hi all,

I'm getting error while trying to change Connect CA provider. Here are steps I've taken:

```
$ consul version
Consul v1.8.2
Revision ba7d9435e
```

1. enable Connect with Vault as CA provider:
```
$ consul connect ca get-config
{
"Provider": "vault",
"Config": {
"Address": "http://localhost:8200",
"IntermediateCertTTL": "8760h0m0s",
"IntermediatePKIPath": "consul-connect-intermediate",
"LeafCertTTL": "74h",
"RootPKIPath": "consul-connect-root",
"RotationPeriod": "24h",
"Token": "5a6a08b4-e54c-38ee-acf0-387dac8fxxxx"
},
"State": null,
"CreateIndex": 236021312,
"ModifyIndex": 251656879
}
```
2. Try to change provider to `consul`:

- Config to load (taken from working dev environment)
```
$ cat connect_consul_ca.json
{
"Provider": "consul",
"Config": {
"IntermediateCertTTL": "8760h",
"LeafCertTTL": "72h",
"RotationPeriod": "2160h"
}
}
```
- Try to upload config
```
$ connect ca set-config -config-file=connect_consul_ca.json
Error setting CA configuration: Unexpected response code: 500 (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

)
```

I tried to disable connect (remove connect stanza and rolling restart all servers) and enable it (provider set to `consul`) again but no luck, `consul connect ca get-config` still shows Vault as CA.

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.