Skip to content

Commit

Permalink
SNOW-1689931 Adding flag to skip token file permission verification
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pmotacki committed Nov 25, 2024
1 parent 147d02e commit 29f19fc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public static ConnectionParameters buildConnectionParameters() throws SnowflakeS
loadDefaultConnectionConfiguration(defaultConnectionName);

if (fileConnectionConfiguration != null && !fileConnectionConfiguration.isEmpty()) {
Properties conectionProperties = new Properties();
conectionProperties.putAll(fileConnectionConfiguration);
Properties connectionProperties = new Properties();
connectionProperties.putAll(fileConnectionConfiguration);

String url = createUrl(fileConnectionConfiguration);
logger.debug("Url created using parameters from connection configuration file: {}", url);
Expand All @@ -68,15 +68,15 @@ public static ConnectionParameters buildConnectionParameters() throws SnowflakeS
}
String token = new String(Files.readAllBytes(path), Charset.defaultCharset());
if (!token.isEmpty()) {
putPropertyIfNotNull(conectionProperties, "token", token.trim());
putPropertyIfNotNull(connectionProperties, "token", token.trim());
} else {
logger.warn("The token has empty value");
}
} catch (Exception ex) {
throw new SnowflakeSQLException(ex, "There is a problem during reading token from file");
}
}
return new ConnectionParameters(url, conectionProperties);
return new ConnectionParameters(url, connectionProperties);
} else {
return null;
}
Expand Down

0 comments on commit 29f19fc

Please sign in to comment.