Enable filtering agent tokens by status
What does this MR do and why?
Adds a status
argument to the Agent tokens resolver, to allow retrieving only active (or revoked, if necessary) tokens.
Screenshots or screen recordings
GraphQL request:
{
project(fullPath: "path/to/agent-config") {
clusterAgent(name:"my-agent") {
name
tokens(status: REVOKED) {
nodes {
name
status
}
}
}
}
}
Response:
{
"data": {
"project": {
"clusterAgent": {
"name": "my-agent",
"tokens": {
"nodes": [
{
"name": "my-token",
"status": "REVOKED"
}
]
}
}
}
}
}
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Robert May