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

Partial update user race condition losing updates #302

Open
AlyaEru opened this issue May 17, 2022 · 1 comment
Open

Partial update user race condition losing updates #302

AlyaEru opened this issue May 17, 2022 · 1 comment
Labels
bug Something isn't working no-stalebot

Comments

@AlyaEru
Copy link

AlyaEru commented May 17, 2022

Describe the bug?

I strongly suspect this is actually a bug with the underlying API, and not the SDK, but okta support directed me here. See my support case.

Partial update requests to update user profile fields are not actually updating the profile fields in Okta. From what I can tell, this is happening when two simultaneous update requests are running for the same user with different profile fields.

Here is a log of a recent case. I logged the User Profile used to make the request and the Profile from the User returned by Okta.

[okta] UPDATE USER -> Start: updating user to 
&map[primaryPhone:<redacted user's phone number>] 
[okta] UPDATE USER -> Start: updating user to 
&map[contactPreference:email] 
[okta] UPDATE USER -> Back: updated user 
&map[clientDisplayName:Contra Costa County contactPreference:email email:<redacted email> firstName:<redacted> lastName:<redacted> locale:en_US login:<redacted> mobilePhone:<nil> originURL:https://pay-hub.net/ca-contracosta/tax/checkout preferredLanguage:en-US prsId:<redacted> secondEmail:<nil> siteRegisteredFrom:ca-contracosta/tax] 
[okta] UPDATE USER -> Back: updated user 
&map[clientDisplayName:Contra Costa County contactPreference:email email:<redacted> firstName:<redaccted> lastName:<redacted> locale:en_US login:<redacted> mobilePhone:<nil> originURL:https://pay-hub.net/ca-contracosta/tax/checkout preferredLanguage:en-US prsId:<redacted> secondEmail:<nil> siteRegisteredFrom:ca-contracosta/tax] 

See how PrimaryPhone is not even included in either update response.

What is expected to happen?

Each partial update request should successfully update that user attribute in okta and return the current profile, including the newly updated field.

What is the actual behavior?

When two simultaneous partial updates occur, the first update is lost; the updated field is not saved with the user, and the updated field is not returned with the user.

Reproduction Steps?

Call PartialUpdateUser twice, such that the requests overlap. In each request, include one single profile attribute to update, a different attribute for each request. If you have successfully reproduced, the update from the first request will not "stick" and will not be included in the response object.

Note: You may have to do this many times to see a failure case.

Additional Information?

No response

Golang Version

1.15.10

SDK Version

v2.3.0

OS version

No response

@AlyaEru AlyaEru added the bug Something isn't working label May 17, 2022
@github-actions
Copy link

github-actions bot commented Jun 1, 2022

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

@github-actions github-actions bot added the stale label Jun 1, 2022
@monde monde added no-stalebot and removed stale labels Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-stalebot
Projects
None yet
Development

No branches or pull requests

2 participants