Skip to content

fix: Add warnings to users about using credentials from external sources #2551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: Add warnings to users about using credentials from external sources
  • Loading branch information
zhumin8 committed Jan 17, 2025
commit ee52147376137a64c4b98ed9a1c5f2f3cf47a23e
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ public static GoogleCredential getApplicationDefault(
* {@link Beta} <br>
* Return a credential defined by a Json file.
*
* <p>Important: If you accept a credential configuration (credential JSON/File/Stream) from an
* external source for authentication to Google Cloud Platform, 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 {@link <a
* href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">documentation</a>}.
*
* @param credentialStream the stream with the credential definition.
* @return the credential defined by the credentialStream.
* @throws IOException if the credential cannot be created from the stream.
Expand All @@ -212,6 +219,13 @@ public static GoogleCredential fromStream(InputStream credentialStream) throws I
* {@link Beta} <br>
* Return a credential defined by a Json file.
*
* <p>Important: If you accept a credential configuration (credential JSON/File/Stream) from an
* external source for authentication to Google Cloud Platform, 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 {@link <a
* href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">documentation</a>}.
*
* @param credentialStream the stream with the credential definition.
* @param transport the transport for Http calls.
* @param jsonFactory the factory for Json parsing and formatting.
Expand Down
Loading