1 // Copyright 2023 Google LLC 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Package credentials provides support for making OAuth2 authorized and 16 // authenticated HTTP requests to Google APIs. It supports the Web server flow, 17 // client-side credentials, service accounts, Google Compute Engine service 18 // accounts, Google App Engine service accounts and workload identity federation 19 // from non-Google cloud platforms. 20 // 21 // A brief overview of the package follows. For more information, please read 22 // https://developers.google.com/accounts/docs/OAuth2 23 // and 24 // https://developers.google.com/accounts/docs/application-default-credentials. 25 // For more information on using workload identity federation, refer to 26 // https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation. 27 // 28 // # Credentials 29 // 30 // The [cloud.google.com/go/auth.Credentials] type represents Google 31 // credentials, including Application Default Credentials. 32 // 33 // Use [DetectDefault] to obtain Application Default Credentials. 34 // 35 // Application Default Credentials support workload identity federation to 36 // access Google Cloud resources from non-Google Cloud platforms including Amazon 37 // Web Services (AWS), Microsoft Azure or any identity provider that supports 38 // OpenID Connect (OIDC). Workload identity federation is recommended for 39 // non-Google Cloud environments as it avoids the need to download, manage, and 40 // store service account private keys locally. 41 // 42 // # Workforce Identity Federation 43 // 44 // For more information on this feature see [cloud.google.com/go/auth/credentials/externalaccount]. 45 package credentials 46