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

Properly handle role.AliasNameSource migration #135

Merged
merged 2 commits into from
Feb 7, 2022

Conversation

benashz
Copy link
Contributor

@benashz benashz commented Feb 4, 2022

#133 details an issue where the role configuration cannot be updated when alias_name_source is unset in the request. The result was a validation failure for this field. We can handle this situation be setting the role's alias name source to be default.

  • set role.AliasNameSource to be the default if both it and its field
    value are unset instead of returning an error
  • add tests for the update operation

Design of Change

How was this change implemented?

See above

Related Issues/Pull Requests

Closes #133
Relates to #134

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

- set role.AliasNameSource to be the default if both it and its field
  value are unset instead of returning an error
- add tests for the update operation
@benashz benashz requested a review from tomhjp February 4, 2022 19:17
path_role_test.go Outdated Show resolved Hide resolved
Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
@benashz benashz merged commit c9fa6ac into main Feb 7, 2022
benashz added a commit that referenced this pull request Feb 7, 2022
- set role.AliasNameSource to be the default if both it and its field
  value are unset instead of returning an error
- add tests for the update operation

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
@benashz benashz mentioned this pull request Feb 7, 2022
@benashz benashz deleted the VAULT-4975/handle-empty-alias-name-source-on-update branch February 7, 2022 15:04
benashz added a commit that referenced this pull request Feb 7, 2022
- set role.AliasNameSource to be the default if both it and its field
  value are unset instead of returning an error
- add tests for the update operation

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
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.

Re-configuring role fails after upgrading existing deployment to Vault 1.9.x
2 participants