diff options
author | Nick Thomas <nick@gitlab.com> | 2018-12-04 19:48:30 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-12-04 19:48:30 +0300 |
commit | 80163b972a7bbbd203bb86e1d1474a592979e6d7 (patch) | |
tree | 43d11c56f1020cb0b7b9f20547edea280ae8af26 /config | |
parent | 42a7d3b7fe22e193bab1edca0165ceafe1d6b7bd (diff) | |
parent | a1bd34e9c04c79488dc20ad0af08b0c94bffe675 (diff) |
Merge branch 'fix/gb/encrypt-runners-tokens' into 'master'
Encrypt runners tokens
Closes #51232 and #52931
See merge request gitlab-org/gitlab-ce!23412
Diffstat (limited to 'config')
-rw-r--r-- | config/settings.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/config/settings.rb b/config/settings.rb index 3f3481bb65d..1b94df785a7 100644 --- a/config/settings.rb +++ b/config/settings.rb @@ -95,6 +95,14 @@ class Settings < Settingslogic Gitlab::Application.secrets.db_key_base[0..31] end + def attr_encrypted_db_key_base_32 + Gitlab::Utils.ensure_utf8_size(attr_encrypted_db_key_base, bytes: 32.bytes) + end + + def attr_encrypted_db_key_base_12 + Gitlab::Utils.ensure_utf8_size(attr_encrypted_db_key_base, bytes: 12.bytes) + end + # This should be used for :per_attribute_salt_and_iv mode. There is no # need to truncate the key because the encryptor will use the salt to # generate a hash of the password: |