Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-23 13:55:38 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-23 13:55:38 +0300
commit9ab50c86a9cc62f924509265886ce89d5ac47584 (patch)
tree2a62ed8611a97c62bd10afda61aa0d57c9667977 /lib/gitlab/background_migration
parent718ea942dc1b2ef749bf852a19a86f0928e4b36d (diff)
Add specs for runners tokens encryption migration
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r--lib/gitlab/background_migration/models/encrypt_columns/settings.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/gitlab/background_migration/models/encrypt_columns/settings.rb b/lib/gitlab/background_migration/models/encrypt_columns/settings.rb
index 458f1202929..578d2ee7fbf 100644
--- a/lib/gitlab/background_migration/models/encrypt_columns/settings.rb
+++ b/lib/gitlab/background_migration/models/encrypt_columns/settings.rb
@@ -13,13 +13,17 @@ module Gitlab
self.table_name = 'application_settings'
self.inheritance_column = :_type_disabled
- def runners_token=(value)
- self.runners_token_encrypted =
+ def runners_registration_token=(value)
+ self.runners_registration_token_encrypted =
::Gitlab::CryptoHelper.aes256_gcm_encrypt(value)
end
def self.encrypted_attributes
- { runners_token: { attribute: :runners_token_encrypted } }
+ {
+ runners_registration_token: {
+ attribute: :runners_registration_token_encrypted
+ }
+ }
end
end
end