diff --git a/api_client/python/timesketch_api_client/client.py b/api_client/python/timesketch_api_client/client.py index e9f13eee8e..b4fca3d1ba 100644 --- a/api_client/python/timesketch_api_client/client.py +++ b/api_client/python/timesketch_api_client/client.py @@ -340,6 +340,10 @@ def _create_session( session = requests.Session() + # GCP IAP + if token := os.getenv("AUTHORIZATION_TOKEN"): + session.headers = {"Authorization": f"Bearer {token}"} + # If using HTTP Basic auth, add the user/pass to the session if auth_mode == "http-basic": session.auth = (username, password)