Add secret detection token revocation columns
What does this MR do?
Adds columns necessary for #270208 (closed)
Application logic will be added with !45955 (closed)
Migration output
rake db:migrate
...
== 20201021152210 AddSecretDetectionTokenRevocationApplicationSettings: migrating
-- add_column(:application_settings, :secret_detection_token_revocation_enabled, :boolean, {:default=>false, :null=>false})
-> 0.0018s
-- add_column(:application_settings, :secret_detection_token_revocation_url, :text, {:null=>true})
-> 0.0005s
-- add_column(:application_settings, :encrypted_secret_detection_token_revocation_token, :text)
-> 0.0005s
-- add_column(:application_settings, :encrypted_secret_detection_token_revocation_token_iv, :text)
-> 0.0005s
== 20201021152210 AddSecretDetectionTokenRevocationApplicationSettings: migrated (0.0034s)
== 20201021190539 AddTextLimitToSecretDetectionTokenRevocationApplicationSettings: migrating
-- transaction_open?()
-> 0.0000s
-- current_schema()
-> 0.0002s
-- execute("ALTER TABLE application_settings\nADD CONSTRAINT check_9a719834eb\nCHECK ( char_length(secret_detection_token_revocation_url) <= 255 )\nNOT VALID;\n")
-> 0.0012s
-- current_schema()
-> 0.0002s
-- execute("ALTER TABLE application_settings VALIDATE CONSTRAINT check_9a719834eb;")
-> 0.0007s
== 20201021190539 AddTextLimitToSecretDetectionTokenRevocationApplicationSettings: migrated (0.0094s)
...
rake db:rollback STEP=5
...
== 20201021190539 AddTextLimitToSecretDetectionTokenRevocationApplicationSettings: reverting
-- execute("ALTER TABLE application_settings\nDROP CONSTRAINT IF EXISTS check_9a719834eb\n")
-> 0.0010s
== 20201021190539 AddTextLimitToSecretDetectionTokenRevocationApplicationSettings: reverted (0.0025s)
== 20201021152210 AddSecretDetectionTokenRevocationApplicationSettings: reverting
-- remove_column(:application_settings, :secret_detection_token_revocation_enabled)
-> 0.0012s
-- remove_column(:application_settings, :secret_detection_token_revocation_url)
-> 0.0005s
-- remove_column(:application_settings, :encrypted_secret_detection_token_revocation_token)
-> 0.0005s
-- remove_column(:application_settings, :encrypted_secret_detection_token_revocation_token_iv)
-> 0.0006s
== 20201021152210 AddSecretDetectionTokenRevocationApplicationSettings: reverted (0.0029s)
...
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
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 #270208 (closed)
Edited by rossfuhrman