superset
superset copied to clipboard
docs: Added instructions on configuring Superset SECRET_KEY
SUMMARY
Added alternative instructions on setting SECRET_KEY via environment variables.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] 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
Hello, thanks for the PR and showing the before/after screenshots. Can you please explain what the advantage to this is / what the improvement is here? It seems like another way of adding the value to superset_config.py, which is already covered, and I'm not sure this will persist through the machine restarting.
@sfirke Hello, many users have encountered the error below(ex: https://github.com/apache/superset/discussions/23598). While the initial 'Configuring Superset' section does touch upon setting the SUPERSET_SECRET_KEY environment variable in the code example, I believe providing this explicit alternative would make the local setup process more straightforward for beginners. Additionally, I realize this documentation update doesn't directly address the issues some users face when running superset re-encrypt-secrets and the PREVIOUS_SECRET_KEY setting. However, I felt this change was a step towards simplifying the initial setup for new users.
SUPERSET_SECRET_KEY environment variable is already supported https://github.com/apache/superset/blob/master/superset/config.py#L184
so those additional imports are not required. Just defining the environment variable is enough.
I think the following is enough to add to docs without confusing users.
Alternatively, you can set the secret key using the `SUPERSET_SECRET_KEY` environment variable.
On a Linux System, you can do so by running the following command in your terminal:
export SUPERSET_SECRET_KEY=$(openssl rand -base64 42)
@mdeshmu Thank you for the feedback. I've made the suggested update. Tweaked it to include macOS
@sfirke please review.
Sorry this seems to have slipped through the cracks, but it's in need of a rebase. I'll mark it as draft mode for now while it awaits an update. Thanks!