Page MenuHomePhabricator

Delete old tally keys
Closed, ResolvedPublic

Description

Splitting this off from T288714: Delete old vote records but we should (as a one-off w/the assumption we've resolved the issue or w/a maintenance script) delete gpg-decryption-keys from the securepoll_properties table if they haven't been already. They're not intended to be stored there long-term.

@phuedx

Event Timeline

There are 15 elections affected by this:

[0]
select count(*) from securepoll_properties where pr_key = 'gpg-decrypt-key';

+----------+
| count(*) |
+----------+
|       15 |
+----------+

Change 721002 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/SecurePoll@master] Add purgeDecryptionKeys.php script

https://gerrit.wikimedia.org/r/721002

Change 721002 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Add purgeDecryptionKeys.php script

https://gerrit.wikimedia.org/r/721002

Change 723069 had a related patch set uploaded (by Phuedx; author: Phuedx):

[mediawiki/extensions/SecurePoll@master] QoL improvements to purgeDecryptionKeys.php script

https://gerrit.wikimedia.org/r/723069

Per an out-of-band conversation with @jrbs, I've added a before parameter, which allows us to filter out elections that ended after the specified date.

Change 723069 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] QoL improvements to purgeDecryptionKeys.php script

https://gerrit.wikimedia.org/r/723069

I didn't tag this task on the SAL line item so FTR I did the following:

phuedx@mwmaint1002:~$ mwscript extensions/SecurePoll/cli/purgeDecryptionKeys.php --wiki=votewiki --before="20210101000000"