|
19 | 19 | import build.bazel.remote.execution.v2.DigestFunction;
|
20 | 20 | import build.bazel.remote.execution.v2.ServerCapabilities;
|
21 | 21 | import com.google.auth.Credentials;
|
22 |
| -import com.google.auto.value.AutoValue; |
23 | 22 | import com.google.common.annotations.VisibleForTesting;
|
24 | 23 | import com.google.common.base.Ascii;
|
25 | 24 | import com.google.common.base.Preconditions;
|
|
46 | 45 | import com.google.devtools.build.lib.analysis.configuredtargets.RuleConfiguredTarget;
|
47 | 46 | import com.google.devtools.build.lib.analysis.test.TestProvider;
|
48 | 47 | import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions;
|
49 |
| -import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions.UnresolvedScopedCredentialHelper; |
50 | 48 | import com.google.devtools.build.lib.authandtls.CallCredentialsProvider;
|
51 | 49 | import com.google.devtools.build.lib.authandtls.GoogleAuthUtils;
|
52 |
| -import com.google.devtools.build.lib.authandtls.credentialhelper.CredentialHelperEnvironment; |
53 |
| -import com.google.devtools.build.lib.authandtls.credentialhelper.CredentialHelperProvider; |
54 | 50 | import com.google.devtools.build.lib.bazel.repository.downloader.Downloader;
|
55 | 51 | import com.google.devtools.build.lib.buildeventstream.BuildEventArtifactUploader;
|
56 | 52 | import com.google.devtools.build.lib.buildeventstream.LocalFilesArtifactUploader;
|
|
78 | 74 | import com.google.devtools.build.lib.runtime.BuildEventArtifactUploaderFactory;
|
79 | 75 | import com.google.devtools.build.lib.runtime.Command;
|
80 | 76 | import com.google.devtools.build.lib.runtime.CommandEnvironment;
|
81 |
| -import com.google.devtools.build.lib.runtime.CommandLinePathFactory; |
82 | 77 | import com.google.devtools.build.lib.runtime.RepositoryRemoteExecutor;
|
83 | 78 | import com.google.devtools.build.lib.runtime.RepositoryRemoteExecutorFactory;
|
84 | 79 | import com.google.devtools.build.lib.runtime.ServerBuilder;
|
@@ -1049,29 +1044,6 @@ RemoteActionContextProvider getActionContextProvider() {
|
1049 | 1044 | return actionContextProvider;
|
1050 | 1045 | }
|
1051 | 1046 |
|
1052 |
| - @VisibleForTesting |
1053 |
| - static CredentialHelperProvider newCredentialHelperProvider( |
1054 |
| - CredentialHelperEnvironment environment, |
1055 |
| - CommandLinePathFactory pathFactory, |
1056 |
| - List<UnresolvedScopedCredentialHelper> helpers) |
1057 |
| - throws IOException { |
1058 |
| - Preconditions.checkNotNull(environment); |
1059 |
| - Preconditions.checkNotNull(pathFactory); |
1060 |
| - Preconditions.checkNotNull(helpers); |
1061 |
| - |
1062 |
| - CredentialHelperProvider.Builder builder = CredentialHelperProvider.builder(); |
1063 |
| - for (UnresolvedScopedCredentialHelper helper : helpers) { |
1064 |
| - Optional<String> scope = helper.getScope(); |
1065 |
| - Path path = pathFactory.create(environment.getClientEnvironment(), helper.getPath()); |
1066 |
| - if (scope.isPresent()) { |
1067 |
| - builder.add(scope.get(), path); |
1068 |
| - } else { |
1069 |
| - builder.add(path); |
1070 |
| - } |
1071 |
| - } |
1072 |
| - return builder.build(); |
1073 |
| - } |
1074 |
| - |
1075 | 1047 | static Credentials newCredentials(
|
1076 | 1048 | Map<String, String> clientEnv,
|
1077 | 1049 | FileSystem fileSystem,
|
@@ -1100,14 +1072,4 @@ static Credentials newCredentials(
|
1100 | 1072 |
|
1101 | 1073 | return credentials;
|
1102 | 1074 | }
|
1103 |
| - |
1104 |
| - @VisibleForTesting |
1105 |
| - @AutoValue |
1106 |
| - abstract static class ScopedCredentialHelper { |
1107 |
| - /** Returns the scope of the credential helper (if any). */ |
1108 |
| - public abstract Optional<String> getScope(); |
1109 |
| - |
1110 |
| - /** Returns the path of the credential helper. */ |
1111 |
| - public abstract Path getPath(); |
1112 |
| - } |
1113 | 1075 | }
|
0 commit comments