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
*[Accessing resources using an OIDC or SAML 2.0 identity provider](#accessing-resources-using-an-oidc-or-saml-20-identity-provider)
35
+
*[Accessing resources using external account authorized user workforce credentials](#using-external-account-authorized-user-workforce-credentials)
35
36
*[Accessing resources using Executable-sourced credentials](#using-executable-sourced-workforce-credentials-with-oidc-and-saml)
36
37
*[Downscoping with Credential Access Boundaries](#downscoping-with-credential-access-boundaries)
37
38
*[Configuring a Proxy](#configuring-a-proxy)
@@ -622,6 +623,29 @@ Where the following variables need to be substituted:
622
623
`$URL_TO_GET_SAML_ASSERTION`, e.g. `Metadata-Flavor=Google`.
623
624
-`$WORKFORCE_POOL_USER_PROJECT`: The project number associated with the [workforce pools user project](https://cloud.google.com/iam/docs/workforce-identity-federation#workforce-pools-user-project).
624
625
626
+
#### Using external account authorized user workforce credentials
627
+
628
+
[External account authorized user credentials](https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#browser-based-sign-in) allow you to sign in with a web browser to an external identity provider account via the
629
+
gcloud CLI and create a configuration for the auth library to use.
630
+
631
+
To generate an external account authorized user workforce identity configuration, run the following command:
Where the following variable needs to be substituted:
638
+
-`$LOGIN_CONFIG`: The login config file generated with the cloud console or
639
+
[gcloud iam workforce-pools create-login-config](https://cloud.google.com/sdk/gcloud/reference/iam/workforce-pools/create-login-config)
640
+
641
+
This will open a browser flow for you to sign in via the configured third party identity provider
642
+
and then will store the external account authorized user configuration at the well known ADC location.
643
+
The auth library will then use the provided refresh token from the configuration to generate and refresh
644
+
an access token to call Google Cloud services.
645
+
646
+
Note that the default lifetime of the refresh token is one hour, after which a new configuration will need to be generated from the gcloud CLI.
647
+
The lifetime can be modified by changing the [session duration of the workforce pool](https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools), and can be set as high as 12 hours.
648
+
625
649
#### Using Executable-sourced workforce credentials with OIDC and SAML
0 commit comments