gitlab-ce/lib/gitlab/background_migration
Nick Thomas 2f2b0ad390
Use a 32-byte version of db_key_base for web hooks
AES-256-GCM cipher mode requires a key that is exactly 32 bytes long.
We already handle the case when the key is too long, by truncating, but
the key can also be too short in some installations. Switching to a key
that is always exactly the right length (by virtue of right-padding
ASCII 0 characters) allows encryption to proceed, without breaking
backward compatibility.

When the key is too short, encryption fails with an `ArgumentError`,
causing the web hooks functionality to be unusable. As a result, zero
rows can exist with values encrypted with the too-short key.

When the key is too long, it is silently truncated. In this case, the
key is unchanged, so values encrypted with the new too-long key will
still be successfully decrypted.
2018-12-05 00:00:42 +00:00
..
models/encrypt_columns Use a 32-byte version of db_key_base for web hooks 2018-12-05 00:00:42 +00:00
redact_links Remove circular dependency on Redactable in migration 2018-11-09 12:59:39 -08:00
.gitkeep
.rubocop.yml Added Rubocop config for background migrations 2017-11-23 13:56:51 +01:00
add_merge_request_diff_commits_count.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
archive_legacy_traces.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
backfill_project_fullpath_in_repo_config.rb Ensure all Routables have a parent 2018-11-27 22:48:55 +01:00
cleanup_concurrent_rename.rb Add a helper to rename a column using a background migration 2018-06-26 13:54:52 +01:00
cleanup_concurrent_schema_change.rb Add a helper to rename a column using a background migration 2018-06-26 13:54:52 +01:00
cleanup_concurrent_type_change.rb Add a helper to rename a column using a background migration 2018-06-26 13:54:52 +01:00
copy_column.rb Reduce UPDATEs for background column type changes 2018-01-18 14:22:41 +01:00
create_fork_network_memberships_range.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
create_gpg_key_subkeys_from_gpg_keys.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
delete_conflicting_redirect_routes_range.rb Make DeleteConflictingRedirectRoutes no-op 2018-01-03 12:23:20 -08:00
delete_diff_files.rb Use schedulers and delete diff files upon deadtuples check 2018-07-10 10:25:48 -03:00
deserialize_merge_request_diffs_and_commits.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
digest_column.rb [master] Persist only SHA digest of PersonalAccessToken#token 2018-10-29 16:06:45 +00:00
encrypt_columns.rb Add a line before conditional in encrypt columns class 2018-12-04 10:10:04 +01:00
encrypt_runners_tokens.rb Use plaintext token when migration is not complete 2018-12-03 14:29:51 +01:00
fill_file_store_job_artifact.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
fill_file_store_lfs_object.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
fill_store_upload.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
fix_cross_project_label_links.rb [Rails5] Fix 'Invalid single-table inheritance type: Group is not a subclass of Gitlab::BackgroundMigration::FixCrossProjectLabelLinks::Namespace' 2018-07-07 14:49:16 +11:00
migrate_build_stage.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
migrate_build_stage_id_reference.rb Added Rubocop config for background migrations 2017-11-23 13:56:51 +01:00
migrate_events_to_push_event_payloads.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
migrate_legacy_artifacts.rb Squashed commit of the following: 2018-08-27 09:12:02 +02:00
migrate_stage_index.rb Use stages position column to track stage index 2018-05-01 14:30:44 +02:00
migrate_stage_status.rb Added Rubocop config for background migrations 2017-11-23 13:56:51 +01:00
migrate_system_uploads_to_new_folder.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
move_personal_snippet_files.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
normalize_ldap_extern_uids_range.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
populate_cluster_kubernetes_namespace_table.rb Add background migration for Kubernetes Namespaces 2018-11-06 12:23:00 +00:00
populate_external_pipeline_source.rb Refactor migration specs using ActiveRecord models 2018-09-28 01:40:40 +02:00
populate_fork_networks_range.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
populate_import_state.rb Backports every CE related change from ee-44542 to CE 2018-05-04 17:33:26 +02:00
populate_merge_request_metrics_with_events_data.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
populate_merge_requests_latest_merge_request_diff_id.rb Added Rubocop config for background migrations 2017-11-23 13:56:51 +01:00
populate_untracked_uploads.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
populate_untracked_uploads_dependencies.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
prepare_untracked_uploads.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
redact_links.rb Remove circular dependency on Redactable in migration 2018-11-09 12:59:39 -08:00
remove_restricted_todos.rb Fix statement timeouts in RemoveRestrictedTodos migration 2018-11-04 06:01:17 -08:00
rollback_import_state_data.rb Backports every CE related change from ee-44542 to CE 2018-05-04 17:33:26 +02:00
schedule_diff_files_deletion.rb Use schedulers and delete diff files upon deadtuples check 2018-07-10 10:25:48 -03:00
set_confidential_note_events_on_services.rb Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
set_confidential_note_events_on_webhooks.rb Fix typos in comments and specs 2018-11-01 08:59:20 +02:00