10000 rename mtls mds vars to be clear these are filepaths. · rmehta19/sdk-platform-java@c9a7edd · GitHub
[go: up one dir, main page]

Skip to content

Commit c9a7edd

Browse files
committed
rename mtls mds vars to be clear these are filepaths.
1 parent 2958fb4 commit c9a7edd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ public final class InstantiatingGrpcChannelProvider implements TransportChannelP
106106
// The public portion of the mTLS MDS root certificate is stored for performing
107107
// cert verification when establishing an mTLS connection with the MDS. See
108108
// https://cloud.google.com/compute/docs/metadata/overview#https-mds-root-certs
109-
private static final String MTLS_MDS_ROOT = "/run/google-mds-mtls/root.crt";
109+
private static final String MTLS_MDS_ROOT_PATH = "/run/google-mds-mtls/root.crt";
110110
// The mTLS MDS credentials are formatted as the concatenation of a PEM-encoded certificate chain
111111
// followed by a PEM-encoded private key. See
112112
// https://cloud.google.com/compute/docs/metadata/overview#https-mds-client-certs
113-
private static final String MTLS_MDS_CERT_CHAIN_AND_KEY = "/run/google-mds-mtls/client.key";
113+
private static final String MTLS_MDS_CERT_CHAIN_AND_KEY_PATH = "/run/google-mds-mtls/client.key";
114114

115115
static final long DIRECT_PATH_KEEP_ALIVE_TIME_SECONDS = 3600;
116116
static final long DIRECT_PATH_KEEP_ALIVE_TIMEOUT_SECONDS = 20;
@@ -502,8 +502,8 @@ ChannelCredentials createS2ASecuredChannelCredentials() {
502502
// Currently, MTLS to MDS is only available on GCE. See:
503503
// https://cloud.google.com/compute/docs/metadata/overview#https-mds
504504
// Try to load MTLS-MDS creds.
505-
File rootFile = new File(MTLS_MDS_ROOT);
506-
File certKeyFile = new File(MTLS_MDS_CERT_CHAIN_AND_KEY);
505+
File rootFile = new File(MTLS_MDS_ROOT_PATH);
506+
File certKeyFile = new File(MTLS_MDS_CERT_CHAIN_AND_KEY_PATH);
507507
if (rootFile.isFile() && certKeyFile.isFile()) {
508508
// Try to connect to S2A using mTLS.
509509
ChannelCredentials mtlsToS2AChannelCredentials = null;

0 commit comments

Comments
 (0)
0