public class org.apache.hive.service.cli.thrift.ThriftHttpServlet extends org.apache.thrift.server.TServlet
{
private static final long serialVersionUID;
public static final org.slf4j.Logger LOG;
private final org.apache.hive.service.auth.AuthType authType;
private final org.apache.hadoop.security.UserGroupInformation serviceUGI;
private final org.apache.hadoop.security.UserGroupInformation httpUGI;
private final org.apache.hadoop.hive.conf.HiveConf hiveConf;
private org.apache.hive.service.CookieSigner signer;
public static final java.lang.String AUTH_COOKIE;
private static final java.security.SecureRandom RAN;
private boolean isCookieAuthEnabled;
private java.lang.String cookieDomain;
private java.lang.String cookiePath;
private int cookieMaxAge;
private boolean isCookieSecure;
private boolean isHttpOnlyCookie;
private final org.apache.hive.service.auth.HiveAuthFactory hiveAuthFactory;
private static final java.lang.String HIVE_DELEGATION_TOKEN_HEADER;
private static final java.lang.String X_FORWARDED_FOR;
private static final java.lang.String AUTH_TYPE;
private org.apache.hive.service.auth.jwt.JWTValidator jwtValidator;
static final boolean $assertionsDisabled;
public void <init>(org.apache.thrift.TProcessor, org.apache.thrift.protocol.TProtocolFactory, org.apache.hadoop.security.UserGroupInformation, org.apache.hadoop.security.UserGroupInformation, org.apache.hive.service.auth.HiveAuthFactory, org.apache.hadoop.hive.conf.HiveConf) throws java.lang.Exception
{
byte[] v;
java.security.SecureRandom v;
boolean v, v, v, v, v;
org.apache.thrift.TProcessor v;
org.apache.hive.service.CookieSigner v;
long v, v;
org.apache.hive.service.auth.jwt.JWTValidator v;
org.apache.hive.service.auth.HiveAuthConstants$AuthTypes v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
org.apache.hive.service.auth.AuthType v, v;
org.apache.hadoop.hive.conf.HiveConf$ConfVars v, v, v, v, v, v;
org.apache.hadoop.security.UserGroupInformation v, v;
java.lang.String v, v, v, v;
org.slf4j.Logger v;
org.apache.hadoop.hive.conf.HiveConf v;
org.apache.hive.service.auth.HiveAuthFactory v;
org.apache.thrift.protocol.TProtocolFactory v;
java.util.concurrent.TimeUnit v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: org.apache.thrift.TProcessor;
v := @parameter: org.apache.thrift.protocol.TProtocolFactory;
v := @parameter: org.apache.hadoop.security.UserGroupInformation;
v := @parameter: org.apache.hadoop.security.UserGroupInformation;
v := @parameter: org.apache.hive.service.auth.HiveAuthFactory;
v := @parameter: org.apache.hadoop.hive.conf.HiveConf;
specialinvoke v.<org.apache.thrift.server.TServlet: void <init>(org.apache.thrift.TProcessor,org.apache.thrift.protocol.TProtocolFactory)>(v, v);
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.hive.conf.HiveConf hiveConf> = v;
v = staticinvoke <org.apache.hive.service.auth.AuthType: org.apache.hive.service.auth.AuthType authTypeFromConf(org.apache.hadoop.conf.Configuration,boolean)>(v, 1);
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.AuthType authType> = v;
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.security.UserGroupInformation serviceUGI> = v;
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.security.UserGroupInformation httpUGI> = v;
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.HiveAuthFactory hiveAuthFactory> = v;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_THRIFT_HTTP_COOKIE_AUTH_ENABLED>;
v = virtualinvoke v.<org.apache.hadoop.hive.conf.HiveConf: boolean getBoolVar(org.apache.hadoop.hive.conf.HiveConf$ConfVars)>(v);
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isCookieAuthEnabled> = v;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isCookieAuthEnabled>;
if v == 0 goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.security.SecureRandom RAN>;
v = virtualinvoke v.<java.security.SecureRandom: long nextLong()>();
v = staticinvoke <java.lang.Long: java.lang.String toString(long)>(v);
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: 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[])>("Using the random number as the secret for cookie generation \u0001");
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
v = new org.apache.hive.service.CookieSigner;
v = virtualinvoke v.<java.lang.String: byte[] getBytes()>();
specialinvoke v.<org.apache.hive.service.CookieSigner: void <init>(byte[])>(v);
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.CookieSigner signer> = v;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_THRIFT_HTTP_COOKIE_MAX_AGE>;
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit SECONDS>;
v = virtualinvoke v.<org.apache.hadoop.hive.conf.HiveConf: long getTimeVar(org.apache.hadoop.hive.conf.HiveConf$ConfVars,java.util.concurrent.TimeUnit)>(v, v);
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: int cookieMaxAge> = v;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_THRIFT_HTTP_COOKIE_DOMAIN>;
v = virtualinvoke v.<org.apache.hadoop.hive.conf.HiveConf: java.lang.String getVar(org.apache.hadoop.hive.conf.HiveConf$ConfVars)>(v);
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String cookieDomain> = v;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_THRIFT_HTTP_COOKIE_PATH>;
v = virtualinvoke v.<org.apache.hadoop.hive.conf.HiveConf: java.lang.String getVar(org.apache.hadoop.hive.conf.HiveConf$ConfVars)>(v);
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String cookiePath> = v;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_USE_SSL>;
v = virtualinvoke v.<org.apache.hadoop.hive.conf.HiveConf: boolean getBoolVar(org.apache.hadoop.hive.conf.HiveConf$ConfVars)>(v);
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isCookieSecure> = v;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_THRIFT_HTTP_COOKIE_IS_HTTPONLY>;
v = virtualinvoke v.<org.apache.hadoop.hive.conf.HiveConf: boolean getBoolVar(org.apache.hadoop.hive.conf.HiveConf$ConfVars)>(v);
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isHttpOnlyCookie> = v;
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.AuthType authType>;
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes JWT>;
v = virtualinvoke v.<org.apache.hive.service.auth.AuthType: boolean isEnabled(org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v);
if v == 0 goto label;
v = new org.apache.hive.service.auth.jwt.JWTValidator;
specialinvoke v.<org.apache.hive.service.auth.jwt.JWTValidator: void <init>(org.apache.hadoop.hive.conf.HiveConf)>(v);
v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.jwt.JWTValidator jwtValidator> = v;
label:
return;
}
protected void doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) throws javax.servlet.ServletException, java.io.IOException
{
java.net.InetAddress v;
java.io.PrintWriter v;
java.lang.Exception v;
java.lang.Throwable v;
org.apache.hive.service.CookieSigner v;
java.lang.AssertionError v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.lang.String v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
org.apache.hive.service.auth.HttpAuthenticationException v;
boolean v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
java.io.EOFException v;
java.util.List v, v, v, v, v;
javax.servlet.ServletInputStream v;
java.lang.String[] v;
org.apache.hive.service.auth.HiveAuthConstants$AuthTypes v, v, v, v, v, v;
org.apache.hive.service.auth.AuthType v, v, v;
org.apache.hadoop.hive.conf.HiveConf$ConfVars v, v, v;
int v;
javax.servlet.http.Cookie v;
org.slf4j.Logger v, v, v, v, v, v, v, v, v, v;
javax.servlet.http.HttpServletResponse v;
org.apache.hadoop.hive.conf.HiveConf v, v, v;
java.lang.Object v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v := @parameter: javax.servlet.http.HttpServletResponse;
v = null;
v = 0;
specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: void logTrackingHeaderIfAny(javax.servlet.http.HttpServletRequest)>(v);
label:
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getRemoteAddr()>();
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: 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[])>("Client IP Address: \u0001");
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isCookieAuthEnabled>;
if v == 0 goto label;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String validateCookie(javax.servlet.http.HttpServletRequest)>(v);
if v != null goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v;
if v == 0 goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>("Could not validate cookie sent, will try to generate a new cookie");
label:
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void setIpAddress(java.lang.String)>(v);
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getHeader(java.lang.String)>("X-Forwarded-For");
if v == null goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object,java.lang.Object)>("{}:{}", "X-Forwarded-For", v);
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String)>(",");
v = staticinvoke <java.util.Arrays: java.util.List asList(java.lang.Object[])>(v);
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void setForwardedAddresses(java.util.List)>(v);
goto label;
label:
v = staticinvoke <java.util.Collections: java.util.List emptyList()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void setForwardedAddresses(java.util.List)>(v);
label:
if v != null goto label;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.hive.conf.HiveConf hiveConf>;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_TRUSTED_DOMAIN>;
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);
v = virtualinvoke v.<java.lang.String: java.lang.String trim()>();
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.hive.conf.HiveConf hiveConf>;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_TRUSTED_DOMAIN_USE_XFF_HEADER>;
v = staticinvoke <org.apache.hadoop.hive.conf.HiveConf: boolean getBoolVar(org.apache.hadoop.conf.Configuration,org.apache.hadoop.hive.conf.HiveConf$ConfVars)>(v, v);
if v == 0 goto label;
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v != 0 goto label;
v = staticinvoke <org.apache.hive.service.cli.session.SessionManager: java.util.List getForwardedAddresses()>();
if v == null goto label;
v = staticinvoke <org.apache.hive.service.cli.session.SessionManager: java.util.List getForwardedAddresses()>();
v = interfaceinvoke v.<java.util.List: boolean isEmpty()>();
if v != 0 goto label;
v = staticinvoke <org.apache.hive.service.cli.session.SessionManager: java.util.List getForwardedAddresses()>();
v = interfaceinvoke v.<java.util.List: java.lang.Object get(int)>(0);
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object)>("Trusted domain authN is enabled. clientIp from X-Forwarded-For header: {}", v);
label:
v = staticinvoke <java.net.InetAddress: java.net.InetAddress getByName(java.lang.String)>(v);
v = virtualinvoke v.<java.net.InetAddress: java.lang.String getCanonicalHostName()>();
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v != 0 goto label;
v = staticinvoke <org.apache.hive.service.auth.PlainSaslHelper: boolean isHostFromTrustedDomain(java.lang.String,java.lang.String)>(v, v);
if v == 0 goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String,java.lang.String)>(v, 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[])>("No authentication performed because the connecting host \u is from the trusted domain \u0001");
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>(v);
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes NOSASL>;
v = virtualinvoke v.<org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: java.lang.String getAuthName()>();
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String doPasswdAuth(javax.servlet.http.HttpServletRequest,java.lang.String)>(v, v);
goto label;
label:
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes KERBEROS>;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isAuthTypeEnabled(javax.servlet.http.HttpServletRequest,org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v, v);
if v == 0 goto label;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getHeader(java.lang.String)>("X-Hive-Delegation-Token");
if v == null goto label;
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v != 0 goto label;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String doTokenAuth(javax.servlet.http.HttpServletRequest)>(v);
goto label;
label:
v = virtualinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String doKerberosAuth(javax.servlet.http.HttpServletRequest)>(v);
goto label;
label:
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes JWT>;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isAuthTypeEnabled(javax.servlet.http.HttpServletRequest,org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v, v);
if v == 0 goto label;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String validateJWT(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)>(v, v);
goto label;
label:
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes SAML>;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isAuthTypeEnabled(javax.servlet.http.HttpServletRequest,org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v, v);
if v == 0 goto label;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getHeader(java.lang.String)>("Authorization");
if v == null goto label;
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v == 0 goto label;
label:
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean needsRedirect(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)>(v, v);
if v == 0 goto label;
specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: void doSamlRedirect(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)>(v, v);
label:
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearUserName()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearIpAddress()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearProxyUserName()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearForwardedAddresses()>();
return;
label:
v = virtualinvoke v.<java.lang.String: java.lang.String toLowerCase()>();
v = "Basic";
v = virtualinvoke v.<java.lang.String: java.lang.String toLowerCase()>();
v = virtualinvoke v.<java.lang.String: boolean startsWith(java.lang.String)>(v);
if v == 0 goto label;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.AuthType authType>;
v = virtualinvoke v.<org.apache.hive.service.auth.AuthType: java.lang.String getPasswordBasedAuthStr()>();
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String doPasswdAuth(javax.servlet.http.HttpServletRequest,java.lang.String)>(v, v);
goto label;
label:
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String doSamlAuth(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)>(v, v);
goto label;
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.hive.conf.HiveConf hiveConf>;
v = <org.apache.hadoop.hive.conf.HiveConf$ConfVars: org.apache.hadoop.hive.conf.HiveConf$ConfVars HIVE_SERVER2_TRUSTED_PROXY_TRUSTHEADER>;
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);
v = virtualinvoke v.<java.lang.String: java.lang.String trim()>();
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>("");
if v != 0 goto label;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getHeader(java.lang.String)>(v);
if v == null goto label;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getUsername(javax.servlet.http.HttpServletRequest)>(v);
goto label;
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.AuthType authType>;
v = virtualinvoke v.<org.apache.hive.service.auth.AuthType: java.lang.String getPasswordBasedAuthStr()>();
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String doPasswdAuth(javax.servlet.http.HttpServletRequest,java.lang.String)>(v, v);
label:
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean $assertionsDisabled>;
if v != 0 goto label;
if v != null goto label;
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>()>();
throw v;
label:
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: 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[])>("Client username: \u0001");
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void setUserName(java.lang.String)>(v);
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getQueryString()>();
v = staticinvoke <org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getDoAsQueryParam(java.lang.String)>(v);
if v == null goto label;
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void setProxyUserName(java.lang.String)>(v);
label:
if v == 0 goto label;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.AuthType authType>;
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes NOSASL>;
v = virtualinvoke v.<org.apache.hive.service.auth.AuthType: boolean isEnabled(org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v);
if v != 0 goto label;
v = staticinvoke <org.apache.hive.service.auth.HttpAuthUtils: java.lang.String createCookieToken(java.lang.String)>(v);
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.CookieSigner signer>;
v = virtualinvoke v.<org.apache.hive.service.CookieSigner: java.lang.String signCookie(java.lang.String)>(v);
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: javax.servlet.http.Cookie createCookie(java.lang.String)>(v);
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isHttpOnlyCookie>;
if v == 0 goto label;
v = staticinvoke <org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getHttpOnlyCookieHeader(javax.servlet.http.Cookie)>(v);
interfaceinvoke v.<javax.servlet.http.HttpServletResponse: void setHeader(java.lang.String,java.lang.String)>("SET-COOKIE", v);
goto label;
label:
interfaceinvoke v.<javax.servlet.http.HttpServletResponse: void addCookie(javax.servlet.http.Cookie)>(v);
label:
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: 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[])>("Cookie added for clientUserName \u0001");
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>(v);
label:
specialinvoke v.<org.apache.thrift.server.TServlet: void doPost(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)>(v, v);
label:
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearUserName()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearIpAddress()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearProxyUserName()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearForwardedAddresses()>();
goto label;
label:
v := @caughtexception;
v = v instanceof org.apache.hive.service.auth.ldap.HttpEmptyAuthenticationException;
if v != 0 goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void error(java.lang.String,java.lang.Throwable)>("Error: ", v);
label:
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: int getContentLength()>();
if v >= 0 goto label;
label:
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: javax.servlet.ServletInputStream getInputStream()>();
staticinvoke <com.google.common.io.ByteStreams: void skipFully(java.io.InputStream,long)>(v, 2147483647L);
label:
goto label;
label:
v := @caughtexception;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = virtualinvoke v.<java.io.EOFException: java.lang.String getMessage()>();
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>(v);
label:
interfaceinvoke v.<javax.servlet.http.HttpServletResponse: void setStatus(int)>(401);
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes KERBEROS>;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isAuthTypeEnabled(javax.servlet.http.HttpServletRequest,org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v, v);
if v == 0 goto label;
interfaceinvoke v.<javax.servlet.http.HttpServletResponse: void addHeader(java.lang.String,java.lang.String)>("WWW-Authenticate", "Negotiate");
goto label;
label:
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getUsername(javax.servlet.http.HttpServletRequest)>(v);
v = virtualinvoke v.<org.apache.hive.service.auth.HttpAuthenticationException: java.lang.String getMessage()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String,java.lang.String)>(v, 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[])>("Login attempt is failed for user : \u. Error Messsage :\u0001");
interfaceinvoke v.<org.slf4j.Logger: void error(java.lang.String)>(v);
label:
goto label;
label:
v := @caughtexception;
label:
v = interfaceinvoke v.<javax.servlet.http.HttpServletResponse: java.io.PrintWriter getWriter()>();
v = virtualinvoke v.<org.apache.hive.service.auth.HttpAuthenticationException: java.lang.String getMessage()>();
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[])>("Authentication Error: \u0001");
virtualinvoke v.<java.io.PrintWriter: void println(java.lang.String)>(v);
label:
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearUserName()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearIpAddress()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearProxyUserName()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearForwardedAddresses()>();
goto label;
label:
v := @caughtexception;
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearUserName()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearIpAddress()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearProxyUserName()>();
staticinvoke <org.apache.hive.service.cli.session.SessionManager: void clearForwardedAddresses()>();
throw v;
label:
return;
catch org.apache.hive.service.auth.HttpAuthenticationException from label to label with label;
catch org.apache.hive.service.auth.HttpAuthenticationException from label to label with label;
catch java.io.EOFException from label to label with label;
catch java.lang.Exception from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
catch java.lang.Throwable from label to label with label;
}
private void logTrackingHeaderIfAny(javax.servlet.http.HttpServletRequest)
{
javax.servlet.http.HttpServletRequest v;
org.slf4j.Logger v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.lang.String v, v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getHeader(java.lang.String)>("X-Request-ID");
if v == null goto label;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getHeader(java.lang.String)>("X-Request-ID");
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object,java.lang.Object)>("{}:{}", "X-Request-ID", v);
label:
return;
}
private java.lang.String validateJWT(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) throws org.apache.hive.service.auth.HttpAuthenticationException
{
org.slf4j.Logger v, v;
javax.servlet.http.HttpServletResponse v;
org.apache.hive.service.auth.jwt.JWTValidator v, v;
org.apache.hive.service.auth.HttpAuthenticationException v;
java.lang.Exception v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.lang.String v, v;
boolean v, v, v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v := @parameter: javax.servlet.http.HttpServletResponse;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.jwt.JWTValidator jwtValidator>;
if v == null goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.base.Preconditions: void checkState(boolean,java.lang.Object)>(v, "JWT validator should have been set");
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String extractBearerToken(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)>(v, v);
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.jwt.JWTValidator jwtValidator>;
v = virtualinvoke v.<org.apache.hive.service.auth.jwt.JWTValidator: java.lang.String validateJWTAndExtractUser(java.lang.String)>(v);
staticinvoke <com.google.common.base.Preconditions: java.lang.Object checkNotNull(java.lang.Object,java.lang.Object)>(v, "JWT needs to contain the user name as subject");
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.base.Preconditions: void checkState(boolean,java.lang.Object)>(v, "User name should not be empty");
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object)>("JWT verification successful for user {}", v);
label:
goto label;
label:
v := @caughtexception;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void error(java.lang.String,java.lang.Throwable)>("JWT verification failed", v);
v = new org.apache.hive.service.auth.HttpAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.HttpAuthenticationException: void <init>(java.lang.Throwable)>(v);
throw v;
label:
return v;
catch java.lang.Exception from label to label with label;
}
private boolean needsRedirect(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
{
org.slf4j.Logger v;
javax.servlet.http.HttpServletResponse v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.auth.saml.HttpSamlAuthenticationException v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.lang.String v, v, v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v := @parameter: javax.servlet.http.HttpServletResponse;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String extractBearerToken(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)>(v, v);
if v == null goto label;
return 0;
label:
staticinvoke <org.apache.hive.service.auth.saml.HiveSamlUtils: int validateSamlResponsePort(javax.servlet.http.HttpServletRequest)>(v);
label:
return 1;
label:
v := @caughtexception;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = virtualinvoke v.<org.apache.hive.service.auth.saml.HttpSamlAuthenticationException: java.lang.String getMessage()>();
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[])>("Response port could not be validated: \u0001");
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
return 0;
catch org.apache.hive.service.auth.saml.HttpSamlAuthenticationException from label to label with label;
}
private void doSamlRedirect(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) throws org.apache.hive.service.auth.saml.HttpSamlAuthenticationException
{
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
org.apache.hive.service.auth.saml.HiveSaml2Client v;
javax.servlet.http.HttpServletResponse v;
org.apache.hadoop.hive.conf.HiveConf v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v := @parameter: javax.servlet.http.HttpServletResponse;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.hive.conf.HiveConf hiveConf>;
v = staticinvoke <org.apache.hive.service.auth.saml.HiveSaml2Client: org.apache.hive.service.auth.saml.HiveSaml2Client get(org.apache.hadoop.hive.conf.HiveConf)>(v);
virtualinvoke v.<org.apache.hive.service.auth.saml.HiveSaml2Client: void setRedirect(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)>(v, v);
return;
}
private java.lang.String doSamlAuth(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) throws org.apache.hive.service.auth.HttpAuthenticationException
{
org.apache.hive.service.auth.saml.HiveSamlRelayStateStore v;
java.util.HashMap v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.lang.String v, v, v;
boolean v, v;
org.slf4j.Logger v;
javax.servlet.http.HttpServletResponse v;
org.apache.hadoop.hive.conf.HiveConf v;
org.apache.hive.service.auth.saml.HttpSamlAuthenticationException v, v, v;
java.lang.Object v;
org.apache.hive.service.auth.saml.ISAMLAuthTokenGenerator v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v := @parameter: javax.servlet.http.HttpServletResponse;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String extractBearerToken(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)>(v, v);
if v != null goto label;
v = new org.apache.hive.service.auth.saml.HttpSamlAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.saml.HttpSamlAuthenticationException: void <init>(java.lang.String)>("Token not found.");
throw v;
label:
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getHeader(java.lang.String)>("X-Hive-Client-Identifier");
if v != null goto label;
v = new org.apache.hive.service.auth.saml.HttpSamlAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.saml.HttpSamlAuthenticationException: void <init>(java.lang.String)>("Client identifier not found.");
throw v;
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.hive.conf.HiveConf hiveConf>;
v = staticinvoke <org.apache.hive.service.auth.saml.HiveSamlAuthTokenGenerator: org.apache.hive.service.auth.saml.ISAMLAuthTokenGenerator get(org.apache.hadoop.hive.conf.HiveConf)>(v);
v = interfaceinvoke v.<org.apache.hive.service.auth.saml.ISAMLAuthTokenGenerator: java.lang.String validate(java.lang.String)>(v);
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object)>("Successfully validated the token for user {}", v);
v = new java.util.HashMap;
specialinvoke v.<java.util.HashMap: void <init>()>();
v = staticinvoke <org.apache.hive.service.auth.saml.HiveSamlAuthTokenGenerator: boolean parse(java.lang.String,java.util.Map)>(v, v);
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>("rs");
v = staticinvoke <org.apache.hive.service.auth.saml.HiveSamlRelayStateStore: org.apache.hive.service.auth.saml.HiveSamlRelayStateStore get()>();
v = virtualinvoke v.<org.apache.hive.service.auth.saml.HiveSamlRelayStateStore: boolean validateClientIdentifier(java.lang.String,java.lang.String)>(v, v);
if v != 0 goto label;
v = new org.apache.hive.service.auth.saml.HttpSamlAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.saml.HttpSamlAuthenticationException: void <init>(java.lang.String)>("Client identifier could not be validated");
throw v;
label:
return v;
}
private java.lang.String extractBearerToken(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
{
javax.servlet.http.HttpServletResponse v;
java.util.function.Function v;
org.pac4j.core.credentials.extractor.BearerAuthExtractor v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.util.Optional v, v;
java.lang.Object v;
org.pac4j.core.context.JEEContext v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v := @parameter: javax.servlet.http.HttpServletResponse;
v = new org.pac4j.core.credentials.extractor.BearerAuthExtractor;
specialinvoke v.<org.pac4j.core.credentials.extractor.BearerAuthExtractor: void <init>()>();
v = new org.pac4j.core.context.JEEContext;
specialinvoke v.<org.pac4j.core.context.JEEContext: void <init>(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)>(v, v);
v = virtualinvoke v.<org.pac4j.core.credentials.extractor.BearerAuthExtractor: java.util.Optional extract(org.pac4j.core.context.WebContext)>(v);
v = staticinvoke <org.apache.hive.service.cli.thrift.ThriftHttpServlet$getToken__28: java.util.function.Function bootstrap$()>();
v = virtualinvoke v.<java.util.Optional: java.util.Optional map(java.util.function.Function)>(v);
v = virtualinvoke v.<java.util.Optional: java.lang.Object orElse(java.lang.Object)>(null);
return v;
}
private java.lang.String getClientNameFromCookie(javax.servlet.http.Cookie[])
{
org.apache.hive.service.CookieSigner v;
javax.servlet.http.Cookie[] v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
int v, v;
java.lang.String v, v, v, v, v, v;
javax.servlet.http.Cookie v;
boolean v, v, v;
org.slf4j.Logger v, v, v, v, v;
java.lang.IllegalArgumentException v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.Cookie[];
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = virtualinvoke v.<javax.servlet.http.Cookie: java.lang.String getName()>();
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>("hive.server.auth");
if v == 0 goto label;
v = virtualinvoke v.<javax.servlet.http.Cookie: java.lang.String getValue()>();
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.CookieSigner signer>;
v = virtualinvoke v.<org.apache.hive.service.CookieSigner: java.lang.String verifyAndExtract(java.lang.String)>(v);
label:
goto label;
label:
v := @caughtexception;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Throwable)>("Invalid cookie", v);
label:
v = null;
label:
if v == null goto label;
v = staticinvoke <org.apache.hive.service.auth.HttpAuthUtils: java.lang.String getUserNameFromCookieToken(java.lang.String)>(v);
if v != null goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: 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[])>("Invalid cookie token \u0001");
interfaceinvoke v.<org.slf4j.Logger: void warn(java.lang.String)>(v);
goto label;
label:
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: 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[])>("Validated the cookie for user \u0001");
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
label:
return v;
label:
v = v + 1;
goto label;
label:
return null;
catch java.lang.IllegalArgumentException from label to label with label;
}
private java.lang.String toCookieStr(javax.servlet.http.Cookie[])
{
javax.servlet.http.Cookie[] v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
int v, v;
java.lang.StringBuilder v, v, v, v;
java.lang.String v, v, v;
javax.servlet.http.Cookie v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.Cookie[];
v = new java.lang.StringBuilder;
specialinvoke v.<java.lang.StringBuilder: void <init>()>();
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = virtualinvoke v.<javax.servlet.http.Cookie: java.lang.String getName()>();
v = virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>(v);
v = virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(char)>(61);
v = virtualinvoke v.<javax.servlet.http.Cookie: java.lang.String getValue()>();
v = virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>(v);
virtualinvoke v.<java.lang.StringBuilder: java.lang.StringBuilder append(java.lang.String)>(" ;\n");
v = v + 1;
goto label;
label:
v = virtualinvoke v.<java.lang.StringBuilder: java.lang.String toString()>();
return v;
}
private java.lang.String validateCookie(javax.servlet.http.HttpServletRequest)
{
org.slf4j.Logger v, v, v, v;
javax.servlet.http.Cookie[] v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.lang.String v, v, v, v;
boolean v, v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: javax.servlet.http.Cookie[] getCookies()>();
if v != null goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (javax.servlet.http.HttpServletRequest)>(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[])>("No valid cookies associated with the request \u0001");
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
label:
return null;
label:
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String toCookieStr(javax.servlet.http.Cookie[])>(v);
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[])>("Received cookies: \u0001");
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
label:
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getClientNameFromCookie(javax.servlet.http.Cookie[])>(v);
return v;
}
private javax.servlet.http.Cookie createCookie(java.lang.String)
{
org.slf4j.Logger v, v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
int v;
java.lang.String v, v, v, v, v, v;
javax.servlet.http.Cookie v;
boolean v, v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: java.lang.String;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: 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[])>("Cookie name = hive.server.auth value = \u0001");
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
label:
v = new javax.servlet.http.Cookie;
specialinvoke v.<javax.servlet.http.Cookie: void <init>(java.lang.String,java.lang.String)>("hive.server.auth", v);
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: int cookieMaxAge>;
virtualinvoke v.<javax.servlet.http.Cookie: void setMaxAge(int)>(v);
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String cookieDomain>;
if v == null goto label;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String cookieDomain>;
virtualinvoke v.<javax.servlet.http.Cookie: void setDomain(java.lang.String)>(v);
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String cookiePath>;
if v == null goto label;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String cookiePath>;
virtualinvoke v.<javax.servlet.http.Cookie: void setPath(java.lang.String)>(v);
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean isCookieSecure>;
virtualinvoke v.<javax.servlet.http.Cookie: void setSecure(boolean)>(v);
return v;
}
private static java.lang.String getHttpOnlyCookieHeader(javax.servlet.http.Cookie)
{
javax.ws.rs.core.NewCookie v;
int v, v;
java.lang.String v, v, v, v, v, v;
javax.servlet.http.Cookie v;
boolean v;
v := @parameter: javax.servlet.http.Cookie;
v = new javax.ws.rs.core.NewCookie;
v = virtualinvoke v.<javax.servlet.http.Cookie: java.lang.String getName()>();
v = virtualinvoke v.<javax.servlet.http.Cookie: java.lang.String getValue()>();
v = virtualinvoke v.<javax.servlet.http.Cookie: java.lang.String getPath()>();
v = virtualinvoke v.<javax.servlet.http.Cookie: java.lang.String getDomain()>();
v = virtualinvoke v.<javax.servlet.http.Cookie: int getVersion()>();
v = virtualinvoke v.<javax.servlet.http.Cookie: java.lang.String getComment()>();
v = virtualinvoke v.<javax.servlet.http.Cookie: int getMaxAge()>();
v = virtualinvoke v.<javax.servlet.http.Cookie: boolean getSecure()>();
specialinvoke v.<javax.ws.rs.core.NewCookie: void <init>(java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,java.lang.String,int,boolean)>(v, v, v, v, v, v, v, v);
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (javax.ws.rs.core.NewCookie)>(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[])>("\u; HttpOnly");
return v;
}
private java.lang.String doPasswdAuth(javax.servlet.http.HttpServletRequest, java.lang.String) throws org.apache.hive.service.auth.HttpAuthenticationException
{
org.apache.hadoop.hive.conf.HiveConf v;
org.apache.hive.service.auth.HttpAuthenticationException v;
java.lang.Exception v;
org.apache.hive.service.auth.AuthenticationProviderFactory$AuthMethods v;
org.apache.hive.service.auth.PasswdAuthenticationProvider v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.auth.HiveAuthConstants$AuthTypes v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.lang.String v, v, v, v, v, v;
boolean v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v := @parameter: java.lang.String;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getUsername(javax.servlet.http.HttpServletRequest)>(v);
v = virtualinvoke v.<java.lang.String: java.lang.String toLowerCase()>();
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes NOSASL>;
v = virtualinvoke v.<org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: java.lang.String toString()>();
v = virtualinvoke v.<java.lang.String: java.lang.String toLowerCase()>();
v = virtualinvoke v.<java.lang.String: boolean contains(java.lang.CharSequence)>(v);
if v != 0 goto label;
label:
v = staticinvoke <org.apache.hive.service.auth.AuthenticationProviderFactory$AuthMethods: org.apache.hive.service.auth.AuthenticationProviderFactory$AuthMethods getValidAuthMethod(java.lang.String)>(v);
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.hive.conf.HiveConf hiveConf>;
v = staticinvoke <org.apache.hive.service.auth.AuthenticationProviderFactory: org.apache.hive.service.auth.PasswdAuthenticationProvider getAuthenticationProvider(org.apache.hive.service.auth.AuthenticationProviderFactory$AuthMethods,org.apache.hadoop.hive.conf.HiveConf)>(v, v);
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getPassword(javax.servlet.http.HttpServletRequest)>(v);
interfaceinvoke v.<org.apache.hive.service.auth.PasswdAuthenticationProvider: void Authenticate(java.lang.String,java.lang.String)>(v, v);
label:
goto label;
label:
v := @caughtexception;
v = new org.apache.hive.service.auth.HttpAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.HttpAuthenticationException: void <init>(java.lang.Throwable)>(v);
throw v;
label:
return v;
catch java.lang.Exception from label to label with label;
}
private java.lang.String doTokenAuth(javax.servlet.http.HttpServletRequest) throws org.apache.hive.service.auth.HttpAuthenticationException
{
org.apache.hive.service.cli.HiveSQLException v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.lang.String v, v;
org.apache.hive.service.auth.HiveAuthFactory v;
org.apache.hive.service.auth.HttpAuthenticationException v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getHeader(java.lang.String)>("X-Hive-Delegation-Token");
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.HiveAuthFactory hiveAuthFactory>;
v = virtualinvoke v.<org.apache.hive.service.auth.HiveAuthFactory: java.lang.String verifyDelegationToken(java.lang.String)>(v);
label:
return v;
label:
v := @caughtexception;
v = new org.apache.hive.service.auth.HttpAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.HttpAuthenticationException: void <init>(java.lang.Throwable)>(v);
throw v;
catch org.apache.hive.service.cli.HiveSQLException from label to label with label;
}
java.lang.String doKerberosAuth(javax.servlet.http.HttpServletRequest) throws org.apache.hive.service.auth.HttpAuthenticationException
{
org.apache.hive.service.auth.HttpAuthenticationException v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
org.apache.hadoop.security.UserGroupInformation v, v, v, v, v;
org.slf4j.Logger v, v;
java.lang.Exception v, v;
java.lang.Object v, v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet$HttpKerberosServerAction v, v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getAuthHeader(javax.servlet.http.HttpServletRequest)>(v);
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.security.UserGroupInformation httpUGI>;
if v == null goto label;
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.security.UserGroupInformation httpUGI>;
v = new org.apache.hive.service.cli.thrift.ThriftHttpServlet$HttpKerberosServerAction;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.security.UserGroupInformation httpUGI>;
specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet$HttpKerberosServerAction: void <init>(org.apache.hive.service.cli.thrift.ThriftHttpServlet,javax.servlet.http.HttpServletRequest,org.apache.hadoop.security.UserGroupInformation)>(v, v, v);
v = virtualinvoke v.<org.apache.hadoop.security.UserGroupInformation: java.lang.Object doAs(java.security.PrivilegedExceptionAction)>(v);
label:
return v;
label:
v := @caughtexception;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>("Failed to authenticate with HTTP/_HOST kerberos principal, trying with hive/_HOST kerberos principal");
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.security.UserGroupInformation serviceUGI>;
v = new org.apache.hive.service.cli.thrift.ThriftHttpServlet$HttpKerberosServerAction;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hadoop.security.UserGroupInformation serviceUGI>;
specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet$HttpKerberosServerAction: void <init>(org.apache.hive.service.cli.thrift.ThriftHttpServlet,javax.servlet.http.HttpServletRequest,org.apache.hadoop.security.UserGroupInformation)>(v, v, v);
v = virtualinvoke v.<org.apache.hadoop.security.UserGroupInformation: java.lang.Object doAs(java.security.PrivilegedExceptionAction)>(v);
label:
return v;
label:
v := @caughtexception;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void error(java.lang.String)>("Failed to authenticate with hive/_HOST kerberos principal");
v = new org.apache.hive.service.auth.HttpAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.HttpAuthenticationException: void <init>(java.lang.Throwable)>(v);
throw v;
catch java.lang.Exception from label to label with label;
catch java.lang.Exception from label to label with label;
}
private java.lang.String getUsername(javax.servlet.http.HttpServletRequest) throws org.apache.hive.service.auth.HttpAuthenticationException
{
java.lang.String[] v;
org.apache.hive.service.auth.HttpAuthenticationException v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.lang.String v, v, v, v;
boolean v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getAuthHeaderDecodedString(javax.servlet.http.HttpServletRequest)>(v);
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String,int)>(":", 2);
v = v[0];
if v == null goto label;
v = v[0];
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v == 0 goto label;
label:
v = new org.apache.hive.service.auth.HttpAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.HttpAuthenticationException: void <init>(java.lang.String)>("Authorization header received from the client does not contain username.");
throw v;
label:
v = v[0];
return v;
}
private java.lang.String getPassword(javax.servlet.http.HttpServletRequest) throws org.apache.hive.service.auth.HttpAuthenticationException
{
java.lang.String[] v;
org.apache.hive.service.auth.HttpAuthenticationException v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
int v;
java.lang.String v, v, v, v;
boolean v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getAuthHeaderDecodedString(javax.servlet.http.HttpServletRequest)>(v);
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String,int)>(":", 2);
v = lengthof v;
if v < 2 goto label;
v = v[1];
if v == null goto label;
v = v[1];
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v == 0 goto label;
label:
v = new org.apache.hive.service.auth.HttpAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.HttpAuthenticationException: void <init>(java.lang.String)>("Authorization header received from the client does not contain password.");
throw v;
label:
v = v[1];
return v;
}
private java.lang.String getAuthHeaderDecodedString(javax.servlet.http.HttpServletRequest) throws org.apache.hive.service.auth.HttpAuthenticationException
{
byte[] v;
javax.servlet.http.HttpServletRequest v;
java.nio.charset.Charset v;
java.util.Base64$Decoder v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
java.lang.String v, v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getAuthHeader(javax.servlet.http.HttpServletRequest)>(v);
v = new java.lang.String;
v = staticinvoke <java.util.Base64: java.util.Base64$Decoder getDecoder()>();
v = virtualinvoke v.<java.util.Base64$Decoder: byte[] decode(java.lang.String)>(v);
v = <java.nio.charset.StandardCharsets: java.nio.charset.Charset UTF_8>;
specialinvoke v.<java.lang.String: void <init>(byte[],java.nio.charset.Charset)>(v, v);
return v;
}
private java.lang.String getAuthHeader(javax.servlet.http.HttpServletRequest) throws org.apache.hive.service.auth.HttpAuthenticationException
{
org.slf4j.Logger v;
java.lang.String[] v;
org.apache.hive.service.auth.ldap.HttpEmptyAuthenticationException v;
org.apache.hive.service.auth.HttpAuthenticationException v;
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
int v, v;
java.lang.String v, v;
boolean v, v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getHeader(java.lang.String)>("Authorization");
if v == null goto label;
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v == 0 goto label;
label:
v = new org.apache.hive.service.auth.ldap.HttpEmptyAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.ldap.HttpEmptyAuthenticationException: void <init>(java.lang.String)>("Authorization header received from the client is empty.");
throw v;
label:
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("HTTP Auth Header [{}]", v);
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String)>(" ");
v = lengthof v;
v = v - 1;
v = v[v];
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v == 0 goto label;
v = new org.apache.hive.service.auth.HttpAuthenticationException;
specialinvoke v.<org.apache.hive.service.auth.HttpAuthenticationException: void <init>(java.lang.String)>("Authorization header received from the client does not contain any data.");
throw v;
label:
return v;
}
private boolean isAuthTypeEnabled(javax.servlet.http.HttpServletRequest, org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)
{
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.auth.HiveAuthConstants$AuthTypes v, v, v, v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
org.apache.hive.service.auth.AuthType v, v, v, v, v;
java.lang.String v, v, v;
boolean v, v, v, v, v, v, v, v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
v := @parameter: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes;
v = interfaceinvoke v.<javax.servlet.http.HttpServletRequest: java.lang.String getHeader(java.lang.String)>("auth");
v = virtualinvoke v.<org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: java.lang.String getAuthName()>();
v = virtualinvoke v.<java.lang.String: boolean equalsIgnoreCase(java.lang.String)>(v);
if v == 0 goto label;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.AuthType authType>;
v = virtualinvoke v.<org.apache.hive.service.auth.AuthType: boolean isEnabled(org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v);
if v != 0 goto label;
label:
v = "UIDPWD";
v = virtualinvoke v.<java.lang.String: boolean equalsIgnoreCase(java.lang.String)>(v);
if v == 0 goto label;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.AuthType authType>;
v = virtualinvoke v.<org.apache.hive.service.auth.AuthType: boolean isPasswordBasedAuth(org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v);
if v == 0 goto label;
label:
return 1;
label:
if v != null goto label;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.AuthType authType>;
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes JWT>;
v = virtualinvoke v.<org.apache.hive.service.auth.AuthType: boolean isEnabled(org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v);
if v == 0 goto label;
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes JWT>;
if v != v goto label;
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean hasJWT(javax.servlet.http.HttpServletRequest)>(v);
return v;
label:
v = <org.apache.hive.service.auth.HiveAuthConstants$AuthTypes: org.apache.hive.service.auth.HiveAuthConstants$AuthTypes KERBEROS>;
if v == v goto label;
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.AuthType authType>;
v = virtualinvoke v.<org.apache.hive.service.auth.AuthType: boolean isEnabled(org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v);
return v;
label:
v = v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.apache.hive.service.auth.AuthType authType>;
v = virtualinvoke v.<org.apache.hive.service.auth.AuthType: boolean isLoadedFirst(org.apache.hive.service.auth.HiveAuthConstants$AuthTypes)>(v);
if v == 0 goto label;
return 1;
label:
return 0;
}
private boolean hasJWT(javax.servlet.http.HttpServletRequest)
{
javax.servlet.http.HttpServletRequest v;
org.apache.hive.service.cli.thrift.ThriftHttpServlet v;
int v;
java.lang.String[] v;
java.lang.String v;
org.apache.hive.service.auth.HttpAuthenticationException v;
boolean v;
v := @this: org.apache.hive.service.cli.thrift.ThriftHttpServlet;
v := @parameter: javax.servlet.http.HttpServletRequest;
label:
v = specialinvoke v.<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.lang.String getAuthHeader(javax.servlet.http.HttpServletRequest)>(v);
label:
goto label;
label:
v := @caughtexception;
return 0;
label:
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String)>("\\.");
v = lengthof v;
if v != 3 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
catch org.apache.hive.service.auth.HttpAuthenticationException from label to label with label;
}
private static java.lang.String getDoAsQueryParam(java.lang.String)
{
org.slf4j.Logger v, v;
java.util.Iterator v;
java.util.Set v;
java.lang.Object v, v;
java.lang.String v, v, v;
java.util.Hashtable v;
boolean v, v, v;
v := @parameter: java.lang.String;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = <org.apache.hive.service.cli.thrift.ThriftHttpServlet: 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[])>("URL query string:\u0001");
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String)>(v);
label:
if v != null goto label;
return null;
label:
v = staticinvoke <javax.servlet.http.HttpUtils: java.util.Hashtable parseQueryString(java.lang.String)>(v);
v = interfaceinvoke v.<java.util.Map: java.util.Set keySet()>();
v = interfaceinvoke v.<java.util.Set: 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.<java.lang.String: boolean equalsIgnoreCase(java.lang.String)>("doAs");
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>(v);
v = v[0];
return v;
label:
return null;
}
static void <clinit>()
{
java.security.SecureRandom v;
org.slf4j.Logger v;
java.lang.Class v, v;
java.lang.String v;
boolean v, v;
v = class "Lorg/apache/hive/service/cli/thrift/ThriftHttpServlet;";
v = virtualinvoke v.<java.lang.Class: boolean desiredAssertionStatus()>();
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
<org.apache.hive.service.cli.thrift.ThriftHttpServlet: boolean $assertionsDisabled> = v;
v = class "Lorg/apache/hive/service/cli/thrift/ThriftHttpServlet;";
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.cli.thrift.ThriftHttpServlet: org.slf4j.Logger LOG> = v;
v = new java.security.SecureRandom;
specialinvoke v.<java.security.SecureRandom: void <init>()>();
<org.apache.hive.service.cli.thrift.ThriftHttpServlet: java.security.SecureRandom RAN> = v;
return;
}
}