|
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;
|
|
79 | 75 | import com.google.devtools.build.lib.runtime.BuildEventArtifactUploaderFactory;
|
80 | 76 | import com.google.devtools.build.lib.runtime.Command;
|
81 | 77 | import com.google.devtools.build.lib.runtime.CommandEnvironment;
|
82 |
| -import com.google.devtools.build.lib.runtime.CommandLinePathFactory; |
83 | 78 | import com.google.devtools.build.lib.runtime.RepositoryRemoteExecutor;
|
84 | 79 | import com.google.devtools.build.lib.runtime.RepositoryRemoteExecutorFactory;
|
85 | 80 | import com.google.devtools.build.lib.runtime.ServerBuilder;
|
@@ -1044,29 +1039,6 @@ RemoteActionContextProvider getActionContextProvider() {
|
1044 | 1039 | return actionContextProvider;
|
1045 | 1040 | }
|
1046 | 1041 |
|
1047 |
| - @VisibleForTesting |
1048 |
| - static CredentialHelperProvider newCredentialHelperProvider( |
1049 |
| - CredentialHelperEnvironment environment, |
1050 |
| - CommandLinePathFactory pathFactory, |
1051 |
| - List<UnresolvedScopedCredentialHelper> helpers) |
1052 |
| - throws IOException { |
1053 |
| - Preconditions.checkNotNull(environment); |
1054 |
| - Preconditions.checkNotNull(pathFactory); |
1055 |
| - Preconditions.checkNotNull(helpers); |
1056 |
| - |
1057 |
| - CredentialHelperProvider.Builder builder = CredentialHelperProvider.builder(); |
1058 |
| - for (UnresolvedScopedCredentialHelper helper : helpers) { |
1059 |
| - Optional<String> scope = helper.getScope(); |
1060 |
| - Path path = pathFactory.create(environment.getClientEnvironment(), helper.getPath()); |
1061 |
| - if (scope.isPresent()) { |
1062 |
| - builder.add(scope.get(), path); |
1063 |
| - } else { |
1064 |
| - builder.add(path); |
1065 |
| - } |
1066 |
| - } |
1067 |
| - return builder.build(); |
1068 |
| - } |
1069 |
| - |
1070 | 1042 | static Credentials newCredentials(
|
1071 | 1043 | Map<String, String> clientEnv,
|
1072 | 1044 | FileSystem fileSystem,
|
@@ -1095,14 +1067,4 @@ static Credentials newCredentials(
|
1095 | 1067 |
|
1096 | 1068 | return credentials;
|
1097 | 1069 | }
|
1098 |
| - |
1099 |
| - @VisibleForTesting |
1100 |
| - @AutoValue |
1101 |
| - abstract static class ScopedCredentialHelper { |
1102 |
| - /** Returns the scope of the credential helper (if any). */ |
1103 |
| - public abstract Optional<String> getScope(); |
1104 |
| - |
1105 |
| - /** Returns the path of the credential helper. */ |
1106 |
| - public abstract Path getPath(); |
1107 |
| - } |
1108 | 1070 | }
|
0 commit comments