Skip to content

Introduce a new gitlab:doctor:encryption_keys task

What does this MR do and why?

Introduce a new gitlab:doctor:check_encryption_keys task.

The task:

  1. Provides a list the current keys detected (from secrets.yml)
  2. Detect what keys were used to encrypt records and shows the number of encrypted records for each encryption key fingerprint

This will help identify problems such as Active Record Decryption Error since upgrading ... (#527923 - closed).

I haven't written tests yet as I'd like to have this included in 17.11 (and back-ported to 17.10, and 17.9) ASAP. I can work on adding tests later.

This should be ported back to %17.10, and %17.9.

References

Screenshots or screen recordings

Screenshot_2025-04-09_at_17.40.57

How to set up and validate locally

$ bundle exec rake gitlab:doctor:encryption_keys

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Rémy Coutable

Merge request reports

Loading