RFC-214: Encrypt secrets in user_external_accounts, external_services, saved_searches and external_service_repos
Created by: unknwon
We need to encrypt existing data in user_exernal_accounts.{auth_data, account_data}, external_services.{config}, saved_searches.query and external_service_repos.clone_url.
TODO:
-
Come up a helper that accepts a table name, and list of columns to encrypt. #14231 -
Have a background worker in repo-updater to identify rows that are not encrypted by the current primaryKey(i.e. search rows that do not have expectedkeyHashprefix). This would cover both cases of encryption bootstrap and future key rotation. -
Have a Prometheus metric to track how many rows are encrypted/unencrypted until we have good UI on this. -
Decide if ConfiguredToRotateis worth keeping given theDecrypt/RotateEncryptionmethod now does no-op if the ciphertext does not look like being encrypted.