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
Backport of Support clearing an identity alias' custom_metadata into release/1.9.x #13704
Backport of Support clearing an identity alias' custom_metadata into release/1.9.x #13704
Conversation
5debdfa
to
7e1c191
Compare
if err != nil { | ||
return nil, err | ||
} | ||
customMetadata = data.(map[string]string) |
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.
Could a client craft a request that causes a panic if they set custom_metadata
to something that's not a map[string]string
?
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.
This is not my PR, but I reviewed the original prior to the backport. This type assertion should be safe due to the GetOk
call above. The custom_metadata
field is defined as framework.TypeKVPairs
which is ultimately parsed as map[string]string
.
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.
Thanks for the explainer! TIL
if err != nil { | ||
return nil, err | ||
} | ||
customMetadata = data.(map[string]string) |
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.
Thanks for the explainer! TIL
…clear-custom-metadata/primarily-bright-lionfish
Backport
This PR is auto-generated from #13395 to be assessed for backporting due to the inclusion of the label backport/1.9.x.
The below text is copied from the body of the original PR.
Previously, an update to an entity alias supports updating the
custom_metadata as long as the update is not empty, which makes it
impossible to clear the metadata values completely.
Fixes: