Hide cell routing info from runner short token
What does this MR do?
This MR removes cell routing information embedded in runner authentication tokens. For example:
cell | old token | token with routing info | short sha |
---|---|---|---|
1 | glrt-UfMt7-xxxxxx-ZJpuvsb |
glrt-cell_1_UfMt7-xxxxxx-ZJpuvsb |
UfMt7-xxx |
1 | UfMt7-xxxxxx-ZJpuvsb |
cell_1_UfMt7-xxxxxx-ZJpuvsb |
UfMt7-xxx |
2 | glrt-UfMt7-xxxxxx-ZJpuvsb |
glrt-cell_2_UfMt7-xxxxxx-ZJpuvsb |
UfMt7-xxx |
2 | UfMt7-xxxxxx-ZJpuvsb |
cell_2_UfMt7-xxxxxx-ZJpuvsb |
UfMt7-xxx |
It also removes support for RUNNERS_TOKEN_PREFIX
. I believe that was introduced by mistake here, since it is only used in group/project runner registration tokens, not authentication tokens. This has basically been dead code, so I'm removing it now.
One thing I noticed is that the short token is 8 characters long, while on the GitLab UI, it is 9 characters long. Apparently, it has been like that forever, so
Why was this MR needed?
So that a short token has as much of the actual SHA as possible, instead of cell_2
in every token.
What's the best way to test this MR?
Try to register a runner with an authentication token from the table above, and check that the token output doesn't contain cell_
.
What are the relevant issue numbers?
Edited by Pedro Pombeiro