Look for additional FxA deletion events (DENG-2422). (#4870)

This commit is contained in:
Sean Rose 2024-01-23 08:14:29 -08:00 коммит произвёл GitHub
Родитель b0387fb7de
Коммит 10d7002b95
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -11,7 +11,7 @@ WITH hmac_key AS (
key_id = 'fxa_hmac_prod'
)
SELECT
`timestamp` AS submission_timestamp,
MIN(`timestamp`) AS submission_timestamp,
TO_HEX(SHA256(jsonPayload.fields.uid)) AS user_id,
TO_HEX(
udf.hmac_sha256((SELECT * FROM hmac_key), CAST(jsonPayload.fields.uid AS BYTES))
@ -25,6 +25,10 @@ WHERE
AND DATE_ADD(@submission_date, INTERVAL 1 DAY)
)
AND DATE(`timestamp`) = @submission_date
AND jsonPayload.type = 'activityEvent'
AND jsonPayload.fields.event = 'account.deleted'
AND (
jsonPayload.type IN ('accountDeleted', 'accountDeleted.byRequest', 'DB.deleteAccount')
OR (jsonPayload.type = 'activityEvent' AND jsonPayload.fields.event = 'account.deleted')
)
AND jsonPayload.fields.uid IS NOT NULL
GROUP BY
jsonPayload.fields.uid