Add internal API endpoint for agentw info

What does this MR do and why?

Add internal API endpoint for agentw info

See Add Rails endpoint to get agent info for agentw (#550130 - closed) • Chad Woolley • 18.4 for details

References

Screenshots or screen recordings

Before After

How to set up and validate locally

Full integration test

  1. Test using integration branch with the commits from this MR copied in: Draft: Agentw Rails Integration MR for vtak - D... (!197262 - closed)
  2. Docs for additional manual setup are in Add workspace tunnelling grpc service (gitlab-org/cluster-integration/gitlab-agent!2699 - merged) (work is in progress to get all of this configured automatically in the GDK).

Easier testing (skip KAS authentication)

If you just want to test the behavior in this MR without having to invoke it via KAS with the JWT authentication, you can do the following:

  1. Comment out the line authenticate_gitlab_kas_request! in the endpoint
  2. gdk restart rails-web
  3. Create a workspace, then get the token value of the associated WorkspaceToken
  4. curl the endpoint with the token value in the header.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Chad Woolley

Merge request reports

Loading