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

vault: clone client TLS config and headers for status checks #476

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

aead
Copy link
Member

@aead aead commented Aug 15, 2024

This commit improves the Vault status check logic. KES has to clone the Vault client since it has to clear the namespace header for status checks.

However, KES should use the same TLS client config and token configured on the client when performing such status checks. KES has to opt-in to this behavior since the Vault SDK doesn't do this by default.

This commit improves the Vault status check logic. KES has to
clone the Vault client since it has to clear the namespace header
for status checks.

However, KES should use the same TLS client config and token configured
on the client when performing such status checks. KES has to opt-in
to this behavior since the Vault SDK doesn't do this by default.

Signed-off-by: Andreas Auernhammer <[email protected]>
Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -105,6 +105,8 @@ func Connect(ctx context.Context, c *Config) (*Store, error) {

config := vaultapi.DefaultConfig()
config.Address = c.Endpoint
config.CloneTLSConfig = true // Required for status checks
config.CloneToken = true // Required for status checks
Copy link
Member

Choose a reason for hiding this comment

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

Another ridiculous SDK

@harshavardhana harshavardhana merged commit ef3f85c into master Aug 15, 2024
8 checks passed
@harshavardhana harshavardhana deleted the vault-clone-client branch August 15, 2024 15:49
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.

3 participants