Skip to content

Commit

Permalink
docs: Add warning note about user provided credential configurations.
Browse files Browse the repository at this point in the history
Towards b/389125232
  • Loading branch information
amanda-tarafa committed Jan 22, 2025
1 parent 1ac8d14 commit 97e682e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Google.Api.Gax.Grpc/ClientBuilderBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,25 @@ public abstract class ClientBuilderBase<TClient>
/// <summary>
/// The path to the credentials file to use, or null if credentials are being provided in a different way.
/// </summary>
/// <remarks>
/// Important: If you accept a credential configuration (credential JSON/File/Stream) from an external source
/// for authentication to Google Cloud, you must validate it before providing it to any Google API or library.
/// Providing an unvalidated credential configuration to Google APIs can compromise the security of your
/// systems and data. For more information, refer to
/// <see href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">Validate credential configurations from external sources</see>.
/// </remarks>
public string CredentialsPath { get; set; }

/// <summary>
/// The credentials to use as a JSON string, or null if credentials are being provided in a different way.
/// </summary>
/// <remarks>
/// Important: If you accept a credential configuration (credential JSON/File/Stream) from an external source
/// for authentication to Google Cloud, you must validate it before providing it to any Google API or library.
/// Providing an unvalidated credential configuration to Google APIs can compromise the security of your
/// systems and data. For more information, refer to
/// <see href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">Validate credential configurations from external sources</see>.
/// </remarks>
public string JsonCredentials { get; set; }

/// <summary>
Expand Down
14 changes: 14 additions & 0 deletions Google.Api.Gax.Rest/ClientBuilderBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,26 @@ public abstract class ClientBuilderBase<TClient>
/// The path to the credentials file to use, or null if credentials are being provided in a different way.
/// The resulting credential is automatically scoped with the default scopes for the API.
/// </summary>
/// <remarks>
/// Important: If you accept a credential configuration (credential JSON/File/Stream) from an external source
/// for authentication to Google Cloud, you must validate it before providing it to any Google API or library.
/// Providing an unvalidated credential configuration to Google APIs can compromise the security of your
/// systems and data. For more information, refer to
/// <see href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">Validate credential configurations from external sources</see>.
/// </remarks>
public string CredentialsPath { get; set; }

/// <summary>
/// The credentials to use as a JSON string, or null if credentials are being provided in a different way.
/// The resulting credential is automatically scoped with the default scopes for the API.
/// </summary>
/// <remarks>
/// Important: If you accept a credential configuration (credential JSON/File/Stream) from an external source
/// for authentication to Google Cloud, you must validate it before providing it to any Google API or library.
/// Providing an unvalidated credential configuration to Google APIs can compromise the security of your
/// systems and data. For more information, refer to
/// <see href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">Validate credential configurations from external sources</see>.
/// </remarks>
public string JsonCredentials { get; set; }

/// <summary>
Expand Down

0 comments on commit 97e682e

Please sign in to comment.