Remove autopopulated entries from job token allowlist
What does this MR do and why?
Implements third part of #498125 (closed).
Dependent on !178595 (merged).
Feature is developed under the authentication_logs_migration_for_allowlist feature flag. This adds the button for removing entries in the job token allowlist that were added through the autopopulation feature.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
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
| Before | After |
|---|---|
![]() |
demo |
How to set up and validate locally
-
Enable the feature flag.
Feature.enable(:authentication_logs_migration_for_allowlist) -
Create sample authorization log records in the rails console:
project = Project.first project2 = Project.second project3 = Project.third Ci::JobToken::Authorization.create(accessed_project: project, origin_project: project2, last_authorized_at: 1.day.ago) Ci::JobToken::Authorization.create(accessed_project: project, origin_project: project3, last_authorized_at: 1.day.ago) Ci::JobToken::Authorization.all Ci::JobToken::ProjectScopeLink.where(source_project: project) -
Visit the Job token permissions section of the CI/CD settings.
<path-to-project>/-/settings/ci_cd#js-token-access. -
In CI/CD job token allowlist click Add > All projects in authentication log > Add entries. The allowlist will refresh with the new entries.
-
Click the on the disclosure dropdown > Remove only entries auto-added from authentication log > Remove entries 1 The allowlist will refresh with the new entries removed.

