thatguyatgithub opened a new issue, #37842: URL: https://github.com/apache/superset/issues/37842
### Bug description As instructed by [documentation here](https://superset.apache.org/docs/configuration/configuring-superset/#rotating-to-a-newer-secret_key), I've change the `superset_config.py` so that PREVIOUS_SECRET_KEY contained the intended-to-be-replaced secret and created a new `SECRET_KEY` entry with a new key. After starting superset main process, I executed `superset re-encrypt-secrets`, which did not complain at all about anything. ``` # superset --debug re-encrypt-secrets Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py] 2026-02-10 13:15:28,470:DEBUG:superset.utils.logging_configurator:logging was configured successfully 2026-02-10 13:15:28,537:DEBUG:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'> 2026-02-10 13:15:28,543:DEBUG:superset.initialization:Setting database isolation level to READ COMMITTED /app/.venv/lib/python3.10/site-packages/flask_limiter/extension.py:324: UserWarning: Using the in-memory storage for tracking rate limits as no storage was explicitly specified. This is not recommended for production use. See: https://flask-limiter.readthedocs.io#configuring-a-storage-backend for documentation about configuring the storage backend. warnings.warn( 2026-02-10 13:15:29,181:INFO:alembic.runtime.migration:Context impl PostgresqlImpl. 2026-02-10 13:15:29,181:INFO:alembic.runtime.migration:Will assume transactional DDL. 2026-02-10 13:15:29,714:INFO:superset.app:Syncing configuration to database... 2026-02-10 13:15:29,724:DEBUG:superset.commands.theme.seed:Updated system theme: THEME_DEFAULT 2026-02-10 13:15:29,733:DEBUG:superset.commands.theme.seed:Updated system theme: THEME_DARK 2026-02-10 13:15:29,735:INFO:superset.app:Configuration sync to database completed successfully 2026-02-10 13:15:30,516:INFO:superset.utils.encrypt:Collecting info for re encryption 2026-02-10 13:15:30,517:INFO:superset.utils.encrypt:All tables processed ``` But after that, restarting the superset process produced any opening of secrets related to databases to fail ``` File "/app/.venv/lib/python3.10/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 424, in process_result_value decrypted_value = self.engine.decrypt(value) File "/app/.venv/lib/python3.10/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 128, in decrypt raise ValueError('Invalid decryption key') ValueError: Invalid decryption key ``` ### Screenshots/recordings _No response_ ### Superset version master / latest-dev ### Python version 3.9 ### Node version 16 ### Browser Chrome ### Additional context _No response_ ### Checklist - [ ] I have searched Superset docs and Slack and didn't find a solution to my problem. - [ ] I have searched the GitHub issue tracker and didn't find a similar bug report. - [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section. -- 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]
