Revoking Cluster Access Token with same name deletes earliest token
Summary
- Once a Kubernetes cluster has been created, multiple access tokens for the cluster
- Multiple keys can be created with the same name
- When a user attempts to revoke an access token with a duplicate name, the interface creates two modals, one for each duplicate
- The modal that appears at the front is for the newest token, with the modal for the older token being hidden behind it
Steps to reproduce
- Create a Cluster agent in a namespace
- This will create a Cluster access token with the same name as the cluster agent
- Create a Cluster access token with the same name as the automatically created token
- Revoke the newest token
- Note that:
- After dismissing one modal there is a duplicate modal behind the dismissed one
- Note that the oldest token was removed
What is the current bug behavior?
- The token nominated for revocation by the user is not necessarily the token that is revoked; instead the oldest token will be removed first
What is the expected correct behavior?
- The token selected by the user should be the one revoked
- Only one modal should appear
Relevant logs and/or screenshots
- Creating the duplicate cluster access token
- The resulting duplicate access tokens:
- Removing the newest key:
- Results in the oldest key being removed:
Possible fixes
- The issue is likely in the revocation mutation here
- I'm not sure if the
REVOKE_TOKEN_MODAL_IDconstant is implicated here



