A Default SECRET_KEY was detected, please use superset_config.py to override it. Getting this error in docker apache superset

huangapple go评论164阅读模式
英文:

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

huangapple
  • 本文由 发表于 2023年7月6日 15:37:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/76626514.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定