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

Ensure a consistent TLS configuration (#173) (#178) - backport to 1.11 #190

Merged
merged 3 commits into from
Mar 23, 2023

Conversation

benashz
Copy link
Contributor

@benashz benashz commented Mar 23, 2023

This is a backport of #173 to release/vault-1.11.x. It also pulls in #162 since we need to test/build with go-1.19.

  • Ensure a consistent TLS configuration for k8s API requests

Previously, it was possible for the http.Client's Transport to be missing the necessary root CAs to ensure that all TLS connections between the auth engine and the Kubernetes API were validated against a configured set of CA certificates.

This fix ensures that the http.Client's Transport is always consistent with the configured CA cert chain, by introducing a periodic TLS configuration checker that is started as part of the backend's initialization.

Other fixes:

  • only update the client's transport when the CA certificate pool has changed.

Overview

A high level description of the contribution, including:
Who the change affects or is for (stakeholders)?
What is the change?
Why is the change needed?
How does this change affect the user experience (if at all)?

Design of Change

How was this change implemented?

Related Issues/Pull Requests

[ ] Issue #1234
[ ] PR #1234

Contributor Checklist

[ ] Add relevant docs to upstream Vault repository, or sufficient reasoning why docs won’t be added yet
My Docs PR Link
Example
[ ] Add output for any tests not ran in CI to the PR description (eg, acceptance tests)
[ ] Backwards compatible

* Ensure a consistent TLS configuration for k8s API requests

Previously, it was possible for the http.Client's Transport to be
missing the necessary root CAs to ensure that all TLS connections
between the auth engine and the Kubernetes API were validated against a
configured set of CA certificates.

This fix ensures that the http.Client's Transport is always consistent
with the configured CA cert chain, by introducing a periodic TLS
configuration checker that is started as part of the backend's
initialization.

Other fixes:
- only update the client's transport when the CA certificate pool has
  changed.

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
@benashz benashz requested review from ncabatoff and removed request for ncabatoff March 23, 2023 16:52
* update go and k8s versions

go 1.19.1
k8s up to 1.25.0

* updated x/net and x/sys

go get golang.org/x/net@v0.0.0-20220906165146-f3363e06e74c
go get golang.org/x/sys@v0.0.0-20220728004956-3c1f35247d10

* make fmt

making gofumpt happy

* update chart and vault version

Default to k8s 1.25.0
use chart 0.22.0
use vault 1.11.3
@benashz benashz changed the title Ensure a consistent TLS configuration (#173) (#178) Ensure a consistent TLS configuration (#173) (#178) - backport to 1.11 Mar 23, 2023
@benashz benashz requested review from tvoran and tomhjp March 23, 2023 17:05
Copy link
Contributor

@swenson swenson left a comment

Choose a reason for hiding this comment

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

LGTM

@benashz benashz merged commit 82058b0 into release/vault-1.11.x Mar 23, 2023
@benashz benashz deleted the VAULT-11590/vault-1.11-backport branch March 23, 2023 17:18
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.

None yet

3 participants