From 9ab50c86a9cc62f924509265886ce89d5ac47584 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 23 Nov 2018 11:55:38 +0100 Subject: Add specs for runners tokens encryption migration --- .../background_migration/models/encrypt_columns/settings.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/gitlab/background_migration') 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 -- cgit v1.2.3