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
These are all required fields for an error response. The code and message
416
+
fields will be used by the library as part of the thrown exception.
417
+
418
+
Response format fields summary:
419
+
*`version`: The version of the JSON output. Currently only version 1 is supported.
420
+
*`success`: The status of the response. When true, the response must contain the 3rd party token,
421
+
token type, and expiration. The executable must also exit with exit code 0.
422
+
When false, the response must contain the error code and message fields and exit with a non-zero value.
423
+
*`token_type`: The 3rd party subject token type. Must be *urn:ietf:params:oauth:token-type:jwt*,
424
+
*urn:ietf:params:oauth:token-type:id_token*, or *urn:ietf:params:oauth:token-type:saml2*.
425
+
*`id_token`: The 3rd party OIDC token.
426
+
*`saml_response`: The 3rd party SAML response.
427
+
*`expiration_time`: The 3rd party subject token expiration time in seconds (unix epoch time).
428
+
*`code`: The error code string.
429
+
*`message`: The error message.
430
+
431
+
All response types must include both the `version` and `success` fields.
432
+
* Successful responses must include the `token_type`, `expiration_time`, and one of
433
+
`id_token` or `saml_response`.
434
+
* Error responses must include both the `code` and `message` fields.
435
+
436
+
The library will populate the following environment variables when the executable is run:
437
+
*`GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE`: The audience field from the credential configuration. Always present.
438
+
*`GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL`: The service account email. Only present when service account impersonation is used.
439
+
*`GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE`: The output file location from the credential configuration. Only present when specified in the credential configuration.
440
+
441
+
These environment variables can be used by the executable to avoid hard-coding these values.
442
+
443
+
##### Security considerations
444
+
The following security practices are highly recommended:
445
+
* Access to the script should be restricted as it will be displaying credentials to stdout. This ensures that rogue processes do not gain access to the script.
446
+
* The configuration file should not be modifiable. Write access should be restricted to avoid processes modifying the executable command portion.
447
+
448
+
Given the complexity of using executable-sourced credentials, it is recommended to use
449
+
the existing supported mechanisms (file-sourced/URL-sourced) for providing 3rd party
450
+
credentials unless they do not meet your specific requirements.
451
+
452
+
You can now [use the Auth library](#using-external-identities) to call Google Cloud
453
+
resources from an OIDC or SAML provider.
454
+
326
455
#### Using External Identities
327
456
328
457
External identities (AWS, Azure, and OIDC-based providers) can be used with
0 commit comments