diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2019-05-28 04:47:34 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-05-28 04:47:34 +0000 |
commit | 4687ff7c9be789341e82a6440234fce43f30b5be (patch) | |
tree | 59b72fafa974c92af04590e7fc3b64c6536aef70 /db/migrate/20190516151857_add_lets_encrypt_private_key_to_application_settings.rb | |
parent | af43970834b911242eecf9b7c815faf0f6b50048 (diff) | |
download | gitlab-ce-4687ff7c9be789341e82a6440234fce43f30b5be.tar.gz |
Store Let's Encrypt private key in settings
Storing this key in secrets.yml was a bad idea,
it would require users using HA setups to manually
replicate secrets across nodes during update,
it also needed support from omnibus package
* Revert "Generate Let's Encrypt private key"
This reverts commit 444959bfa0b79e827a2a1a7a314acac19390f976.
* Add Let's Encrypt private key to settings
as encrypted attribute
* Generate Let's Encrypt private key
in database migration
Diffstat (limited to 'db/migrate/20190516151857_add_lets_encrypt_private_key_to_application_settings.rb')
-rw-r--r-- | db/migrate/20190516151857_add_lets_encrypt_private_key_to_application_settings.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20190516151857_add_lets_encrypt_private_key_to_application_settings.rb b/db/migrate/20190516151857_add_lets_encrypt_private_key_to_application_settings.rb new file mode 100644 index 00000000000..e1d3cca48d6 --- /dev/null +++ b/db/migrate/20190516151857_add_lets_encrypt_private_key_to_application_settings.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class AddLetsEncryptPrivateKeyToApplicationSettings < ActiveRecord::Migration[5.1] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + def change + add_column :application_settings, :encrypted_lets_encrypt_private_key, :text + add_column :application_settings, :encrypted_lets_encrypt_private_key_iv, :text + end +end |