@@ -85,6 +85,17 @@ def load_credentials_from_file(
8585 user credentials, external account credentials, or impersonated service
8686 account credentials.
8787
88+ .. warning::
89+ Important: If you accept a credential configuration (credential JSON/File/Stream)
90+ from an external source for authentication to Google Cloud Platform, you must
91+ validate it before providing it to any Google API or client library. Providing an
92+ unvalidated credential configuration to Google APIs or libraries can compromise
93+ the security of your systems and data. For more information, refer to
94+ `Validate credential configurations from external sources`_.
95+
96+ .. _Validate credential configurations from external sources:
97+ https://cloud.google.com/docs/authentication/external/externally-sourced-credentials
98+
8899 Args:
89100 filename (str): The full path to the credentials file.
90101 scopes (Optional[Sequence[str]]): The list of scopes for the credentials. If
@@ -137,6 +148,17 @@ def load_credentials_from_dict(
137148 user credentials, external account credentials, or impersonated service
138149 account credentials.
139150
151+ .. warning::
152+ Important: If you accept a credential configuration (credential JSON/File/Stream)
153+ from an external source for authentication to Google Cloud Platform, you must
154+ validate it before providing it to any Google API or client library. Providing an
155+ unvalidated credential configuration to Google APIs or libraries can compromise
156+ the security of your systems and data. For more information, refer to
157+ `Validate credential configurations from external sources`_.
158+
159+ .. _Validate credential configurations from external sources:
160+ https://cloud.google.com/docs/authentication/external/externally-sourced-credentials
161+
140162 Args:
141163 info (Dict[str, Any]): A dict object containing the credentials
142164 scopes (Optional[Sequence[str]]): The list of scopes for the credentials. If
0 commit comments