@@ -278,20 +278,52 @@ type Format struct {
278
278
type CredentialSource struct {
279
279
// File is the location for file sourced credentials.
280
280
// One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
281
+ //
282
+ // Important: If you accept a credential configuration (credential
283
+ // JSON/File/Stream) from an external source for authentication to Google
284
+ // Cloud Platform, you must validate it before providing it to any Google
285
+ // API or library. Providing an unvalidated credential configuration to
286
+ // Google APIs can compromise the security of your systems and data. For
287
+ // more information, refer to [Validate credential configurations from
288
+ // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
281
289
File string `json:"file"`
282
290
283
291
// Url is the URL to call for URL sourced credentials.
284
292
// One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
293
+ //
294
+ // Important: If you accept a credential configuration (credential
295
+ // JSON/File/Stream) from an external source for authentication to Google
296
+ // Cloud Platform, you must validate it before providing it to any Google
297
+ // API or library. Providing an unvalidated credential configuration to
298
+ // Google APIs can compromise the security of your systems and data. For
299
+ // more information, refer to [Validate credential configurations from
300
+ // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
285
301
URL string `json:"url"`
286
302
// Headers are the headers to attach to the request for URL sourced credentials.
287
303
Headers map [string ]string `json:"headers"`
288
304
289
305
// Executable is the configuration object for executable sourced credentials.
290
306
// One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
307
+ //
308
+ // Important: If you accept a credential configuration (credential
309
+ // JSON/File/Stream) from an external source for authentication to Google
310
+ // Cloud Platform, you must validate it before providing it to any Google
311
+ // API or library. Providing an unvalidated credential configuration to
312
+ // Google APIs can compromise the security of your systems and data. For
313
+ // more information, refer to [Validate credential configurations from
314
+ // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
291
315
Executable * ExecutableConfig `json:"executable"`
292
316
293
317
// EnvironmentID is the EnvironmentID used for AWS sourced credentials. This should start with "AWS".
294
318
// One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question.
319
+ //
320
+ // Important: If you accept a credential configuration (credential
321
+ // JSON/File/Stream) from an external source for authentication to Google
322
+ // Cloud Platform, you must validate it before providing it to any Google
323
+ // API or library. Providing an unvalidated credential configuration to
324
+ // Google APIs can compromise the security of your systems and data. For
325
+ // more information, refer to [Validate credential configurations from
326
+ // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
295
327
EnvironmentID string `json:"environment_id"`
296
328
// RegionURL is the metadata URL to retrieve the region from for EC2 AWS credentials.
297
329
RegionURL string `json:"region_url"`
@@ -329,7 +361,7 @@ type SubjectTokenSupplier interface {
329
361
type AwsSecurityCredentialsSupplier interface {
330
362
// AwsRegion should return the AWS region or an error.
331
363
AwsRegion (ctx context.Context , options SupplierOptions ) (string , error )
332
- // GetAwsSecurityCredentials should return a valid set of AwsSecurityCredentials or an error.
364
+ // AwsSecurityCredentials should return a valid set of AwsSecurityCredentials or an error.
333
365
// The external account token source does not cache the returned security credentials, so caching
334
366
// logic should be implemented in the supplier to prevent multiple requests for the same security credentials.
335
367
AwsSecurityCredentials (ctx context.Context , options SupplierOptions ) (* AwsSecurityCredentials , error )
0 commit comments