hashicorp / hashicorp/consul

Confusing error message with SPIFFE verification.

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

Description

I am currently getting the following error when connect verifies the SPIFFE URI:
```
peer certificate mismatch got spiffe://36ca82ca-9d82-cf7a-3ac8-3ac58e297d57.consul/ns/default/dc/dc1/svc/uuid-api, want spiffe:///ns/default/dc/dc1/svc/backend1
```
While this is absolutely correct and the two services do indeed not match, I think the expected URI should include the interpolated hostname (trust domain) to prevent unnecessary confusion. This is probably just a matter of moving https://github.com/hashicorp/consul/blob/b678eabbf50eff64603c30ae55f752985b0d9e91/connect/tls.go#L182 down and use `expectURI` to construct the string instead.

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.