tests/e2e: add forward auth e2e test (#11374)
* add nginx forward_auth e2e tests Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add envoy Signed-off-by: Jens Langhammer <jens@goauthentik.io> * cleanup Signed-off-by: Jens Langhammer <jens@goauthentik.io> * remove even more duplicate code Signed-off-by: Jens Langhammer <jens@goauthentik.io> * cleanup more Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add traefik static config Signed-off-by: Jens Langhammer <jens@goauthentik.io> * more cleanup, don't generate dex config cause they support env variables Signed-off-by: Jens Langhammer <jens@goauthentik.io> * use default dex entrypoint to use templating Signed-off-by: Jens Langhammer <jens@goauthentik.io> * remove options that are always set as default Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix compose flag Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add caddy Signed-off-by: Jens Langhammer <jens@goauthentik.io> * merge python files Signed-off-by: Jens Langhammer <jens@goauthentik.io> * use whoami api to check better Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix envoy config Signed-off-by: Jens Langhammer <jens@goauthentik.io> * set invalidation flow Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix logout checks Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
		| @ -1,7 +1,6 @@ | ||||
| """test OAuth Provider flow""" | ||||
|  | ||||
| from time import sleep | ||||
| from typing import Any | ||||
|  | ||||
| from docker.types import Healthcheck | ||||
| from selenium.webdriver.common.by import By | ||||
| @ -24,22 +23,17 @@ class TestProviderOAuth2Github(SeleniumTestCase): | ||||
|         self.client_id = generate_id() | ||||
|         self.client_secret = generate_key() | ||||
|         super().setUp() | ||||
|  | ||||
|     def get_container_specs(self) -> dict[str, Any] | None: | ||||
|         """Setup client grafana container which we test OAuth against""" | ||||
|         return { | ||||
|             "image": "grafana/grafana:7.1.0", | ||||
|             "detach": True, | ||||
|             "ports": { | ||||
|         self.run_container( | ||||
|             image="grafana/grafana:7.1.0", | ||||
|             ports={ | ||||
|                 "3000": "3000", | ||||
|             }, | ||||
|             "auto_remove": True, | ||||
|             "healthcheck": Healthcheck( | ||||
|             healthcheck=Healthcheck( | ||||
|                 test=["CMD", "wget", "--spider", "http://localhost:3000"], | ||||
|                 interval=5 * 1_000 * 1_000_000, | ||||
|                 start_period=1 * 1_000 * 1_000_000, | ||||
|             ), | ||||
|             "environment": { | ||||
|             environment={ | ||||
|                 "GF_AUTH_GITHUB_ENABLED": "true", | ||||
|                 "GF_AUTH_GITHUB_ALLOW_SIGN_UP": "true", | ||||
|                 "GF_AUTH_GITHUB_CLIENT_ID": self.client_id, | ||||
| @ -54,7 +48,7 @@ class TestProviderOAuth2Github(SeleniumTestCase): | ||||
|                 "GF_AUTH_GITHUB_API_URL": self.url("authentik_providers_oauth2_root:github-user"), | ||||
|                 "GF_LOG_LEVEL": "debug", | ||||
|             }, | ||||
|         } | ||||
|         ) | ||||
|  | ||||
|     @retry() | ||||
|     @apply_blueprint( | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens L.
					Jens L.