gitlab-org--gitlab-foss/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
add_merge_request_diff_commits_count.rb
archive_legacy_traces.rb
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
cleanup_concurrent_schema_change.rb
cleanup_concurrent_type_change.rb
copy_column.rb
create_fork_network_memberships_range.rb
create_gpg_key_subkeys_from_gpg_keys.rb
delete_conflicting_redirect_routes_range.rb
delete_diff_files.rb
deserialize_merge_request_diffs_and_commits.rb
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
fill_file_store_lfs_object.rb
fill_store_upload.rb
fix_cross_project_label_links.rb
migrate_build_stage.rb
migrate_build_stage_id_reference.rb
migrate_events_to_push_event_payloads.rb
migrate_legacy_artifacts.rb
migrate_stage_index.rb
migrate_stage_status.rb
migrate_system_uploads_to_new_folder.rb
move_personal_snippet_files.rb
normalize_ldap_extern_uids_range.rb
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
populate_fork_networks_range.rb
populate_import_state.rb
populate_merge_request_metrics_with_events_data.rb
populate_merge_requests_latest_merge_request_diff_id.rb
populate_untracked_uploads.rb
populate_untracked_uploads_dependencies.rb
prepare_untracked_uploads.rb
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
schedule_diff_files_deletion.rb
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