feat(token-cache): add token-cache commands for GitLab Agent tokens
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
Description
Implement new glab cluster agent token-cache command group to manage
cached agent tokens created by glab cluster agent get-token.
Features:
-
glab cluster agent token-cache list- List cached tokens from keyring and filesystem cache with filtering by agent IDs and cache sources -
glab cluster agent token-cache clear- Clear cached tokens with automatic revocation on GitLab server (configurable)
Both commands support:
-
--agentflag to filter by specific agent IDs -
--keyringand--filesystemflags to control cache sources -
--revokeflag on clear command (default: true)
The cache was previously a black box to users. These commands provide visibility and control over cached credentials used by the Kubernetes credential plugin.
Related Issues
Resolves #7953 (closed)
How has this been tested?
Screenshots (if appropriate):
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap
Closes #7953 (closed)
Edited by Swapnaneel Patra