You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new runner authentication method includes an auto-rotation feature (disabled by default). For this feature to function, the expiration interval must be configured within GitLab. Once the interval is set and the time is reached, the Gitlab runner automatically initiate a process to reset the token, with the new token stored in the configuration file. The SSM 'token counter' method will be removed in the upcoming version 8.0.0 of this module (As noted here ). I am proposing that that implementation is not removed and instead is re-used to handle the new auto-rotation feature. Otherwise this module will not be compatible with Gitlab instances that have the auto-rotation feature enabled.
Describe alternatives you've considered
None
Suggest a solution
There are two possible solutions:
First Solution (easiest):
Mark the handling of token rotation as out of scope and add a disclaimer in the documentation.
Second Solution:
Do not remove the "usage counter" SSM parameter and use that along with the reset-token command. The process would be as follows:
SED config.toml for token_expires_at if it exists move to step 2 otherwise skip.
Check the usage counter, if it is 0 then continue to step 2
The token rotation handling event should most likely occur during the termination of the runners. In my use case I rotate out the runners every week which results in the latest AMI version being used but that would not be suitable for everyone. Handling a race condition properly is hard.
The text was updated successfully, but these errors were encountered:
MrGiga
changed the title
Handling of the Auto Token Rotation
Handling of the New Auto Token Rotation Feature
Oct 15, 2024
Describe the solution you'd like
The new runner authentication method includes an auto-rotation feature (disabled by default). For this feature to function, the expiration interval must be configured within GitLab. Once the interval is set and the time is reached, the Gitlab runner automatically initiate a process to reset the token, with the new token stored in the configuration file. The SSM 'token counter' method will be removed in the upcoming version 8.0.0 of this module (As noted
here ). I am proposing that that implementation is not removed and instead is re-used to handle the new auto-rotation feature. Otherwise this module will not be compatible with Gitlab instances that have the auto-rotation feature enabled.
Describe alternatives you've considered
None
Suggest a solution
There are two possible solutions:
First Solution (easiest):
Mark the handling of token rotation as out of scope and add a disclaimer in the documentation.
Second Solution:
Do not remove the "usage counter" SSM parameter and use that along with the
reset-token
command. The process would be as follows:token_expires_at
if it exists move to step 2 otherwise skip.reset-token
command - https://docs.gitlab.com/runner/commands/#gitlab-runner-reset-tokenAdditional context
The token rotation handling event should most likely occur during the termination of the runners. In my use case I rotate out the runners every week which results in the latest AMI version being used but that would not be suitable for everyone. Handling a race condition properly is hard.
The text was updated successfully, but these errors were encountered: