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

sdk: add identity token helpers to consistently apply fields in plugins #24925

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

vinay-gopalan
Copy link
Contributor

This PR adds helper methods to the Vault SDK that allow us to consistently apply the new fields needed for plugin WIF across integrations.

@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Jan 17, 2024
@vinay-gopalan vinay-gopalan added this to the 1.16.0-rc1 milestone Jan 17, 2024
@vinay-gopalan vinay-gopalan requested a review from a team January 17, 2024 22:25

for name, schema := range fields {
if _, ok := m[name]; ok {
panic(fmt.Sprintf("adding field %q would overwrite existing field", name))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

panicking here is consistent with other schema helpers in Vault and other repos (TFVP), can consider returning an error if there are any reasons to do so

Copy link

CI Results:
All Go tests succeeded! ✅

Copy link

Build Results:
All builds succeeded! ✅

Copy link
Contributor

@austingebauer austingebauer left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding the tests.

@vinay-gopalan vinay-gopalan enabled auto-merge (squash) January 17, 2024 23:07
@vinay-gopalan vinay-gopalan merged commit 5f3ff6b into main Jan 17, 2024
104 checks passed
@vinay-gopalan vinay-gopalan deleted the VAULT-23069/add-sdk-helpers branch January 17, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants