Skip to content

Commit fb324dc

Browse files
committed
remove hardcoded iam sign endpoint used only for test setup.
1 parent 2fec328 commit fb324dc

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

oauth2_http/java/com/google/auth/oauth2/ComputeEngineCredentials.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ public class ComputeEngineCredentials extends GoogleCredentials
9595

9696
static final String DEFAULT_METADATA_SERVER_URL = "http://metadata.google.internal";
9797

98-
static final String SIGN_BLOB_URL_FORMAT =
99-
"https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/%s:signBlob";
100-
10198
// Note: the explicit `timeout` and `tries` below is a workaround. The underlying
10299
// issue is that resolving an unknown host on some networks will take
103100
// 20-30 seconds; making this timeout short fixes the issue, but

oauth2_http/javatests/com/google/auth/oauth2/MockMetadataServerTransport.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ protected boolean isGetServiceAccountsUrl(String url) {
325325
protected boolean isSignRequestUrl(String url) {
326326
return serviceAccountEmail != null
327327
&& url.equals(
328-
String.format(ComputeEngineCredentials.SIGN_BLOB_URL_FORMAT, serviceAccountEmail));
328+
String.format(
329+
IamUtils.IAM_SIGN_BLOB_ENDPOINT_FORMAT, "googleapis.com", serviceAccountEmail));
329330
}
330331

331332
protected boolean isIdentityDocumentUrl(String url) {

0 commit comments

Comments
 (0)