Skip to content

Revoke an Agent Token from the UI

Anna Vovchenko requested to merge 336641-revoke-an-agent-token-from-the-ui into master

What does this MR do and why?

The MR adds a possibility to revoke agent tokens from the UI using the Revoke token button from the Tokens tab on the Agent page.

Definition of done

  • The revoke button is present in the agent access token list.
  • The revoke button is disabled for users with less than maintainer role.
  • For users with at least maintainer rights clicking on the button opens a confirmation popup.
  • The popup contains an input to confirm the revoke action and a cancel button.
  • After the token was revoked, the token list gets updated.

Screenshots or screen recordings

The flow:

Screen_Recording_2022-03-23_at_01.00.41

The Revoke token button in the tokens list:

Maintainer Developer
Screenshot_2022-03-23_at_01.03.19 Screenshot_2022-03-22_at_20.39.42

The revoke confirmation modal:

Initial state Correct token name entered
Screenshot_2022-03-24_at_14.22.12 Screenshot_2022-03-24_at_14.23.14

The successful revoke toast:

Screenshot_2022-03-22_at_20.40.09

How to set up and validate locally

  1. Visit Infrastructure -> Kubernetes Clusters.
  2. Select an agent from the agents list or create one using Actions button.
  3. On the agent's page select the Tokens tab.
  4. Click the Revoke token button and verify the result.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Review progress:

Related to #336641 (closed), #296741 (closed)

Edited by Anna Vovchenko

Merge request reports