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
identity: enforce key param and key existence on role creation #12208
Conversation
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.
Looks good overall. Just a couple of small readability improvement suggestions
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.
Suggestion for adding two additional test cases, implementation looks good though!
We should mark the param as required in the path definition: vault/vault/identity_store_oidc.go Lines 243 to 246 in a0e2449
|
What I was trying to express there is that #12151 introduces a bug. An attempt to create a role with a key name that does not yet exist will fail with the error:
This is what was discovered in the ENT tests that broke. So if we are shipping #12151 in 1.8.1, I think there should be another fix to allow creating a role with a non-existent key. |
…corp#12208) * identity: handle creation of role without a key parameter * update docs to not require key parameter for creation of a role * add changelog * require key param when creating a role * lock create/update role; remove now redundant key check * update changelog and UTs * update change log to refelct actual implementation * remove deprecated test case
This fixes a bug found after merging: #12151.
A role should not be allowed to be created without a key parameter. Additionally, the key must exist.