IQSS / IQSS/dataverse

System creates unwanted API token

Open
#9,898 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

During the past two years or so I've experienced several times that an API token was created for my user (superuser) without me clicking on the Create Token button.

To illustrate the latest occurrence of this behavior: This morning I created an API token which I needed to run a regular API script. After I ran the script, I revoked the token. I even clicked on other buttons on the page, refreshed the page, and navigated back to check whether no token was defined anymore. The token I used in the script started with "7d2a". When I checked this evening, a new token starting with "2c4d" was displayed.

What steps does it take to reproduce the issue?

  1. Click on your username on the top right of the Dataverse page.
  2. Click on API token.
  3. Create a token and run an API call.
  4. Revoke the token.
  5. After a while, return to the API token page.
  • When does this issue occur?
    Sporadically, as described above.

  • Which page(s) does it occurs on?
    The API Token page.

  • What happens?
    See description above.

  • To whom does it occur (all users, curators, superusers)?
    I've only tested this as a superuser.

  • What did you expect to happen?
    The token being permanently revoked and no new token being created until I create a new one.

Which version of Dataverse are you using?
5.13

Any related open or closed issues to this bug report?
No.

Screenshots:
No.

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 at the API Token page and reproduce the create, API-call, revoke, and return sequence described in the issue. Trace the token lifecycle to determine why a token appears without a new click; the fix is complete when a revoked token stays absent and no replacement is created unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authentication, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.