@@ -199,6 +199,13 @@ public static GoogleCredential getApplicationDefault(
199199 * {@link Beta} <br>
200200 * Return a credential defined by a Json file.
201201 *
202+ * <p>Important: If you accept a credential configuration (credential JSON/File/Stream) from an
203+ * external source for authentication to Google Cloud Platform, you must validate it before
204+ * providing it to any Google API or library. Providing an unvalidated credential configuration to
205+ * Google APIs can compromise the security of your systems and data. For more information, refer
206+ * to {@link <a
207+ * href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">documentation</a>}.
208+ *
202209 * @param credentialStream the stream with the credential definition.
203210 * @return the credential defined by the credentialStream.
204211 * @throws IOException if the credential cannot be created from the stream.
@@ -212,6 +219,13 @@ public static GoogleCredential fromStream(InputStream credentialStream) throws I
212219 * {@link Beta} <br>
213220 * Return a credential defined by a Json file.
214221 *
222+ * <p>Important: If you accept a credential configuration (credential JSON/File/Stream) from an
223+ * external source for authentication to Google Cloud Platform, you must validate it before
224+ * providing it to any Google API or library. Providing an unvalidated credential configuration to
225+ * Google APIs can compromise the security of your systems and data. For more information, refer
226+ * to {@link <a
227+ * href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">documentation</a>}.
228+ *
215229 * @param credentialStream the stream with the credential definition.
216230 * @param transport the transport for Http calls.
217231 * @param jsonFactory the factory for Json parsing and formatting.
0 commit comments