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

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

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

  1. CELERY_CONFIG = CeleryConfig
  2. #ENABLE_DEBUG_LOGGING = True
  3. DEBUG = True
  4. FLASK_APP = "superset"
  5. FLASK_ENV = "debug"
  6. FEATURE_FLAGS = {"ALERT_REPORTS": True,"EMBEDDED_SUPERSET": True}
  7. ALERT_REPORTS_NOTIFICATION_DRY_RUN = True
  8. # CORS Options
  9. ENABLE_CORS = True
  10. # When proxying to a different port, set "x_port" to 0 to avoid downstream issues.
  11. ENABLE_PROXY_FIX = True
  12. HTTP_HEADERS = {"X-Frame-Options": "SAMEORIGIN", "X-Content-Type-Options": "nosniff"}
  13. ENABLE_SSL = True
  14. SSL_CERT_PATH = "/etc/ssl/certs/server.crt"
  15. SSL_KEY_PATH = "/etc/ssl/certs/server.key"
  16. PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 1, "x_prefix": 1}
  17. WEBDRIVER_BASEURL = "http://superset:8088/"
  18. # The base URL for the email report hyperlinks.
  19. WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL
  20. SQLLAB_CTAS_NO_LIMIT = True
  21. SECRET_KEY ="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  22. print("Config file loaded successfully!")
  23. 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

  1. CELERY_CONFIG = CeleryConfig
  2. #ENABLE_DEBUG_LOGGING = True
  3. DEBUG = True
  4. FLASK_APP = "superset"
  5. FLASK_ENV = "debug"
  6. FEATURE_FLAGS = {"ALERT_REPORTS": True,"EMBEDDED_SUPERSET": True}
  7. ALERT_REPORTS_NOTIFICATION_DRY_RUN = True
  8. # CORS Options
  9. ENABLE_CORS = True
  10. # When proxying to a different port, set "x_port" to 0 to avoid downstream issues.
  11. ENABLE_PROXY_FIX = True
  12. HTTP_HEADERS = {"X-Frame-Options": "SAMEORIGIN", "X-Content-Type-Options": "nosniff"}
  13. ENABLE_SSL = True
  14. SSL_CERT_PATH = "/etc/ssl/certs/server.crt"
  15. SSL_KEY_PATH = "/etc/ssl/certs/server.key"
  16. PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 1, "x_prefix": 1}
  17. WEBDRIVER_BASEURL = "http://superset:8088/"
  18. # The base URL for the email report hyperlinks.
  19. WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL
  20. SQLLAB_CTAS_NO_LIMIT = True
  21. SECRET_KEY ="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  22. print("Config file loaded successfully!")
  23. 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

  1. 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:

确定