From 4bad7d125b3e26b9a23960c9f256c6687d57cee7 Mon Sep 17 00:00:00 2001 From: Przemyslaw Motacki Date: Tue, 12 Nov 2024 10:38:16 +0100 Subject: [PATCH] SNOW-1689931 Adding flag to skip token file permission verification --- .../snowflake/client/config/SFConnectionConfigParser.java | 2 ++ .../java/net/snowflake/client/core/SFSessionProperty.java | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/snowflake/client/config/SFConnectionConfigParser.java b/src/main/java/net/snowflake/client/config/SFConnectionConfigParser.java index 6577a921a..00c4a2a21 100644 --- a/src/main/java/net/snowflake/client/config/SFConnectionConfigParser.java +++ b/src/main/java/net/snowflake/client/config/SFConnectionConfigParser.java @@ -63,6 +63,8 @@ public static ConnectionParameters buildConnectionParameters() throws SnowflakeS convertSystemGetEnvToBooleanValue(SKIP_TOKEN_FILE_PERMISSIONS_VERIFICATION, false); if (!shouldSkipTokenFilePermissionsVerification) { verifyFilePermissionSecure(path); + } else { + logger.debug("Skip token file permissions verification"); } String token = new String(Files.readAllBytes(path), Charset.defaultCharset()); if (!token.isEmpty()) { diff --git a/src/main/java/net/snowflake/client/core/SFSessionProperty.java b/src/main/java/net/snowflake/client/core/SFSessionProperty.java index 917ce5629..97c0adbc2 100644 --- a/src/main/java/net/snowflake/client/core/SFSessionProperty.java +++ b/src/main/java/net/snowflake/client/core/SFSessionProperty.java @@ -112,10 +112,7 @@ public enum SFSessionProperty { HTTP_CLIENT_CONNECTION_TIMEOUT("HTTP_CLIENT_CONNECTION_TIMEOUT", false, Integer.class), - HTTP_CLIENT_SOCKET_TIMEOUT("HTTP_CLIENT_SOCKET_TIMEOUT", false, Integer.class), - - SKIP_TOKEN_FILE_PERMISSIONS_VERIFICATION( - "SKIP_TOKEN_FILE_PERMISSIONS_VERIFICATION", false, Boolean.class); + HTTP_CLIENT_SOCKET_TIMEOUT("HTTP_CLIENT_SOCKET_TIMEOUT", false, Integer.class); // property key in string private String propertyKey;