diff options
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/runners_token_prefixable.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/models/concerns/runners_token_prefixable.rb b/app/models/concerns/runners_token_prefixable.rb new file mode 100644 index 00000000000..1aea874337e --- /dev/null +++ b/app/models/concerns/runners_token_prefixable.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module RunnersTokenPrefixable + extend ActiveSupport::Concern + + # Prefix for runners_token which can be used to invalidate existing tokens. + # The value chosen here is GR (for Gitlab Runner) combined with the rotation + # date (20220225) decimal to hex encoded. + RUNNERS_TOKEN_PREFIX = 'GR1348941' + + def runners_token_prefix + RUNNERS_TOKEN_PREFIX + end +end |