Repository: googleapis/python-storage

Issue:
IAM SignBlob and SignJwt decommissioned.
#### Is your feature request related to a problem? Please describe.
I received a notification from GCP alerting that SignBlob and SignJwt will be decommissioned and this library still using it. Here's a document describing the migration:
https://cloud.google.com/iam/docs/migrating-to-credentials-api

Here's code in this library that uses the deprecated api:
https://github.com/googleapis/python-storage/blob/62d1543e18040b286b23464562aa6eb998074c54/google/cloud/storage/_signing.py#L663-L664

#### Describe the solution you'd like
The migration document describes the changes necessary.

Discussion:

Patch:
diff --git a/google/cloud/storage/_signing.py b/google/cloud/storage/_signing.py
index 80c97c7..8e18bda 100644
--- a/google/cloud/storage/_signing.py
+++ b/google/cloud/storage/_signing.py
@@ -660,14 +660,14 @@ def _sign_message(message, access_token, service_account_email):
     message = _helpers._to_bytes(message)
 
     method = "POST"
-    url = "https://iam.googleapis.com/v1/projects/-/serviceAccounts/{}:signBlob?alt=json".format(
+    url = "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/{}:signBlob?alt=json".format(
         service_account_email
     )
     headers = {
         "Authorization": "Bearer " + access_token,
         "Content-type": "application/json",
     }
-    body = json.dumps({"bytesToSign": base64.b64encode(message).decode("utf-8")})
+    body = json.dumps({"payload": base64.b64encode(message).decode("utf-8")})
 
     request = requests.Request()
     response = request(url=url, method=method, body=body, headers=headers)
@@ -678,7 +678,7 @@ def _sign_message(message, access_token, service_account_email):
         )
 
     data = json.loads(response.data.decode("utf-8"))
-    return data["signature"]
+    return data["signedBlob"]
 
 
 def _url_encode(query_params):


Test patch:
diff --git a/tests/unit/test__signing.py b/tests/unit/test__signing.py
index 5f9219b..1a3c383 100644
--- a/tests/unit/test__signing.py
+++ b/tests/unit/test__signing.py
@@ -678,7 +678,7 @@ class Test_sign_message(unittest.TestCase):
 
     def test_sign_bytes(self):
         signature = "DEADBEEF"
-        data = {"signature": signature}
+        data = {"signedBlob": signature}
         request = make_request(200, data)
         with mock.patch("google.auth.transport.requests.Request", return_value=request):
             returned_signature = self._call_fut(