Skip to content

Commit 92620f9

Browse files
docs: add warning for encoded credential (googleapis#4182)
* chore(docs): add warning for encoded credential * chore: generalize comment * chore: generate libraries at Wed Oct 22 16:38:42 UTC 2025 * Revert "chore(docs): add warning for encoded credential" This reverts commit b28885f. * chore: move warning to ConnectionProperties * chore: generate libraries at Wed Oct 22 20:11:58 UTC 2025 * chore: add warning to CREDENTIALS_URL as well * chore: generate libraries at Wed Oct 22 21:05:13 UTC 2025 --------- Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
1 parent e18c9b8 commit 92620f9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperties.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,11 @@ public class ConnectionProperties {
261261
CREDENTIALS_PROPERTY_NAME,
262262
"The location of the credentials file to use for this connection. If neither this"
263263
+ " property or encoded credentials are set, the connection will use the default"
264-
+ " Google Cloud credentials for the runtime environment.",
264+
+ " Google Cloud credentials for the runtime environment. WARNING: Using this"
265+
+ " property without proper validation can expose the application to security risks."
266+
+ " It is intended for use with credentials from a trusted source only, as it could"
267+
+ " otherwise allow end-users to supply arbitrary credentials. For more information,"
268+
+ " seehttps://cloud.google.com/docs/authentication/client-libraries#external-credentials",
265269
DEFAULT_CREDENTIALS,
266270
StringValueConverter.INSTANCE,
267271
Context.STARTUP);
@@ -270,7 +274,11 @@ public class ConnectionProperties {
270274
ENCODED_CREDENTIALS_PROPERTY_NAME,
271275
"Base64-encoded credentials to use for this connection. If neither this property or a"
272276
+ " credentials location are set, the connection will use the default Google Cloud"
273-
+ " credentials for the runtime environment.",
277+
+ " credentials for the runtime environment. WARNING: Enabling this property without"
278+
+ " proper validation can expose the application to security risks. It is intended"
279+
+ " for use with credentials from a trusted source only, as it could otherwise allow"
280+
+ " end-users to supply arbitrary credentials. For more information, see"
281+
+ "https://cloud.google.com/docs/authentication/client-libraries#external-credentials",
274282
null,
275283
StringValueConverter.INSTANCE,
276284
Context.STARTUP);

0 commit comments

Comments
 (0)