Facing SECRET_KEY issue #29849
Replies: 2 comments 5 replies
-
Hey @Dummy-12345! I'm here to help with any bugs, questions, or contributions you have. Let's tackle this issue together! To resolve the issue of the insecure
Here is an example of what your # Superset specific config
ROW_LIMIT = 5000
# Flask App Builder configuration
# Your App secret key will be used for securely signing the session cookie
# and encrypting sensitive information on the database
# Make sure you are changing this key for your deployment with a strong key.
# Alternatively you can set it with `SUPERSET_SECRET_KEY` environment variable.
# You MUST set this for production environments or the server will refuse
# to start and you will see an error in the logs accordingly.
SECRET_KEY = 'YOUR_OWN_RANDOM_GENERATED_SECRET_KEY'
# The SQLAlchemy connection string to your database backend
SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db?check_same_thread=false'
# Flask-WTF flag for CSRF
WTF_CSRF_ENABLED = True
WTF_CSRF_EXEMPT_LIST = []
WTF_CSRF_TIME_LIMIT = 60 * 60 * 24 * 365
# Set this API key to enable Mapbox visualizations
MAPBOX_API_KEY = '' Make sure to replace Additionally, you can set the # Your App secret key. Make sure you override it on superset_config.py
# or use `SUPERSET_SECRET_KEY` environment variable.
# Use a strong complex alphanumeric string and use a tool to help you generate
# a sufficiently random sequence, ex: openssl rand -base64 42"
SECRET_KEY = os.environ.get("SUPERSET_SECRET_KEY") or CHANGE_ME_SECRET_KEY This approach allows you to keep the secret key out of your source code, enhancing security [1][2]. |
Beta Was this translation helpful? Give feedback.
-
Hi @dosu, Could you please help me on where to place that superset_config.py file? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I wanted to host APACHE SUPERSET through PYTHON in my windows machine instead of using any DOCKER image. I successfully installed the apache-superset package in my python 3.9 environment. When I execute the superset db upgrade command, I face the below error:
A Default SECRET_KEY was detected, please use superset_config.py to override it.
Use a strong complex alphanumeric string and use a tool to help you generate
a sufficiently random sequence, ex: openssl rand -base64 42
Refusing to start due to insecure SECRET_KEY
Thanks in advance!!!
Beta Was this translation helpful? Give feedback.
All reactions