Merged 3 weeks agoNovember 19, 2025
Related#7953This merge request adds new glab cluster agent token-cache commands to manage cached GitLab Agent tokens, providing users with visibility and control over credentials.
What was done
- Implemented a new
glab cluster agent token-cachecommand group. - Added
glab cluster agent token-cache listto list cached tokens from keyring and filesystem caches, with filtering by agent IDs and cache sources. - Added
glab cluster agent token-cache clearto remove cached tokens, supporting automatic revocation on the GitLab server. - Introduced command flags such as
--agentfor filtering, and--keyring,--filesystemto specify cache sources. - The
clearcommand also includes a--revokeflag (defaulting to true) for server-side token revocation.
Impact
- Users gain improved visibility and control over previously opaque cached GitLab Agent tokens.
- Enhances the management of credentials used by the Kubernetes credential plugin.
- Provides a direct way for users to list and clear their cached agent tokens.
Technical details
- New commands
listandclearwere added under theglab cluster agent token-cachesubcommand. - The implementation manages tokens stored in both keyring and filesystem cache mechanisms.
- Functionality includes filtering tokens based on agent IDs and specifying cache sources.
- The
clearcommand can trigger server-side token revocation through a configurable flag. - This feature is categorized as a new feature and includes relevant documentation.
Related issues
Metadata
- Source: gitlab
- Repo: gitlab-org/cli
- URL: https://gitlab.com/gitlab-org/cli/-/merge_requests/2443
- Merged: 2025-11-19T09:29:19Z