Skip to content

Remove deprecated modsecurity columns

What does this MR do?

This MR removes columns deprecated in %14.0, related to modsecurity feature (Web Application Firewall).

Migrations

⋊> ~/D/g/gitlab on 326990-remove-modsecurity-related-columns ⨯ env VERBOSE=true bundle exec rake db:migrate:up VERSION=20210629101712
== 20210629101712 RemoveDeprecatedModsecurityColumns: migrating ===============
-- column_exists?(:clusters_applications_ingress, :modsecurity_enabled)
   -> 0.0016s
-- remove_column(:clusters_applications_ingress, :modsecurity_enabled)
   -> 0.0170s
-- column_exists?(:clusters_applications_ingress, :modsecurity_mode)
   -> 0.0017s
-- remove_column(:clusters_applications_ingress, :modsecurity_mode)
   -> 0.0024s
== 20210629101712 RemoveDeprecatedModsecurityColumns: migrated (0.0228s) ======
⋊> ~/D/g/gitlab on 326990-remove-modsecurity-related-columns ⨯ env VERBOSE=true bundle exec rake db:migrate:down VERSION=20210629101712
== 20210629101712 RemoveDeprecatedModsecurityColumns: reverting ===============
-- column_exists?(:clusters_applications_ingress, :modsecurity_enabled)
   -> 0.0011s
-- add_column(:clusters_applications_ingress, :modsecurity_enabled, :boolean)
   -> 0.0032s
-- column_exists?(:clusters_applications_ingress, :modsecurity_mode)
   -> 0.0012s
-- add_column(:clusters_applications_ingress, :modsecurity_mode, :smallint, {:null=>false, :default=>0})
   -> 0.0030s
-- transaction_open?()
   -> 0.0000s
-- index_exists?(:clusters_applications_ingress, [:modsecurity_enabled, :modsecurity_mode, :cluster_id], {:name=>"index_clusters_applications_ingress_on_modsecurity", :algorithm=>:concurrently})
   -> 0.0021s
-- execute("SET statement_timeout TO 0")
   -> 0.0006s
-- add_index(:clusters_applications_ingress, [:modsecurity_enabled, :modsecurity_mode, :cluster_id], {:name=>"index_clusters_applications_ingress_on_modsecurity", :algorithm=>:concurrently})
   -> 0.0046s
-- execute("RESET ALL")
   -> 0.0005s
== 20210629101712 RemoveDeprecatedModsecurityColumns: reverted (0.0175s) ======

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #326990 (closed)

Edited by Alan (Maciej) Paruszewski

Merge request reports

Loading