Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepend certs instead of append #48

Merged
merged 1 commit into from
Apr 28, 2021
Merged

Prepend certs instead of append #48

merged 1 commit into from
Apr 28, 2021

Conversation

qinqon
Copy link
Owner

@qinqon qinqon commented Apr 27, 2021

To implement cert overlap multiple pub keys has to life at the cert
bundle currectly this is implemented appending new certs but this is not
ok from TLS perspective since the first public key or "leaf" has to
match with the private key [1].

[1] https://github.com/golang/go/blob/master/src/crypto/tls/tls.go#L292-L294

Test PR on kubernetes-nmstate nmstate/kubernetes-nmstate#734
Test PR on kubemacpool k8snetworkplumbingwg/kubemacpool#289

Signed-off-by: Quique Llorente [email protected]

To implement cert overlap multiple pub keys has to life at the cert
bundle currectly this is implemented appending new certs but this is not
ok from TLS perspective since the first public key or "leaf" has to
match with the private key [1].

[1] https://github.com/golang/go/blob/master/src/crypto/tls/tls.go#L292-L294

Signed-off-by: Quique Llorente <[email protected]>
@qinqon qinqon requested review from RamLavi and phoracek April 28, 2021 05:10
qinqon added a commit to qinqon/kubernetes-nmstate that referenced this pull request Apr 28, 2021
qinqon added a commit to qinqon/kubemacpool that referenced this pull request Apr 28, 2021
Copy link
Collaborator

@RamLavi RamLavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@qinqon qinqon merged commit 19cf13a into master Apr 28, 2021
qinqon added a commit that referenced this pull request Apr 28, 2021
Priori v0.15.0 the cert overlap was implemented adding appending new
certs but this is not correct [1], latest version of the
kube-admission-webhook lib do a prepend to comply with TLS verification
at golang web server, this introduce a problem at upgrades since it will
take into account the cert at the end but it will not point to the last
one.

[1] #48

Signed-off-by: Quique Llorente <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants