diff --git a/dev-requirements.txt b/dev-requirements.txt index 53a8183..a0eb61a 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,38 +1,42 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --output-file=dev-requirements.txt pip-tools/dev-requirements.in # +async-timeout==5.0.0 + # via + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt + # redis bandit==1.7.9 # via -r pip-tools/dev-requirements.in black==24.4.2 # via -r pip-tools/dev-requirements.in blinker==1.8.2 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # flask build==1.2.1 # via pip-tools cachelib==0.13.0 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # flask-session certifi==2024.7.4 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # requests cffi==1.16.0 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # cryptography charset-normalizer==3.3.2 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # requests click==8.1.7 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # black # flask # pip-tools @@ -40,70 +44,72 @@ colorama==0.4.6 # via pytest-watch cryptography==42.0.8 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # jwcrypto # pyjwt dnspython==2.6.1 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # eventlet docopt==0.6.2 # via pytest-watch environs==11.0.0 - # via -r pip-tools/../requirements.txt + # via -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt eventlet==0.36.1 - # via -r pip-tools/../requirements.txt + # via -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt +exceptiongroup==1.2.2 + # via pytest flask==3.0.3 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # flask-session flask-session[redis]==0.8.0 - # via -r pip-tools/../requirements.txt + # via -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt greenlet==3.0.3 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # eventlet # playwright gunicorn==22.0.0 - # via -r pip-tools/../requirements.txt + # via -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt idna==3.7 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # requests iniconfig==2.0.0 # via pytest itsdangerous==2.2.0 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # flask jinja2==3.1.4 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # flask jwcrypto==1.5.6 - # via -r pip-tools/../requirements.txt + # via -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt markdown-it-py==3.0.0 # via rich markupsafe==2.1.5 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # jinja2 # werkzeug marshmallow==3.21.3 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # environs mdurl==0.1.2 # via markdown-it-py msgspec==0.18.6 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # flask-session mypy-extensions==1.0.0 # via black packaging==24.1 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # black # build # gunicorn @@ -125,14 +131,14 @@ pluggy==1.5.0 # via pytest pycparser==2.22 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # cffi pyee==11.1.0 # via playwright pygments==2.18.0 # via rich pyjwt[crypto]==2.8.0 - # via -r pip-tools/../requirements.txt + # via -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt pyotp==2.9.0 # via -r pip-tools/dev-requirements.in pyproject-hooks==1.1.0 @@ -153,7 +159,7 @@ pytest-watch==4.2.0 # via -r pip-tools/dev-requirements.in python-dotenv==1.0.1 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # environs python-slugify==8.0.4 # via pytest-playwright @@ -161,11 +167,11 @@ pyyaml==6.0.1 # via bandit redis==5.0.7 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # flask-session requests==2.32.3 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # pytest-base-url # requests-mock requests-mock==1.12.1 @@ -176,20 +182,27 @@ stevedore==5.2.0 # via bandit text-unidecode==1.3 # via python-slugify +tomli==2.0.2 + # via + # black + # build + # pip-tools + # pytest typing-extensions==4.12.2 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt + # black # jwcrypto # pyee urllib3==2.2.2 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # requests watchdog==4.0.1 # via pytest-watch werkzeug==3.0.3 # via - # -r pip-tools/../requirements.txt + # -r /Users/markdboyd/development/opensearch-dashboards-cf-auth-proxy/requirements.txt # flask wheel==0.43.0 # via pip-tools diff --git a/requirements.txt b/requirements.txt index e655b33..74889eb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,11 @@ # -# This file is autogenerated by pip-compile with Python 3.11 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --output-file=requirements.txt pip-tools/requirements.in # +async-timeout==5.0.0 + # via redis blinker==1.8.2 # via flask cachelib==0.13.0 diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py index 725821c..d0bd0aa 100644 --- a/tests/unit/test_config.py +++ b/tests/unit/test_config.py @@ -22,6 +22,7 @@ def base_local_config(monkeypatch, token_keys): monkeypatch.setenv("CF_ADMIN_GROUP_NAME", "wrong-value") monkeypatch.setenv("DASHBOARD_URL", "https://wrong-value.example.com/") monkeypatch.setenv("FLASK_ENV", "local") + monkeypatch.setenv("REDIS_HOST", "fake-redis-host") @pytest.fixture @@ -104,16 +105,15 @@ def test_prod_has_secure_settings(monkeypatch, base_local_config): monkeypatch.setenv("FLASK_ENV", "production") config = config_from_env() - # TODO: double-check this - is it temporary until we figure out shared sessions? - assert config.SESSION_TYPE == "null" + assert config.SESSION_TYPE == "redis" assert config.SESSION_COOKIE_SECURE + assert config.SESSION_REDIS def test_local_has_test_friendly_settings(monkeypatch, base_local_config): monkeypatch.setenv("FLASK_ENV", "local") config = config_from_env() - assert config.SESSION_TYPE == "filesystem" assert not config.SESSION_COOKIE_SECURE