Details

    • Steps to Reproduce:
      Hide

      Steps:

      1. Set up Keycloak in standalone mode with Postgres as DB
      2. Create admin user for master realm:
        1. Username: admin
        2. Password: admin
      3. Increase token lifespan to 5 min for master realm
      4. Create test user for master realm with email verified
      5. Set the UUID of the newly created user in the provided script (USERUUID in script.sh)
      6. The script sends requests to add the attribute "test" with the value "test" and the number of requests and the number of threads can be configured. With the default set values, it results in the same user attribute stored several times. (Look at the provided screenshots)

      Request sent:

      PUT http://localhost:8080/auth/admin/realms/master/users/44ce918c-d25a-4b15-b475-4ba077c1796b
      Content-Type: application/json;charset=UTF-8
      Accept: application/json
      Authorization: Bearer XXXXXX
      {
        "id": "44ce918c-d25a-4b15-b475-4ba077c1796b",
        "attributes": {
          "test": [
            "test"
          ]
        }
      }
      
      Show
      Steps: Set up Keycloak in standalone mode with Postgres as DB Create admin user for master realm: Username: admin Password: admin Increase token lifespan to 5 min for master realm Create test user for master realm with email verified Set the UUID of the newly created user in the provided script (USERUUID in script.sh) The script sends requests to add the attribute "test" with the value "test" and the number of requests and the number of threads can be configured. With the default set values, it results in the same user attribute stored several times. (Look at the provided screenshots) Request sent: PUT http: //localhost:8080/auth/admin/realms/master/users/44ce918c-d25a-4b15-b475-4ba077c1796b Content-Type: application/json;charset=UTF-8 Accept: application/json Authorization: Bearer XXXXXX { "id" : "44ce918c-d25a-4b15-b475-4ba077c1796b" , "attributes" : { "test" : [ "test" ] } }
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      Parallel calls to PUT on UserResource may result in the same attribute stored several times when the DB is Postgres (tested with version 9.6 and 12).
      See Jira Ticket for details: KEYCLOAK-7069
      The bug still exists in 6.0.1 and 8.0.0.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  ps.sara Sara Perez
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: