Skip to content

Retain resource access token bot users after revocation

Nick Malcolm requested to merge 462217-retain-token-user-after-revoke into master

What does this MR do and why?

Part 1 of List Expired Project and Group Access Tokens (#462217)

This change is behind a new feature flag, retain_resource_access_token_user_after_revoke.

Resource Access Tokens (a.k.a. Group and Project Access Tokens) are implemented by creating "bot" users, giving it membership to the resource, and generating a Personal Access Token for that bot. When a Resource Access Token is revoked, the bot user is scheduled for deletion.

When the bot user is deleted the revoked token no longer has any relation to the resource. This makes it impossible to know what a revoked token had access to in the past.

With this change, when the FF is enabled, the bot user will be retained indefinitely.

In a subsequent MR we will add the UI to display information on revoked tokens.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #462217

Edited by Nick Malcolm

Merge request reports