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

config: fix some issues with workload identity and multi Consul and Vault #18590

Merged
merged 3 commits into from
Sep 27, 2023

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Sep 26, 2023

Breaking up #18534 into more manageable pieces, this PR fixes some small bugs in configuration parsing and handling of workload identity and multi Consul and Vault.

Each commit contains a specific bug fix.

Capture the loop variable when parsing multiple Consul and Vault
configuration blocks so the duration parse function uses the correct
field when it's called later on.
When setting up the multiple Vault clients, the code was always loading
the default configuration, resulting in all clients to be configured the
same way.
Ensure `WorkloadIdentityConfig.Copy()` does not return the original
pointer for the `TTL` field.
@lgfa29 lgfa29 added this to the 1.7.0 milestone Sep 26, 2023
@lgfa29 lgfa29 changed the title config: fix some issues with worload identity and multi Consul and Vault config: fix some issues with workload identity and multi Consul and Vault Sep 26, 2023
vaultClient, err := vaultclient.NewVaultClient(c.GetConfig().VaultConfig, c.logger, c.deriveToken)
vaultClient, err := vaultclient.NewVaultClient(vaultConfig, c.logger, c.deriveToken)
Copy link
Contributor Author

@lgfa29 lgfa29 Sep 26, 2023

Choose a reason for hiding this comment

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

This fix will be tested in the ENT repo since GetVaultConfigs() only returns the default config in CE.

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@lgfa29 lgfa29 merged commit 1924196 into main Sep 27, 2023
@lgfa29 lgfa29 deleted the b-fix-vault-config branch September 27, 2023 17:41
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants