docs: public synchronized void open() throws SFException, SnowflakeSQLException
    {
      performSanityCheckOnProperties();
  
      Boolean insecureMode = (Boolean) connectionPropertiesMap.get(
          SFSessionProperty.INSECURE_MODE);
  
      HttpUtil.configureCustomProxyProperties(connectionPropertiesMap);
  
      HttpUtil.initHttpClient(insecureMode != null ? insecureMode : false, null);
  
      logger.debug(
          "input: server={}, account={}, user={}, password={}, role={}, " +
          "database={}, schema={}, warehouse={}, authenticator={}, insecure_mode={}, " +
          "passcode_in_passward={}, passcode={}, private_key={}, " +
          "use_proxy={}, proxy_host={}, proxy_port={}, proxy_user={}, proxy_password={}, disable_socks_proxy={}, " +
          "application={}, app_id={}, app_version={}, " +
          "login_timeout={}, network_timeout={}, query_timeout={}, tracing={}",
          connectionPropertiesMap.get(SFSessionProperty.SERVER_URL),
          connectionPropertiesMap.get(SFSessionProperty.ACCOUNT),
          connectionPropertiesMap.get(SFSessionProperty.USER),
          !Strings.isNullOrEmpty((String) connectionPropertiesMap.get(SFSessionProperty.PASSWORD)) ? "***" : "(empty)",
          connectionPropertiesMap.get(SFSessionProperty.ROLE),
          connectionPropertiesMap.get(SFSessionProperty.DATABASE),
          connectionPropertiesMap.get(SFSessionProperty.SCHEMA),
          connectionPropertiesMap.get(SFSessionProperty.WAREHOUSE),
          connectionPropertiesMap.get(SFSessionProperty.AUTHENTICATOR),
  
          connectionPropertiesMap.get(SFSessionProperty.INSECURE_MODE),
          connectionPropertiesMap.get(SFSessionProperty.PASSCODE_IN_PASSWORD),
          !Strings.isNullOrEmpty((String) connectionPropertiesMap.get(SFSessionProperty.PASSCODE)) ? "***" : "(empty)",
  
          connectionPropertiesMap.get(SFSessionProperty.PRIVATE_KEY) != null ? "(not null)" : "(null)",
  
          connectionPropertiesMap.get(SFSessionProperty.USE_PROXY),
          connectionPropertiesMap.get(SFSessionProperty.PROXY_HOST),
          connectionPropertiesMap.get(SFSessionProperty.PROXY_PORT),
          connectionPropertiesMap.get(SFSessionProperty.PROXY_USER),
          !Strings.isNullOrEmpty((String) connectionPropertiesMap.get(SFSessionProperty.PROXY_PASSWORD)) ? "***" :
          "(empty)",
          connectionPropertiesMap.get(SFSessionProperty.DISABLE_SOCKS_PROXY),
  
          connectionPropertiesMap.get(SFSessionProperty.APPLICATION),
          connectionPropertiesMap.get(SFSessionProperty.APP_ID),
          connectionPropertiesMap.get(SFSessionProperty.APP_VERSION),
  
          connectionPropertiesMap.get(SFSessionProperty.LOGIN_TIMEOUT),
          connectionPropertiesMap.get(SFSessionProperty.NETWORK_TIMEOUT),
          connectionPropertiesMap.get(SFSessionProperty.QUERY_TIMEOUT),
          connectionPropertiesMap.get(SFSessionProperty.TRACING)
      );
      SessionUtil.LoginInput loginInput = new SessionUtil.LoginInput();
      loginInput.setServerUrl(
          (String) connectionPropertiesMap.get(SFSessionProperty.SERVER_URL))
          .setDatabaseName(
              (String) connectionPropertiesMap.get(SFSessionProperty.DATABASE))
          .setSchemaName(
              (String) connectionPropertiesMap.get(SFSessionProperty.SCHEMA))
          .setWarehouse(
              (String) connectionPropertiesMap.get(SFSessionProperty.WAREHOUSE))
          .setRole((String) connectionPropertiesMap.get(SFSessionProperty.ROLE))
          .setAuthenticator(
              (String) connectionPropertiesMap.get(SFSessionProperty.AUTHENTICATOR))
          .setAccountName(
              (String) connectionPropertiesMap.get(SFSessionProperty.ACCOUNT))
          .setLoginTimeout(loginTimeout)
          .setUserName(
              (String) connectionPropertiesMap.get(SFSessionProperty.USER))
          .setPassword(
              (String) connectionPropertiesMap.get(SFSessionProperty.PASSWORD))
          .setToken(
              (String) connectionPropertiesMap.get(SFSessionProperty.TOKEN))
          .setIdToken(
              (String) connectionPropertiesMap.get(SFSessionProperty.ID_TOKEN))
          .setClientInfo(this.getClientInfo())
          .setPasscodeInPassword(passcodeInPassword)
          .setPasscode(
              (String) connectionPropertiesMap.get(SFSessionProperty.PASSCODE))
          .setConnectionTimeout(httpClientConnectionTimeout)
          .setSocketTimeout(httpClientSocketTimeout)
          .setAppId((String) connectionPropertiesMap.get(SFSessionProperty.APP_ID))
          .setAppVersion(
              (String) connectionPropertiesMap.get(SFSessionProperty.APP_VERSION))
          .setSessionParameters(sessionParametersMap)
          .setPrivateKey((PrivateKey) connectionPropertiesMap.get(
              SFSessionProperty.PRIVATE_KEY))
          .setApplication((String) connectionPropertiesMap.get(
              SFSessionProperty.APPLICATION))
          .setServiceName(this.getServiceName());
  
      SessionUtil.LoginOutput loginOutput = SessionUtil.openSession(loginInput);
      isClosed = false;
  
      if (loginOutput.isUpdatedByTokenRequest())
      {
        setCurrentObjects(loginInput, loginOutput);
      }
  
      sessionToken = loginOutput.getSessionToken();
      masterToken = loginOutput.getMasterToken();
      idToken = loginOutput.getIdToken();
      databaseVersion = loginOutput.getDatabaseVersion();
      databaseMajorVersion = loginOutput.getDatabaseMajorVersion();
      databaseMinorVersion = loginOutput.getDatabaseMinorVersion();
      httpClientSocketTimeout = loginOutput.getHttpClientSocketTimeout();
      masterTokenValidityInSeconds = loginOutput.getMasterTokenValidityInSeconds();
      database = loginOutput.getSessionDatabase();
      schema = loginOutput.getSessionSchema();
      role = loginOutput.getSessionRole();
      warehouse = loginOutput.getSessionWarehouse();
  
      // Update common parameter values for this session
      SessionUtil.updateSfDriverParamValues(loginOutput.getCommonParams(), this);
  
      String loginDatabaseName = (String) connectionPropertiesMap.get(
          SFSessionProperty.DATABASE);
      String loginSchemaName = (String) connectionPropertiesMap.get(
          SFSessionProperty.SCHEMA);
      String loginRole = (String) connectionPropertiesMap.get(
          SFSessionProperty.ROLE);
      String loginWarehouse = (String) connectionPropertiesMap.get(
          SFSessionProperty.WAREHOUSE);
  
      if (loginDatabaseName != null && !loginDatabaseName
          .equalsIgnoreCase(database))
      {
        sqlWarnings.add(new SFException(ErrorCode
                                            .CONNECTION_ESTABLISHED_WITH_DIFFERENT_PROP,
                                        "Database", loginDatabaseName, database));
      }
  
      if (loginSchemaName != null && !loginSchemaName
          .equalsIgnoreCase(schema))
      {
        sqlWarnings.add(new SFException(ErrorCode.
                                            CONNECTION_ESTABLISHED_WITH_DIFFERENT_PROP,
                                        "Schema", loginSchemaName, schema));
      }
  
      if (loginRole != null && !loginRole
          .equalsIgnoreCase(role))
      {
        sqlWarnings.add(new SFException(ErrorCode.
                                            CONNECTION_ESTABLISHED_WITH_DIFFERENT_PROP,
                                        "Role", loginRole, role));
      }
  
      if (loginWarehouse != null && !loginWarehouse
          .equalsIgnoreCase(warehouse))
      {
        sqlWarnings.add(new SFException(ErrorCode.
                                            CONNECTION_ESTABLISHED_WITH_DIFFERENT_PROP,
                                        "Warehouse", loginWarehouse, warehouse));
      }
  
      // start heartbeat for this session so that the master token will not expire
      startHeartbeatForThisSession();
    }