-
Notifications
You must be signed in to change notification settings - Fork 74
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
AttributeSource missing when updating api_protection definitions #281
Comments
Hi, AttributeSources is part of oidc object and not a parameter by itself. The default value for oidc is None during the update call. So if you only pass in accessPolicyName, then the update will not pass any oidc object and omission would be equivalent to delete. Many of the parameters have default values. So even if you don't pass in anything, the update will still pass the default values during the call so it would appear that those attributes did not change. |
Hi, |
Have you considered using the set() function? That will do an add() or an update() as needed. No need to execute a get() before an update in that case. |
I don't think set() will help in this case as the issue is not about whether to add or to update. The issue is that during update, omission is equivalent of letting update sending in default value. And for the case of oidc, the default value is None which is the equivalent of doing a delete using the update. The way to keep any particular attribute the same as existing values, as it was mentioned, is to do a get() first and then only modify the values that you actually want to change. |
When i call
ibmsecurity.isam.aac.api_protection.definitions.update
and i don't provide theoidc
parameter, the attribute sources previously attached are lost.Here is the ansible role i use to make this call :
where
update_oauth_definition_param
isaccessPolicyName
for instance. The accessPolicyName update is done as expected but i loose the attribute sources attached to the definition when doing so. Other definition attributes seam ok (their value is untouched by update).Is it a bug or am i using wrong this function ?
The text was updated successfully, but these errors were encountered: