-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Conversation
|
||
for name, schema := range fields { | ||
if _, ok := m[name]; ok { | ||
panic(fmt.Sprintf("adding field %q would overwrite existing field", name)) |
There was a problem hiding this comment.
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
CI Results: |
Build Results: |
There was a problem hiding this 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.
This PR adds helper methods to the Vault SDK that allow us to consistently apply the new fields needed for plugin WIF across integrations.