private void loadJWKSets() throws IOException, ParseException, GeneralSecurityException {
    String jwksURL = HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_SERVER2_AUTHENTICATION_JWT_JWKS_URL);
    if (jwksURL == null || jwksURL.isEmpty()) {
      throw new IOException("Invalid value of property: " + 
          HiveConf.ConfVars.HIVE_SERVER2_AUTHENTICATION_JWT_JWKS_URL.varname);
    }
    String[] jwksURLs = jwksURL.split(",");
    for (String urlString : jwksURLs) {
      SSLContext context = null;
      if (HiveConf.getBoolVar(conf, HiveConf.ConfVars.HIVE_SERVER2_AUTHENTICATION_JWT_JWKS_SKIP_SSL_CERT, false)) {
        context = SSLContext.getInstance("TLS");
        X509TrustManager trustAllManager = new X509TrustManager() {
          @Override
          public void checkClientTrusted(X509Certificate[] chain, String authType)
              throws CertificateException {
          }
          @Override
          public void checkServerTrusted(X509Certificate[] chain, String authType)
              throws CertificateException {
          }
          @Override
          public X509Certificate[] getAcceptedIssuers() {
            return new X509Certificate[0];
          }
        };
        context.init(null, new X509TrustManager[]{trustAllManager}, new SecureRandom());
      }
      HttpGet get = new HttpGet(urlString);
      try (CloseableHttpClient httpClient = HttpClients.custom().setSSLContext(context).build();
          CloseableHttpResponse response = httpClient.execute(get)) {
        HttpEntity entity = response.getEntity();
        if (entity != null) {
          jwkSets.add(JWKSet.load(entity.getContent()));
        }
      }
      LOG.info("Loaded JWKS from " + urlString);
    }
  }
Fetches the JWKS and stores into memory. The JWKS are expected to be in the standard form as defined here -
https://datatracker.ietf.org/doc/html/rfc7517#appendix-A.
service/src/java/org/apache/hive/service/auth/jwt/URLBasedJWKSProvider.java