snowflakedb/snowflake-jdbc

SNOW-980268: JWT Expiry and Query Execution Time in Snowflake JDBC Driver

Closed this issue · 0 comments

Hello,

it's probably not bug, I would like to confirm driver specification.
I have a question regarding the behavior of a driver when passing a user and private key. I understand from the documentation that the driver automatically adopts snowflake_jwt as the authenticator in this scenario.

While reading the driver's source code, I noticed that the JWT expiry is set to one minute:

// expiration is 60 seconds later
Date exp = new Date(iat.getTime() + 60L * 1000);

However, when using the driver to execute a query like select system$wait(6000); in Snowflake, it seems to wait appropriately.

My questions are as follows:

  1. Is this behavior intentional?
  2. If the behavior in question 1 is intentional, what does this 'exp' represent?
  3. What is the appropriate way to control the maximum time the driver waits for a query execution when connected to Snowflake?

Thank you in advance for your assistance.