Skip to content

Improve logging around U2F to WebAuthn conversion

Imre Farkas requested to merge if-webauthn_conversion_logging into master

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

Availability and Testing

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
Edited by Imre Farkas

Merge request reports