You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnil, fmt.Errorf("oauth2/google: One of CredentialSource, SubjectTokenSupplier, or AwsSecurityCredentialsSupplier must be set")
215
+
returnnil, fmt.Errorf("oauth2/google/externalaccount: One of CredentialSource, SubjectTokenSupplier, or AwsSecurityCredentialsSupplier must be set")
216
216
}
217
217
ifcount>1 {
218
-
returnnil, fmt.Errorf("oauth2/google: Only one of CredentialSource, SubjectTokenSupplier, or AwsSecurityCredentialsSupplier must be set")
218
+
returnnil, fmt.Errorf("oauth2/google/externalaccount: Only one of CredentialSource, SubjectTokenSupplier, or AwsSecurityCredentialsSupplier must be set")
219
219
}
220
220
returnconf.tokenSource(ctx, "https")
221
221
}
@@ -263,21 +263,23 @@ type Format struct {
263
263
}
264
264
265
265
// CredentialSource stores the information necessary to retrieve the credentials for the STS exchange.
266
-
// One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
267
-
// The EnvironmentID should start with AWS if being used for an AWS credential.
268
266
typeCredentialSourcestruct {
269
267
// File is the location for file sourced credentials.
268
+
// One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
270
269
Filestring`json:"file"`
271
270
272
271
// Url is the URL to call for URL sourced credentials.
272
+
// One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
273
273
URLstring`json:"url"`
274
-
// Headers are the Headers to attach to the request for URL sourced credentials.
274
+
// Headers are the headers to attach to the request for URL sourced credentials.
275
275
Headersmap[string]string`json:"headers"`
276
276
277
277
// Executable is the configuration object for executable sourced credentials.
278
+
// One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
278
279
Executable*ExecutableConfig`json:"executable"`
279
280
280
-
// EnvironmentID is the EnvironmentID used for AWS sourced credentials.
281
+
// EnvironmentID is the EnvironmentID used for AWS sourced credentials. This should start with "AWS".
282
+
// One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
281
283
EnvironmentIDstring`json:"environment_id"`
282
284
// RegionURL is the metadata URL to retrieve the region from for EC2 AWS credentials.
283
285
RegionURLstring`json:"region_url"`
@@ -295,7 +297,7 @@ type ExecutableConfig struct {
295
297
// Command is the the full command to run to retrieve the subject token.
296
298
// This can include arguments. Must be an absolute path for the program. Required.
297
299
Commandstring`json:"command"`
298
-
// TimeoutMillis is the timeout duration, in milliseconds. Defaults to 30 seconds when not provided. Optional.
300
+
// TimeoutMillis is the timeout duration, in milliseconds. Defaults to 30000 milliseconds when not provided. Optional.
299
301
TimeoutMillis*int`json:"timeout_millis"`
300
302
// OutputFile is the absolute path to the output file where the executable will cache the response.
301
303
// If specified the auth libraries will first check this location before running the executable. Optional.
@@ -310,7 +312,7 @@ type SubjectTokenSupplier interface {
ifgot, want:=err.Error(), "oauth2/google: Workforce pool user project should not be set for non-workforce pool credentials"; got!=want {
274
+
ifgot, want:=err.Error(), "oauth2/google/externalaccount: Workforce pool user project should not be set for non-workforce pool credentials"; got!=want {
returnerrors.New("oauth2/google: executables need to be explicitly allowed (set GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES to '1') to run")
78
+
returnerrors.New("oauth2/google/externalaccount: executables need to be explicitly allowed (set GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES to '1') to run")
79
79
}
80
80
81
81
functimeoutRangeError() error {
82
-
returnerrors.New("oauth2/google: invalid `timeout_millis` field — executable timeout must be between 5 and 120 seconds")
82
+
returnerrors.New("oauth2/google/externalaccount: invalid `timeout_millis` field — executable timeout must be between 5 and 120 seconds")
83
83
}
84
84
85
85
funccommandMissingError() error {
86
-
returnerrors.New("oauth2/google: missing `command` field — executable command must be provided")
86
+
returnerrors.New("oauth2/google/externalaccount: missing `command` field — executable command must be provided")
0 commit comments