From ed87f493a90a04ba96c27314145bb40a68bc09cc Mon Sep 17 00:00:00 2001 From: burnettk Date: Wed, 22 Feb 2023 11:15:24 -0500 Subject: [PATCH 1/2] allow specifying SECRET_KEY --- config.py | 4 ++-- hey.py | 1 + poetry.lock | 12 +++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 hey.py diff --git a/config.py b/config.py index f7f76c8..c8586e9 100644 --- a/config.py +++ b/config.py @@ -1,7 +1,5 @@ from os import environ -CONNECTOR_PROXY_WAKU_BASE_URL = environ.get("CONNECTOR_PROXY_WAKU_BASE_URL", default="http://localhost:8545") - CONNECTOR_PROXY_XERO_CLIENT_ID = environ.get("CONNECTOR_PROXY_XERO_CLIENT_ID") CONNECTOR_PROXY_XERO_CLIENT_SECRET = environ.get("CONNECTOR_PROXY_XERO_CLIENT_SECRET") @@ -10,3 +8,5 @@ CONNECTOR_PROXY_POSTGRESQL_USER_NAME = environ.get("CONNECTOR_PROXY_POSTGRESQL_U CONNECTOR_PROXY_POSTGRESQL_HOST = environ.get("CONNECTOR_PROXY_POSTGRESQL_HOST", default="localhost") CONNECTOR_PROXY_POSTGRESQL_PORT = environ.get("CONNECTOR_PROXY_POSTGRESQL_PORT", default="7005") CONNECTOR_PROXY_POSTGRESQL_PASSWORD = environ.get("CONNECTOR_PROXY_POSTGRESQL_PASSWORD") + +SECRET_KEY = environ.get("SECRET_KEY", default="super-secret-key-for-flask") diff --git a/hey.py b/hey.py new file mode 100644 index 0000000..3f241d8 --- /dev/null +++ b/hey.py @@ -0,0 +1 @@ +with open("testfile.txt", "w") as f: f.write("WE GOT HERE") diff --git a/poetry.lock b/poetry.lock index 725cb04..5f5f8c2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -197,7 +197,7 @@ version = "0.1.0" description = "Make HTTP Requests available to SpiffWorkflow Service Tasks" category = "main" optional = false -python-versions = "^3.11" +python-versions = "^3.9" develop = false [package.dependencies] @@ -207,7 +207,7 @@ requests = "^2.28.1" type = "git" url = "https://github.com/sartography/connector-http.git" reference = "HEAD" -resolved_reference = "337671b38f47bd8a3113bc6fa85b987828c4ee66" +resolved_reference = "2aae77fb7c65fe44e01e381ac8d5a83aaf27ff18" [[package]] name = "connector-postgresql" @@ -991,7 +991,7 @@ version = "0.1.0" description = "A blueprint that can allow (and limit) SpiffWorkflow's Service Tasks access to an organizations API's, such as connections to AWS Services and existing applications." category = "main" optional = false -python-versions = "^3.10" +python-versions = "^3.9" develop = false [package.dependencies] @@ -1002,7 +1002,7 @@ Flask-OAuthlib = "^0.9.6" type = "git" url = "https://github.com/sartography/spiffworkflow-proxy" reference = "HEAD" -resolved_reference = "f92ca9d4e7a9000909a28acfc300b2bb519cf7d2" +resolved_reference = "4cdbd3b37a15a49fbb043528ff3f9aeee9784b2f" [[package]] name = "stevedore" @@ -1360,6 +1360,7 @@ jmespath = [ {file = "jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe"}, ] livereload = [ + {file = "livereload-2.6.3-py2.py3-none-any.whl", hash = "sha256:ad4ac6f53b2d62bb6ce1a5e6e96f1f00976a32348afedcb4b6d68df2a1d346e4"}, {file = "livereload-2.6.3.tar.gz", hash = "sha256:776f2f865e59fde56490a56bcc6773b6917366bce0c267c60ee8aaf1a0959869"}, ] markupsafe = [ @@ -1477,6 +1478,8 @@ pre-commit-hooks = [ psycopg2 = [ {file = "psycopg2-2.9.5-cp310-cp310-win32.whl", hash = "sha256:d3ef67e630b0de0779c42912fe2cbae3805ebaba30cda27fea2a3de650a9414f"}, {file = "psycopg2-2.9.5-cp310-cp310-win_amd64.whl", hash = "sha256:4cb9936316d88bfab614666eb9e32995e794ed0f8f6b3b718666c22819c1d7ee"}, + {file = "psycopg2-2.9.5-cp311-cp311-win32.whl", hash = "sha256:093e3894d2d3c592ab0945d9eba9d139c139664dcf83a1c440b8a7aa9bb21955"}, + {file = "psycopg2-2.9.5-cp311-cp311-win_amd64.whl", hash = "sha256:920bf418000dd17669d2904472efeab2b20546efd0548139618f8fa305d1d7ad"}, {file = "psycopg2-2.9.5-cp36-cp36m-win32.whl", hash = "sha256:b9ac1b0d8ecc49e05e4e182694f418d27f3aedcfca854ebd6c05bb1cffa10d6d"}, {file = "psycopg2-2.9.5-cp36-cp36m-win_amd64.whl", hash = "sha256:fc04dd5189b90d825509caa510f20d1d504761e78b8dfb95a0ede180f71d50e5"}, {file = "psycopg2-2.9.5-cp37-cp37m-win32.whl", hash = "sha256:922cc5f0b98a5f2b1ff481f5551b95cd04580fd6f0c72d9b22e6c0145a4840e0"}, @@ -1568,7 +1571,6 @@ requests = [ requests-oauthlib = [ {file = "requests-oauthlib-1.1.0.tar.gz", hash = "sha256:eabd8eb700ebed81ba080c6ead96d39d6bdc39996094bd23000204f6965786b0"}, {file = "requests_oauthlib-1.1.0-py2.py3-none-any.whl", hash = "sha256:be76f2bb72ca5525998e81d47913e09b1ca8b7957ae89b46f787a79e68ad5e61"}, - {file = "requests_oauthlib-1.1.0-py3.7.egg", hash = "sha256:490229d14a98e1b69612dcc1a22887ec14f5487dc1b8c6d7ba7f77a42ce7347b"}, ] ruamel-yaml = [ {file = "ruamel.yaml-0.17.21-py3-none-any.whl", hash = "sha256:742b35d3d665023981bd6d16b3d24248ce5df75fdb4e2924e93a05c1f8b61ca7"}, From 692ad3ef4a8dbc3fe60c4c1b4bf9b8a172c28c59 Mon Sep 17 00:00:00 2001 From: burnettk Date: Wed, 22 Feb 2023 11:17:24 -0500 Subject: [PATCH 2/2] namespace env var that is intended for flask --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index c8586e9..b19602b 100644 --- a/config.py +++ b/config.py @@ -9,4 +9,4 @@ CONNECTOR_PROXY_POSTGRESQL_HOST = environ.get("CONNECTOR_PROXY_POSTGRESQL_HOST", CONNECTOR_PROXY_POSTGRESQL_PORT = environ.get("CONNECTOR_PROXY_POSTGRESQL_PORT", default="7005") CONNECTOR_PROXY_POSTGRESQL_PASSWORD = environ.get("CONNECTOR_PROXY_POSTGRESQL_PASSWORD") -SECRET_KEY = environ.get("SECRET_KEY", default="super-secret-key-for-flask") +SECRET_KEY = environ.get("FLASK_SESSION_SECRET_KEY", default="super-secret-key-for-flask")