Missing users in the users export and GET Users REST API endpoint

XMLWordPrintable

    • 3
    • Severity 2 - Major
    • 3

      Issue Summary

      • Export > Users (feature of the Admin > Users page: <Base_URL>/admin/users) doesn't include all the users from Crowd directory
      • The list of users fetched by the GET Users REST API endpoint is also incomplete.
      • Bitbucket instances having a large number of user entries in the cwd_user table with usernames that contain special characters such as apostrophe are impacted

      This is reproducible on Data Center: yes

      Steps to Reproduce

      • Create a Bitbucket Instance with a large set of users (~60,000 users) with some users having special characters in the username such as an apostrophe using an Active directory or Crowd
      • Bitbucket should be connected to an external database such as Postgres having collation en_US.UTF-8
      • Note the count of the active and unique users from the cwd_user table in the database.
      • Export all users from Bitbucket's web interface and note the count of the unique users returned in the resulting CSV file.
      • Also run the GET Users REST API endpoint API and check the number of unique users returned in the total response for all pages.
      • Increment / decrement the size of the property page.max.user and repeat the tests and note the difference.
      • Note that customising this value may cause some missing users to appear but does not guarantee the correct export data.

      Expected Results

      • The export file, or the list of users fetched by the GET Users REST API endpoint contains the same number of unique users as the cwd_user table, with no duplicates.

      Actual Results

      • Some users are duplicated while others are missing.
      • The total number of users in the export file may be the same as the total number of users in the cwd_user table, but the export file is still incorrect.
      • Duplicates in the exported user list account for the difference between unique usernames and total number of users returned.

      Workaround

            Assignee:
            Charlie Wang
            Reporter:
            Priyata Waje
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: