Inconsistencies in Admin API based user listing
Nobody has claimed this yet.
- 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?
- 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).
- The
/list-usersendpoint is inconsistent with it's naming. Why isn't this paginated, searchable output enabled under/authenticatedUsers? - The
/list-usersendpoint doesn't use theJsonPrinter.json(AuthenticatedUser)to include thepersistentUserIdin the JSON output, while the/authenticatedUsersendpoints do. Instead, it uses theAuthenticatedUser.toJson()converter, which is solely used for this purpose, nowhere else except a test of theAuthenticatedUserclass. - Why is the
/authenticatedUsersendpoint deprecated, when there are a lot more endpoints using this path? - Why is the API endpoint to change a user identifier under
/api/usersinstead of/api/admin/authenticatedUserswhen it does require a superuser token anyway? - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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