summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-23 11:55:38 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-11-23 11:55:38 +0100
commit9ab50c86a9cc62f924509265886ce89d5ac47584 (patch)
tree2a62ed8611a97c62bd10afda61aa0d57c9667977 /lib
parent718ea942dc1b2ef749bf852a19a86f0928e4b36d (diff)
downloadgitlab-ce-9ab50c86a9cc62f924509265886ce89d5ac47584.tar.gz
Add specs for runners tokens encryption migration
Diffstat (limited to 'lib')
-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