Commit 144ace40 authored by Alexis Deruelle's avatar Alexis Deruelle
Browse files

fix: actually use the PoolManager object

Assuming intent was to use the `http` variable as request manager.

Fixes: 6a050acc
parent 42add9a4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ JWT_TOKEN = os.environ.get("GCP_JWT") or os.environ.get("CI_JOB_JWT_V2")


def get_iam_credentials(service_account, federated_token):
    resp = urllib3.request(
    resp = http.request(
        method="POST",
        url=f"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/{service_account}:generateAccessToken",
        headers={
@@ -34,7 +34,7 @@ def get_sts_token(audience):
            status_code=401, detail="Missing $CI_JOB_JWT_V2 or $GCP_JWT token"
        )

    resp = urllib3.request(
    resp = http.request(
        method="POST",
        url="https://sts.googleapis.com/v1/token",
        headers={"Accept": "application/json", "Content-Type": "application/json"},