Skip to content

Patroni connect etcd with TLS #15999

Closed Answered by karfrank
EdithChenLi asked this question in Q&A
Discussion options

You must be logged in to vote

@EdithChenLi I ran into the same error when I set up a Patroni cluster with client cert authentication today and found this issue when I looked for a solution.

The error is triggered by the following code:

if len(chains[0].Subject.CommonName) != 0 {
      http.Error(rw, "CommonName of client sending a request against gateway will be ignored and not used as expected", http.StatusBadRequest)
      return
}

https://github.com/etcd-io/etcd/blob/0073fd422528e7cb56fdf8b8a61d8751e3a281db/server/embed/serve.go#L419-L422C4

Clearly, etcd doesn't like the CommonName in the client certificate, so I issued one without a CN and everything is now working fine for me.

Hope this helps!

Replies: 11 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jmhbnz
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jmhbnz
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #15945 on June 02, 2023 11:37.