Add tokens to agents graphql endpoint
What does this MR do?
Adds a GraphQL endpoint to fetch a single cluster agent by name, which can include any associated agent tokens.
Documentation will be added/reviewed in bulk as part of #241493 (closed), as there are a handful of merge requests in progress in this area.
-
Target master when !38833 (merged) is merged
Query changes
Query with name
added (no records in production yet, but uses unique index on project_id
and name
):
SELECT
"cluster_agents".*
FROM
"cluster_agents"
WHERE
"cluster_agents"."project_id" = 278964
AND "cluster_agents"."name" = 'example'
Index Scan using index_cluster_agents_on_project_id_and_name on public.cluster_agents (cost=0.15..3.17 rows=1 width=64) (actual time=0.047..0.047 rows=0 loops=1)
Index Cond: ((cluster_agents.project_id = 278964) AND (cluster_agents.name = 'example'::text))
Buffers: shared hit=4
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Tiger Watson