英文:
A Default SECRET_KEY was detected, please use superset_config.py to override it. Getting this error in docker apache superset
问题
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.
Am getting this error though SECRET_KEY is added to superset_config.py to enable SSL in docker apache superset. Adding the configuration files
CELERY_CONFIG = CeleryConfig
#ENABLE_DEBUG_LOGGING = True
DEBUG = True
FLASK_APP = "superset"
FLASK_ENV = "debug"
FEATURE_FLAGS = {"ALERT_REPORTS": True,"EMBEDDED_SUPERSET": True}
ALERT_REPORTS_NOTIFICATION_DRY_RUN = True
# CORS Options
ENABLE_CORS = True
# When proxying to a different port, set "x_port" to 0 to avoid downstream issues.
ENABLE_PROXY_FIX = True
HTTP_HEADERS = {"X-Frame-Options": "SAMEORIGIN", "X-Content-Type-Options": "nosniff"}
ENABLE_SSL = True
SSL_CERT_PATH = "/etc/ssl/certs/server.crt"
SSL_KEY_PATH = "/etc/ssl/certs/server.key"
PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 1, "x_prefix": 1}
WEBDRIVER_BASEURL = "http://superset:8088/"
# The base URL for the email report hyperlinks.
WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL
SQLLAB_CTAS_NO_LIMIT = True
SECRET_KEY ="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
print("Config file loaded successfully!")
print("SECRET_KEY:", SECRET_KEY)
The below command is also tried to suppress warning, same issue.
docker run -d -p 8443:8443 -e SUPPRESS_WARNING_MESSAGE=True apache/superset
英文:
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.
Am getting this error though SECRET_KEY is added to superset_config.py to enable SSL in docker apache superset. Adding the configuration files
CELERY_CONFIG = CeleryConfig
#ENABLE_DEBUG_LOGGING = True
DEBUG = True
FLASK_APP = "superset"
FLASK_ENV = "debug"
FEATURE_FLAGS = {"ALERT_REPORTS": True,"EMBEDDED_SUPERSET": True}
ALERT_REPORTS_NOTIFICATION_DRY_RUN = True
# CORS Options
ENABLE_CORS = True
# When proxying to a different port, set "x_port" to 0 to avoid downstream issues.
ENABLE_PROXY_FIX = True
HTTP_HEADERS = {"X-Frame-Options": "SAMEORIGIN", "X-Content-Type-Options": "nosniff"}
ENABLE_SSL = True
SSL_CERT_PATH = "/etc/ssl/certs/server.crt"
SSL_KEY_PATH = "/etc/ssl/certs/server.key"
PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 1, "x_prefix": 1}
WEBDRIVER_BASEURL = "http://superset:8088/"
# The base URL for the email report hyperlinks.
WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL
SQLLAB_CTAS_NO_LIMIT = True
SECRET_KEY ="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
print("Config file loaded successfully!")
print("SECRET_KEY:", SECRET_KEY)
The below command is also tried to supress arning, same issue.
docker run -d -p 8443:8443 -e SUPPRESS_WARNING_MESSAGE=True apache/superset
答案1
得分: 1
运行此命令在shell中更改密钥
export SUPERSET_SECRET_KEY="some_random_base64_string"
您可以使用此命令在shell中创建some_random_base64_string
openssl rand -base64 42
英文:
run this command in shell to change the secret key
export SUPERSET_SECRET_KEY="some_random_base64_string"
You can create some_random_base64_string using this command in shell
openssl rand -base64 42
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论