Improve logging around U2F to WebAuthn conversion
What does this MR do?
Migrating U2F devices to WebAuthn was done in !42159 (merged) and !46179 (merged). However, we have more and more U2F devices in our DB which has not been migrated:
gitlabhq_production=> select u.created_at from u2f_registrations u left join webauthn_registrations w on w.u2f_registration_id = u.id where w.u2f_registration_id is null;
created_at
----------------------------
2020-12-13 19:59:13.924022
2020-12-13 20:00:05.821035
2020-12-16 18:35:02.982665
2021-01-05 09:09:52.236532
(4 rows)
Unfortunately, we don't have much visibility into what went wrong. In the migration, we use #insert_all
without returning anything. In Kibana, some jobs seems to be failing and retried but nothing gets logged except the start
and done
messages.
This MR adds more logging, so we can troubleshoot these missing WebauthnRegistrations
.
Link to see the logs once this is deployed: https://log.gprd.gitlab.net/goto/e83f107c2aa1368fd44f4715b94c1935
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