Fix bound_claims not getting unset for vault_jwt_auth_backend_role - #1469
Conversation
bound_claims not getting removed for vault_jwt_auth_backend_rolebound_claims not getting unset for vault_jwt_auth_backend_role
| } | ||
| data["bound_claims"] = boundClaims | ||
| } else { | ||
| data["bound_claims"] = make(map[string]interface{}, 0) |
There was a problem hiding this comment.
The empty map is defined on line 396 above. If we move that before the conditional we can drop the else{} and always set bound_claims
| "verbose_oidc_logging", "false"), | ||
| ), | ||
| }, | ||
| // Repeat test case again to remove attributes like `bound_claims` |
There was a problem hiding this comment.
Would you mind moving these test check funcs to a common set that can be shared between the various steps. Please use
as an example.The resource name/path should also be factored out to a test variable called resourceName, e.g.
Thanks
There was a problem hiding this comment.
I reduced a bit of code repetition but I did not refactor out the test steps into a separate function yet. This seems like more of a refactoring effort that might make the size of this PR bigger than necessary.
There was a problem hiding this comment.
Ok, we will take care of that after merge. Thanks!
benashz
left a comment
There was a problem hiding this comment.
Thank for your contribution to HashiCorp!
Community Note
When
bound_claimsinvault_jwt_auth_backend_roleis unset, it does not get removed from the role, resulting in a permanent diff and unexpected results.Release note for CHANGELOG:
Output from acceptance testing:
If the
elseclause I added in the resource is removed, the test above fails withthereby confirming the bug.