You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/06/24 18:55:58 UTC

[GitHub] [superset] amitmiran137 commented on a change in pull request #15296: feat(keys-rotation): manage cookie secret key

amitmiran137 commented on a change in pull request #15296:
URL: https://github.com/apache/superset/pull/15296#discussion_r658204855



##########
File path: superset/config.py
##########
@@ -1221,6 +1222,12 @@ def CSV_TO_HIVE_UPLOAD_DIRECTORY_FUNC(
 SQLALCHEMY_DOCS_URL = "https://docs.sqlalchemy.org/en/13/core/engines.html"
 SQLALCHEMY_DISPLAY_TEXT = "SQLAlchemy docs"
 
+# The environment type the application run on: "multithreaded", "multiprocess" and
+# "single"
+ENVIRONMENT_TYPE = os.environ.get("ENVIRONMENT_TYPE", "multithreaded")
+
+COOKIE_SIGNING_KEY = os.environ.get("COOKIE_SIGNING_KEY", SECRET_KEY)

Review comment:
       ```suggestion
   # You could define it as lambda to load on every usage and change on the fly upon env var update like the following
   # COOKIE_SIGNING_KEY = lambda: os.environ.get("COOKIE_SIGNING_KEY", SECRET_KEY)
   COOKIE_SIGNING_KEY = os.environ.get("COOKIE_SIGNING_KEY", SECRET_KEY)
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org