You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/08/09 15:56:19 UTC

[PR] chore(security): warn when legacy encryption engine is configured [superset]

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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(security): warn when legacy encryption engine is configured [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #42937:
URL: https://github.com/apache/superset/pull/42937#issuecomment-5232431492

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42937?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `66.66667%` with `4 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 57.13%. Comparing base ([`3b164e4`](https://app.codecov.io/gh/apache/superset/commit/3b164e4270860ac07223d4df1a60ca7b56312362?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`921ed7e`](https://app.codecov.io/gh/apache/superset/commit/921ed7ea255f58ecacdcdb598edd13d0c98f2c6c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/42937?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [superset/initialization/\_\_init\_\_.py](https://app.codecov.io/gh/apache/superset/pull/42937?src=pr&el=tree&filepath=superset%2Finitialization%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvaW5pdGlhbGl6YXRpb24vX19pbml0X18ucHk=) | 66.66% | [3 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/superset/pull/42937?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (3b164e4) and HEAD (921ed7e). Click for more details.
   > 
   > <details><summary>HEAD has 131 uploads less than BASE</summary>
   >
   >| Flag | BASE (3b164e4) | HEAD (921ed7e) |
   >|------|------|------|
   >|hive|17|1|
   >|python|101|2|
   >|presto|17|1|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #42937      +/-   ##
   ==========================================
   - Coverage   66.41%   57.13%   -9.28%     
   ==========================================
     Files        2858     2858              
     Lines      161446   161458      +12     
     Branches    37190    37191       +1     
   ==========================================
   - Hits       107222    92248   -14974     
   - Misses      52187    68353   +16166     
   + Partials     2037      857    -1180     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/42937/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/42937/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.22% <66.66%> (+0.01%)` | :arrow_up: |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/42937/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/42937/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/42937/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.18% <66.66%> (+0.01%)` | :arrow_up: |
   | [python](https://app.codecov.io/gh/apache/superset/pull/42937/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.24% <66.66%> (-18.98%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/42937/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/42937/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/42937?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(security): warn when legacy encryption engine is configured [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42937:
URL: https://github.com/apache/superset/pull/42937#issuecomment-5232411388

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] chore(security): warn when legacy encryption engine is configured [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #42937:
URL: https://github.com/apache/superset/pull/42937


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org