Defect #606
closedIdmIdentityService.updateAuthorityChange should be thread-safe
100%
Description
The method updateAuthorityChange is not thread-safe. When called multiple times at the same time for the same identities, it could happen that some identity would be stored in the AuthChangeRepository multiple times. That would cause exceptions during authentization of this identity (wouldn't be able to authenticate).
(It happened to me when I tried to use this method in auth filter, so it was called several times parallel for the same user. The only fix was to clear idm_authority_change table in DB.)
Also the method shouldn't change the input parameter "identities" - the programmer doesn't expect it :-)
Related issues
Updated by Radek Tomiška over 7 years ago
- Assignee changed from Vít Švanda to Jan Helbich
Updated by Jan Helbich about 7 years ago
- Assignee changed from Jan Helbich to Radek Tomiška
The method has been refactored while working on some other issue and behaves correctly now.
Unfortunately I could not reproduce the thread-unsafe issue.
I propose an addion of unique constraint onto the idm_authority_change table#identity.
Updated by Vít Švanda about 7 years ago
- Target version changed from Diamond (7.4.0) to Emerald (7.5.0)
Updated by Radek Tomiška about 7 years ago
- Target version deleted (
Emerald (7.5.0))
Updated by Radek Tomiška over 6 years ago
- Status changed from New to Closed
- Target version set to Lapis (8.2.0)
- % Done changed from 0 to 100
Solved by #636, review will be done there.
Updated by Radek Tomiška over 6 years ago
- Related to Task #636: Reduce JWT token size added