(dev/core#2258) CryptoRegistry - Remove fallback option based on CIVICRM_SITE_KEY.
authorTim Otten <totten@civicrm.org>
Thu, 17 Dec 2020 00:53:47 +0000 (16:53 -0800)
committerTim Otten <totten@civicrm.org>
Sat, 19 Dec 2020 04:58:09 +0000 (20:58 -0800)
commitf702c7f5d4cd9ad43da1f747317f9bc004b2e989
tree2e015aa10f8e83844b099714cdb1a00fa5e63adf
parent27fe36e71e01dacd1d7b373294795876e3c49c3d
(dev/core#2258) CryptoRegistry - Remove fallback option based on CIVICRM_SITE_KEY.

This was included under the expectation it might make a nicer upgrade. But
I don't think it buys a whole lot:

1. You run the upgrader. The SMTP password is converted from
   rj256-ecb-sitekey to aes-cbc-sitekey.  All other credentials are left
   unencrypted.  Afterward, you set CIVICRM_CRED_KEY and run the rekey.

2. You run upgrader. The SMTP password is decrypted. All other credentials
   are left unencrypted. Afterward, you set CIVICRM_CRED_KEY and run the rekey.

Additionally, I think there's a question of risk-management when we get to
encrypting more things in the Setting and API layers.  If we go with path 2,
then we can ramp-up adoption progressively, e.g.

* Release 1: Add support as non-default option
* Release 2: Enable by default on new builds
* Release 3: Display alert to existing sites that don't have encryption keys
Civi/Crypto/CryptoRegistry.php