Make `fingerprint` nullable for GroupDeployKeys
What does this MR do and why?
Contributes to #336421 (closed)
Problem
FIPS-enforcing environments don't support MD5 algorithm. Our plan is to deprecate MD5 fingerprints in the future.
Table group_deploy_keys
was created from
table keys
. But
there is a difference between them. group_deploy_keys
requires MD5 fingerprint
value presence but keys
table does not.
Solution
Add support for NULL values to fingerprint
field from `group_deploy_keys. It should not have any effect at the moment but will simplify future steps of MD5 deprecation process.
Database
Migrate
== 20220405122155 MakeFingerprintOptionalForGroupDeployKey: migrating =========
-- change_column_null(:group_deploy_keys, :fingerprint, true)
-> 0.0020s
== 20220405122155 MakeFingerprintOptionalForGroupDeployKey: migrated (0.0020s)
Rollback
== 20220405122155 MakeFingerprintOptionalForGroupDeployKey: reverting =========
-- select_all("SELECT id, key FROM group_deploy_keys WHERE fingerprint IS NULL")
-> 0.0027s
-- quote_string("35:4b:f7:de:73:bd:07:52:2b:75:af:d0:9f:c2:5d:d2")
-> 0.0000s
-- execute("UPDATE group_deploy_keys SET fingerprint = '35:4b:f7:de:73:bd:07:52:2b:75:af:d0:9f:c2:5d:d2' WHERE id = 1")
-> 0.0010s
-- quote_string("f2:4f:e4:9f:71:7b:81:0b:e5:85:ae:82:49:94:bf:a1")
-> 0.0000s
-- execute("UPDATE group_deploy_keys SET fingerprint = 'f2:4f:e4:9f:71:7b:81:0b:e5:85:ae:82:49:94:bf:a1' WHERE id = 2")
-> 0.0008s
-- change_column_null(:group_deploy_keys, :fingerprint, false)
-> 0.0010s
== 20220405122155 MakeFingerprintOptionalForGroupDeployKey: reverted (0.0061s)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin