public class org.apache.hive.service.auth.jwt.URLBasedJWKSProvider extends java.lang.Object
{
private static final org.slf4j.Logger LOG;
private final org.apache.hadoop.hive.conf.HiveConf conf;
private java.util.List jwkSets;
public void <init>(org.apache.hadoop.hive.conf.HiveConf) throws java.io.IOException, java.text.ParseException, java.security.GeneralSecurityException
{
org.apache.hadoop.hive.conf.HiveConf v;
org.apache.hive.service.auth.jwt.URLBasedJWKSProvider v;
java.util.ArrayList v;
v := @this: org.apache.hive.service.auth.jwt.URLBasedJWKSProvider;
v := @parameter: org.apache.hadoop.hive.conf.HiveConf;
specialinvoke v.<java.lang.Object: void <init>()>();
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v.<org.apache.hive.service.auth.jwt.URLBasedJWKSProvider: java.util.List jwkSets> = v;
v.<org.apache.hive.service.auth.jwt.URLBasedJWKSProvider: org.apache.hadoop.hive.conf.HiveConf conf> = v;
specialinvoke v.<org.apache.hive.service.auth.jwt.URLBasedJWKSProvider: void loadJWKSets()>();
return;
}
private void loadJWKSets() throws java.io.IOException, java.text.ParseException, java.security.GeneralSecurityException
{
javax.net.ssl.SSLContext v;
com.nimbusds.jose.jwk.JWKSet v;
java.security.SecureRandom v;
javax.net.ssl.X509TrustManager[] v;
boolean v, v;
org.apache.http.HttpEntity v;
java.util.List v;
org.apache.http.client.methods.HttpGet v;
java.lang.Throwable v, v;
org.apache.hive.service.auth.jwt.URLBasedJWKSProvider v;
org.apache.hive.service.auth.jwt.URLBasedJWKSProvider$1 v;
java.lang.String[] v;
org.apache.hadoop.hive.conf.HiveConf$ConfVars v, v, v;
org.apache.http.client.methods.CloseableHttpResponse v;
int v, v;
java.lang.String v, v, v, v, v;
org.apache.http.impl.client.CloseableHttpClient v;
org.slf4j.Logger v;
org.apache.hadoop.hive.conf.HiveConf v, v;
java.io.IOException v;
org.apache.http.impl.client.HttpClientBuilder v, v;
java.io.InputStream v;
v := @this: org.apache.hive.service.auth.jwt.URLBasedJWKSProvider;
v = v.<org.apache.hive.service.auth.jwt.URLBasedJWKSProvider: org.apache.hadoop.hive.conf.HiveConf conf>;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_AUTHENTICATION_JWT_JWKS_URL>;
v = staticinvoke <org.apache.hadoop.hive.conf.HiveConf: java.lang.String getVar(org.apache.hadoop.conf.Configuration,org.apache.hadoop.hive.conf.HiveConf$ConfVars)>(v, v);
if v == null goto label;
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v == 0 goto label;
label:
v = new java.io.IOException;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_AUTHENTICATION_JWT_JWKS_URL>;
v = v.<org.apache.hadoop.hive.conf.HiveConf$ConfVars: java.lang.String varname>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Invalid value of property: \u0001");
specialinvoke v.<java.io.IOException: void <init>(java.lang.String)>(v);
throw v;
label:
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String)>(",");
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = null;
v = v.<org.apache.hive.service.auth.jwt.URLBasedJWKSProvider: org.apache.hadoop.hive.conf.HiveConf conf>;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_AUTHENTICATION_JWT_JWKS_SKIP_SSL_CERT>;
v = staticinvoke <org.apache.hadoop.hive.conf.HiveConf: boolean getBoolVar(org.apache.hadoop.conf.Configuration,org.apache.hadoop.hive.conf.HiveConf$ConfVars,boolean)>(v, v, 0);
if v == 0 goto label;
v = staticinvoke <javax.net.ssl.SSLContext: javax.net.ssl.SSLContext getInstance(java.lang.String)>("TLS");
v = new org.apache.hive.service.auth.jwt.URLBasedJWKSProvider$1;
specialinvoke v.<org.apache.hive.service.auth.jwt.URLBasedJWKSProvider$1: void <init>(org.apache.hive.service.auth.jwt.URLBasedJWKSProvider)>(v);
v = newarray (javax.net.ssl.X509TrustManager)[1];
v[0] = v;
v = new java.security.SecureRandom;
specialinvoke v.<java.security.SecureRandom: void <init>()>();
virtualinvoke v.<javax.net.ssl.SSLContext: void init(javax.net.ssl.KeyManager[],javax.net.ssl.TrustManager[],java.security.SecureRandom)>(null, v, v);
label:
v = new org.apache.http.client.methods.HttpGet;
specialinvoke v.<org.apache.http.client.methods.HttpGet: void <init>(java.lang.String)>(v);
v = staticinvoke <org.apache.http.impl.client.HttpClients: org.apache.http.impl.client.HttpClientBuilder custom()>();
v = virtualinvoke v.<org.apache.http.impl.client.HttpClientBuilder: org.apache.http.impl.client.HttpClientBuilder setSSLContext(javax.net.ssl.SSLContext)>(v);
v = virtualinvoke v.<org.apache.http.impl.client.HttpClientBuilder: org.apache.http.impl.client.CloseableHttpClient build()>();
label:
v = virtualinvoke v.<org.apache.http.impl.client.CloseableHttpClient: org.apache.http.client.methods.CloseableHttpResponse execute(org.apache.http.client.methods.HttpUriRequest)>(v);
label:
v = interfaceinvoke v.<org.apache.http.client.methods.CloseableHttpResponse: org.apache.http.HttpEntity getEntity()>();
if v == null goto label;
v = v.<org.apache.hive.service.auth.jwt.URLBasedJWKSProvider: java.util.List jwkSets>;
v = interfaceinvoke v.<org.apache.http.HttpEntity: java.io.InputStream getContent()>();
v = staticinvoke <com.nimbusds.jose.jwk.JWKSet: com.nimbusds.jose.jwk.JWKSet load(java.io.InputStream)>(v);
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
label:
interfaceinvoke v.<org.apache.http.client.methods.CloseableHttpResponse: void close()>();
goto label;
label:
v := @caughtexception;
throw v;
label:
virtualinvoke v.<org.apache.http.impl.client.CloseableHttpClient: void close()>();
goto label;
label:
v := @caughtexception;
throw v;
label:
v = <org.apache.hive.service.auth.jwt.URLBasedJWKSProvider: org.slf4j.Logger LOG>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Loaded JWKS from \u0001");
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>(v);
v = v + 1;
goto label;
label:
return;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
public java.util.List getJWKs(com.nimbusds.jose.JWSHeader) throws javax.security.sasl.AuthenticationException
{
org.apache.hive.service.auth.jwt.URLBasedJWKSProvider v;
java.util.Iterator v;
com.nimbusds.jose.jwk.JWKSelector v;
com.nimbusds.jose.JWSAlgorithm v;
com.nimbusds.jose.JWSHeader v;
java.util.ArrayList v;
java.util.List v, v;
java.lang.Object v;
javax.security.sasl.AuthenticationException v;
java.lang.String v;
com.nimbusds.jose.jwk.JWKMatcher v;
boolean v;
v := @this: org.apache.hive.service.auth.jwt.URLBasedJWKSProvider;
v := @parameter: com.nimbusds.jose.JWSHeader;
v = staticinvoke <com.nimbusds.jose.jwk.JWKMatcher: com.nimbusds.jose.jwk.JWKMatcher forJWSHeader(com.nimbusds.jose.JWSHeader)>(v);
if v != null goto label;
v = new javax.security.sasl.AuthenticationException;
v = virtualinvoke v.<com.nimbusds.jose.JWSHeader: com.nimbusds.jose.JWSAlgorithm getAlgorithm()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (com.nimbusds.jose.JWSAlgorithm)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("Unsupported algorithm: \u0001");
specialinvoke v.<javax.security.sasl.AuthenticationException: void <init>(java.lang.String)>(v);
throw v;
label:
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v = new com.nimbusds.jose.jwk.JWKSelector;
specialinvoke v.<com.nimbusds.jose.jwk.JWKSelector: void <init>(com.nimbusds.jose.jwk.JWKMatcher)>(v);
v = v.<org.apache.hive.service.auth.jwt.URLBasedJWKSProvider: java.util.List jwkSets>;
v = interfaceinvoke v.<java.util.List: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<com.nimbusds.jose.jwk.JWKSelector: java.util.List select(com.nimbusds.jose.jwk.JWKSet)>(v);
interfaceinvoke v.<java.util.List: boolean addAll(java.util.Collection)>(v);
goto label;
label:
return v;
}
static void <clinit>()
{
java.lang.Class v;
java.lang.String v;
org.slf4j.Logger v;
v = class "Lorg/apache/hive/service/auth/jwt/URLBasedJWKSProvider;";
v = virtualinvoke v.<java.lang.Class: java.lang.String getName()>();
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.String)>(v);
<org.apache.hive.service.auth.jwt.URLBasedJWKSProvider: org.slf4j.Logger LOG> = v;
return;
}
}