Revert "fix: migrate signBlob to iamcredentials.googleapis.com" (#563)
Reverts googleapis/google-auth-library-python#553
We have received reports that this is breaking users. See internal issue 161506225.
diff --git a/tests/compute_engine/test_credentials.py b/tests/compute_engine/test_credentials.py
index 4ee6536..8c95e24 100644
--- a/tests/compute_engine/test_credentials.py
+++ b/tests/compute_engine/test_credentials.py
@@ -363,11 +363,11 @@
signature = base64.b64encode(b"some-signature").decode("utf-8")
responses.add(
responses.POST,
- "https://iamcredentials.googleapis.com/v1/projects/-/"
- "serviceAccounts/service-account@example.com:signBlob?alt=json",
+ "https://iam.googleapis.com/v1/projects/-/serviceAccounts/"
+ "service-account@example.com:signBlob?alt=json",
status=200,
content_type="application/json",
- json={"keyId": "some-key-id", "signedBlob": signature},
+ json={"keyId": "some-key-id", "signature": signature},
)
id_token = "{}.{}.{}".format(
@@ -477,11 +477,11 @@
signature = base64.b64encode(b"some-signature").decode("utf-8")
responses.add(
responses.POST,
- "https://iamcredentials.googleapis.com/v1/projects/-/"
- "serviceAccounts/service-account@example.com:signBlob?alt=json",
+ "https://iam.googleapis.com/v1/projects/-/serviceAccounts/"
+ "service-account@example.com:signBlob?alt=json",
status=200,
content_type="application/json",
- json={"keyId": "some-key-id", "signedBlob": signature},
+ json={"keyId": "some-key-id", "signature": signature},
)
id_token = "{}.{}.{}".format(
diff --git a/tests/test_iam.py b/tests/test_iam.py
index e20eeba..4367fe7 100644
--- a/tests/test_iam.py
+++ b/tests/test_iam.py
@@ -81,7 +81,7 @@
def test_sign_bytes(self):
signature = b"DEADBEEF"
encoded_signature = base64.b64encode(signature).decode("utf-8")
- request = make_request(http_client.OK, data={"signedBlob": encoded_signature})
+ request = make_request(http_client.OK, data={"signature": encoded_signature})
credentials = make_credentials()
signer = iam.Signer(request, credentials, mock.sentinel.service_account_email)