Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-97787

Accessing Confluence using PAT Token fails intermittently when multiple users access concurrently

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 8.5.14
    • None

      Issue Summary

      This issue is similar to the one reported in Jira side under JRASERVER-76340

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Provision a new Confluence environment
      2. Create two new users: "usera" and "userb"
      3. For each user, create a PAT (Personal Access Token)
        • Login directly with the username
        • Select your profile picture at the top right of the screen, then choose Settings > Personal Access Tokens
        • Click on Create Token and copy the token created.
      4. Now, replace the BASE_URL, the "pat" value for "usera" and the "pat" value for "userb" in the script attached ( PATTesting.py )
      5. Now, run the Python script:
        python3 PATTesting.py 
        

      Expected Results

      The script executes 1000 access attempts with the PAT Token per user. It is expected that all the access return a 200 OK response.

      Actual Results

      Some of the access attempts received a 401 Unauthorized response

      python3 PATTesting.py 
      Using instance: https://linux-79235.prod.atl-cd.net/confluence
      Max count: 1000
      Starting threads ...
      Waiting for threads to finish ...
      [Thread #1] HTTP 401 on attempt 1 for user usera!
      [Thread #2] HTTP 401 on attempt 40 for user userb!
      [Thread #1] HTTP 401 on attempt 48 for user usera!
      [Thread #2] HTTP 401 on attempt 74 for user userb!
      [Thread #1] HTTP 401 on attempt 84 for user usera!
      ...
      ...
      [Thread #1] HTTP 401 on attempt 938 for user usera!
      [Thread #2] HTTP 401 on attempt 965 for user userb!
      [Thread #2] HTTP 401 on attempt 999 for user userb!
      
      15 errors in 1000 attempts for user UserA.
      16 errors in 1000 attempts for user UserB.
      

      Workaround

      In this specific case that the issue is reproducible via a Python script, it will be possible to add a Add a retry logic in the script to re-initiate the script in case of failures.

          Form Name

            [CONFSERVER-97787] Accessing Confluence using PAT Token fails intermittently when multiple users access concurrently

            There are no comments yet on this issue.

              Unassigned Unassigned
              d8a006ac9dc7 Iker Alonso
              Affected customers:
              1 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated: