Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7374

Concurrent calls to refreshAccessToken() fails with SQL constraint violation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.1.12, 3.2.0
    • Component/s: JAX-RS Security
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When recycleRefreshTokens=false concurrent calls to refreshAccessToken() cause SQLException (2 accessTokens are created simultaneously and added to RefreshToken#accessTokens with the same index from different threads)

      Batch entry 0 insert into RefreshToken_accessTokens (RefreshToken_tokenKey, accessTokens_ORDER, accessTokens) values ('fced31aaba6723ecc5956721e8f029f1', 1, '8c559d9f738f33a1b866e7172c9e5644') was aborted: ERROR: duplicate key value violates unique constraint "refreshtoken_accesstokens_pkey"
        Detail: Key (refreshtoken_tokenkey, accesstokens_order)=(fced31aaba6723ecc5956721e8f029f1, 1) already exists. 
      

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              vgagara-talend Viacheslav Gagara
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: