|
26 | 26 | // |
27 | 27 | // Using workload identity federation, your application can access Google Cloud |
28 | 28 | // resources from Amazon Web Services (AWS), Microsoft Azure or any identity |
29 | | -// provider that supports OpenID Connect (OIDC). |
| 29 | +// provider that supports OpenID Connect (OIDC) or SAML 2.0. |
30 | 30 | // Traditionally, applications running outside Google Cloud have used service |
31 | 31 | // account keys to access Google Cloud resources. Using identity federation, |
32 | 32 | // you can allow your workload to impersonate a service account. |
|
36 | 36 | // Follow the detailed instructions on how to configure Workload Identity Federation |
37 | 37 | // in various platforms: |
38 | 38 | // |
39 | | -// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/access-resources-aws |
40 | | -// Microsoft Azure: https://cloud.google.com/iam/docs/access-resources-azure |
41 | | -// OIDC identity provider: https://cloud.google.com/iam/docs/access-resources-oidc |
| 39 | +// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#aws |
| 40 | +// Microsoft Azure: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#azure |
| 41 | +// OIDC identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#oidc |
| 42 | +// SAML 2.0 identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#saml |
42 | 43 | // |
43 | 44 | // For OIDC and SAML providers, the library can retrieve tokens in three ways: |
44 | 45 | // from a local file location (file-sourced credentials), from a server |
45 | 46 | // (URL-sourced credentials), or from a local executable (executable-sourced |
46 | 47 | // credentials). |
47 | 48 | // For file-sourced credentials, a background process needs to be continuously |
48 | | -// refreshing the file location with a new OIDC token prior to expiration. |
| 49 | +// refreshing the file location with a new OIDC/SAML token prior to expiration. |
49 | 50 | // For tokens with one hour lifetimes, the token needs to be updated in the file |
50 | 51 | // every hour. The token can be stored directly as plain text or in JSON format. |
51 | 52 | // For URL-sourced credentials, a local server needs to host a GET endpoint to |
52 | | -// return the OIDC token. The response can be in plain text or JSON. |
| 53 | +// return the OIDC/SAML token. The response can be in plain text or JSON. |
53 | 54 | // Additional required request headers can also be specified. |
54 | 55 | // For executable-sourced credentials, an application needs to be available to |
55 | | -// output the OIDC token and other information in a JSON format. |
| 56 | +// output the OIDC/SAML token and other information in a JSON format. |
56 | 57 | // For more information on how these work (and how to implement |
57 | 58 | // executable-sourced credentials), please check out: |
58 | | -// https://cloud.google.com/iam/docs/using-workload-identity-federation#oidc |
| 59 | +// https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#create_a_credential_configuration |
| 60 | +// |
| 61 | +// Note that this library does not perform any validation on the token_url, token_info_url, |
| 62 | +// or service_account_impersonation_url fields of the credential configuration. |
| 63 | +// It is not recommended to use a credential configuration that you did not generate with |
| 64 | +// the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain. |
| 65 | +// |
| 66 | +// # Workforce Identity Federation |
| 67 | +// |
| 68 | +// Workforce identity federation lets you use an external identity provider (IdP) to |
| 69 | +// authenticate and authorize a workforce—a group of users, such as employees, partners, |
| 70 | +// and contractors—using IAM, so that the users can access Google Cloud services. |
| 71 | +// Workforce identity federation extends Google Cloud's identity capabilities to support |
| 72 | +// syncless, attribute-based single sign on. |
| 73 | +// |
| 74 | +// With workforce identity federation, your workforce can access Google Cloud resources |
| 75 | +// using an external identity provider (IdP) that supports OpenID Connect (OIDC) or |
| 76 | +// SAML 2.0 such as Azure Active Directory (Azure AD), Active Directory Federation |
| 77 | +// Services (AD FS), Okta, and others. |
| 78 | +// |
| 79 | +// Follow the detailed instructions on how to configure Workload Identity Federation |
| 80 | +// in various platforms: |
| 81 | +// |
| 82 | +// Azure AD: https://cloud.google.com/iam/docs/workforce-sign-in-azure-ad |
| 83 | +// Okta: https://cloud.google.com/iam/docs/workforce-sign-in-okta |
| 84 | +// OIDC identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#oidc |
| 85 | +// SAML 2.0 identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#saml |
| 86 | +// |
| 87 | +// For workforce identity federation, the library can retrieve tokens in three ways: |
| 88 | +// from a local file location (file-sourced credentials), from a server |
| 89 | +// (URL-sourced credentials), or from a local executable (executable-sourced |
| 90 | +// credentials). |
| 91 | +// For file-sourced credentials, a background process needs to be continuously |
| 92 | +// refreshing the file location with a new OIDC/SAML token prior to expiration. |
| 93 | +// For tokens with one hour lifetimes, the token needs to be updated in the file |
| 94 | +// every hour. The token can be stored directly as plain text or in JSON format. |
| 95 | +// For URL-sourced credentials, a local server needs to host a GET endpoint to |
| 96 | +// return the OIDC/SAML token. The response can be in plain text or JSON. |
| 97 | +// Additional required request headers can also be specified. |
| 98 | +// For executable-sourced credentials, an application needs to be available to |
| 99 | +// output the OIDC/SAML token and other information in a JSON format. |
| 100 | +// For more information on how these work (and how to implement |
| 101 | +// executable-sourced credentials), please check out: |
| 102 | +// https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#generate_a_configuration_file_for_non-interactive_sign-in |
59 | 103 | // |
60 | 104 | // Note that this library does not perform any validation on the token_url, token_info_url, |
61 | 105 | // or service_account_impersonation_url fields of the credential configuration. |
|
86 | 130 | // same as the one obtained from the oauth2.Config returned from ConfigFromJSON or |
87 | 131 | // JWTConfigFromJSON, but the Credentials may contain additional information |
88 | 132 | // that is useful is some circumstances. |
89 | | -// |
90 | 133 | package google // import "golang.org/x/oauth2/google" |
0 commit comments