rusackas opened a new pull request, #42937:
URL: https://github.com/apache/superset/pull/42937

   ### SUMMARY
   
   `SQLALCHEMY_ENCRYPTED_FIELD_ENGINE` defaults to the historical AES-CBC 
engine (`"aes"`) for backward compatibility — flipping the default engine used 
to decrypt existing values would make every already-stored app-encrypted secret 
(database passwords, SSH tunnel credentials, OAuth2 tokens, etc.) unreadable 
without a prior migration, since the two ciphertext formats aren't 
interchangeable and there's no per-value marker recording which engine produced 
a given value.
   
   Added a startup check, `check_encryption_engine()`, following the same 
pattern as the existing 
`check_secret_key`/`check_guest_token_secret`/`check_async_query_secret` 
checks: it warns operators when the legacy engine is active and points them at 
the existing `superset re-encrypt-secrets --engine aes-gcm` command to move to 
the authenticated `aes-gcm` engine. Unlike those checks, this one never refuses 
to start, since `"aes"` is a supported working configuration rather than a 
known-bad placeholder value — blocking startup on it would turn an opt-in 
migration into a forced outage for every deployment that hasn't run it yet.
   
   ### TESTING INSTRUCTIONS
   
   ```bash
   pytest tests/unit_tests/initialization/check_encryption_engine_test.py
   pytest tests/unit_tests/utils/test_encrypt_cbc_iv_reuse.py 
tests/unit_tests/utils/encrypt_test.py
   ```
   
   Manual: start Superset with `SQLALCHEMY_ENCRYPTED_FIELD_ENGINE` unset (or 
explicitly `"aes"`) and confirm the startup warning appears; set it to 
`"aes-gcm"` and confirm it doesn't.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to