IQSS / IQSS/dataverse

Inconsistencies in Admin API based user listing

Open
#10,892 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: Account & User Info Feature: API Size: 10 Type: Bug User Role: API User User Role: Superuser
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

What steps does it take to reproduce the issue?
Look at the outputs of /api/admin/authenticatedUsers and /api/admin/list-users

When does this issue occur?
When using the API to retrieve all users

Which page(s) does it occurs on?
API

What happens?

  1. I must supply a Superuser Admin Token to both endpoints in addition to my unblock-key. This doesn't make sense and should be mitigated (instead of access policy unblock-key or localhost allow a policy to use tokens, OIDC or API style).
  2. The /list-users endpoint is inconsistent with it's naming. Why isn't this paginated, searchable output enabled under /authenticatedUsers?
  3. The /list-users endpoint doesn't use the JsonPrinter.json(AuthenticatedUser) to include the persistentUserId in the JSON output, while the /authenticatedUsers endpoints do. Instead, it uses the AuthenticatedUser.toJson() converter, which is solely used for this purpose, nowhere else except a test of the AuthenticatedUserclass.
  4. Why is the /authenticatedUsers endpoint deprecated, when there are a lot more endpoints using this path?
  5. Why is the API endpoint to change a user identifier under /api/users instead of /api/admin/authenticatedUsers when it does require a superuser token anyway?
  6. Why aren't there simple CRUD like endpoints for /api/admin/authenticatedUsers/{id}/{attribute}?

To whom does it occur (all users, curators, superusers)?
Superusers, Admins

What did you expect to happen?
See list above.

Which version of Dataverse are you using?
4.20 and develop.

Any related open or closed issues to this bug report?
None that I could find.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the implementations and responses for /api/admin/authenticatedUsers and /api/admin/list-users, then read AuthenticatedUser.toJson(), JsonPrinter.json(AuthenticatedUser), and the referenced AuthenticatedUser test. The issue bundles authentication, pagination, serialization, deprecation, identifier changes, and CRUD design; done requires an agreed scope and tests documenting the selected consistent behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, authentication, backend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.