doc.go 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. // Package credentials provides support for making OAuth2 authorized and
  15. // authenticated HTTP requests to Google APIs. It supports the Web server flow,
  16. // client-side credentials, service accounts, Google Compute Engine service
  17. // accounts, Google App Engine service accounts and workload identity federation
  18. // from non-Google cloud platforms.
  19. //
  20. // A brief overview of the package follows. For more information, please read
  21. // https://developers.google.com/accounts/docs/OAuth2
  22. // and
  23. // https://developers.google.com/accounts/docs/application-default-credentials.
  24. // For more information on using workload identity federation, refer to
  25. // https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation.
  26. //
  27. // # Credentials
  28. //
  29. // The [cloud.google.com/go/auth.Credentials] type represents Google
  30. // credentials, including Application Default Credentials.
  31. //
  32. // Use [DetectDefault] to obtain Application Default Credentials.
  33. //
  34. // Application Default Credentials support workload identity federation to
  35. // access Google Cloud resources from non-Google Cloud platforms including Amazon
  36. // Web Services (AWS), Microsoft Azure or any identity provider that supports
  37. // OpenID Connect (OIDC). Workload identity federation is recommended for
  38. // non-Google Cloud environments as it avoids the need to download, manage, and
  39. // store service account private keys locally.
  40. //
  41. // # Workforce Identity Federation
  42. //
  43. // For more information on this feature see [cloud.google.com/go/auth/credentials/externalaccount].
  44. package credentials