class oadd.org.apache.drill.exec.rpc.security.plain.PlainServer extends java.lang.Object implements javax.security.sasl.SaslServer
{
private static final java.lang.String UTF_8_NULL;
public static final java.lang.String MECHANISM_NAME;
private final oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticator authenticator;
private boolean completed;
private java.lang.String authorizationID;
void <init>(oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticator, java.util.Map) throws javax.security.sasl.SaslException
{
oadd.org.apache.drill.exec.rpc.security.plain.PlainServer v;
oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticator v;
java.util.Map v;
java.lang.Object v;
java.lang.String v;
javax.security.sasl.SaslException v;
boolean v;
v := @this: oadd.org.apache.drill.exec.rpc.security.plain.PlainServer;
v := @parameter: oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticator;
v := @parameter: java.util.Map;
specialinvoke v.<java.lang.Object: void <init>()>();
v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: boolean completed> = 0;
if v == null goto label;
v = "true";
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>("javax.security.sasl.policy.noplaintext");
v = virtualinvoke v.<java.lang.String: boolean equalsIgnoreCase(java.lang.String)>(v);
if v == 0 goto label;
v = new javax.security.sasl.SaslException;
specialinvoke v.<javax.security.sasl.SaslException: void <init>(java.lang.String)>("PLAIN authentication is not permitted.");
throw v;
label:
v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticator authenticator> = v;
return;
}
public java.lang.String getMechanismName()
{
oadd.org.apache.drill.exec.rpc.security.plain.PlainServer v;
v := @this: oadd.org.apache.drill.exec.rpc.security.plain.PlainServer;
return "PLAIN";
}
public byte[] evaluateResponse(byte[]) throws javax.security.sasl.SaslException
{
byte[] v;
java.lang.IllegalStateException v;
oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticationException v;
java.lang.String[] v;
javax.security.sasl.SaslException v, v, v, v;
java.nio.charset.Charset v;
int v, v;
java.lang.String v, v, v, v, v, v;
boolean v, v, v;
oadd.org.apache.drill.exec.rpc.security.plain.PlainServer v;
oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticator v;
v := @this: oadd.org.apache.drill.exec.rpc.security.plain.PlainServer;
v := @parameter: byte[];
v = v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: boolean completed>;
if v == 0 goto label;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("PLAIN authentication already completed");
throw v;
label:
if v != null goto label;
v = new javax.security.sasl.SaslException;
specialinvoke v.<javax.security.sasl.SaslException: void <init>(java.lang.String)>("Received null response");
throw v;
label:
v = new java.lang.String;
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);
v = virtualinvoke v.<java.lang.String: java.lang.String[] split(java.lang.String,int)>("\u0000", 3);
v = lengthof v;
if v == 3 goto label;
v = new javax.security.sasl.SaslException;
v = lengthof v;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (int)>(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 corrupt response. Expected 3 parts, but received \u0001");
specialinvoke v.<javax.security.sasl.SaslException: void <init>(java.lang.String)>(v);
throw v;
label:
v = v[0];
v = v[1];
v = v[2];
v = virtualinvoke v.<java.lang.String: boolean isEmpty()>();
if v == 0 goto label;
v = v;
label:
v = v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticator authenticator>;
interfaceinvoke v.<oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticator: void authenticate(java.lang.String,java.lang.String)>(v, v);
label:
goto label;
label:
v := @caughtexception;
v = new javax.security.sasl.SaslException;
v = virtualinvoke v.<oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticationException: java.lang.String getMessage()>();
specialinvoke v.<javax.security.sasl.SaslException: void <init>(java.lang.String)>(v);
throw v;
label:
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>(v);
if v != 0 goto label;
v = new javax.security.sasl.SaslException;
specialinvoke v.<javax.security.sasl.SaslException: void <init>(java.lang.String)>("Drill expects authorization ID and authentication ID to match. Use inbound impersonation feature so one entity can act on behalf of another.");
throw v;
label:
v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: java.lang.String authorizationID> = v;
v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: boolean completed> = 1;
return null;
catch oadd.org.apache.drill.exec.rpc.user.security.UserAuthenticationException from label to label with label;
}
public boolean isComplete()
{
oadd.org.apache.drill.exec.rpc.security.plain.PlainServer v;
boolean v;
v := @this: oadd.org.apache.drill.exec.rpc.security.plain.PlainServer;
v = v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: boolean completed>;
return v;
}
public java.lang.String getAuthorizationID()
{
java.lang.IllegalStateException v;
oadd.org.apache.drill.exec.rpc.security.plain.PlainServer v;
java.lang.String v;
boolean v;
v := @this: oadd.org.apache.drill.exec.rpc.security.plain.PlainServer;
v = v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: boolean completed>;
if v == 0 goto label;
v = v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: java.lang.String authorizationID>;
return v;
label:
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("PLAIN authentication not completed");
throw v;
}
public java.lang.Object getNegotiatedProperty(java.lang.String)
{
java.lang.IllegalStateException v;
oadd.org.apache.drill.exec.rpc.security.plain.PlainServer v;
java.lang.String v, v, v;
boolean v, v;
v := @this: oadd.org.apache.drill.exec.rpc.security.plain.PlainServer;
v := @parameter: java.lang.String;
v = v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: boolean completed>;
if v == 0 goto label;
v = "javax.security.sasl.qop";
v = virtualinvoke v.<java.lang.String: boolean equals(java.lang.Object)>(v);
if v == 0 goto label;
v = "auth";
goto label;
label:
v = null;
label:
return v;
label:
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("PLAIN authentication not completed");
throw v;
}
public byte[] wrap(byte[], int, int) throws javax.security.sasl.SaslException
{
byte[] v;
java.lang.IllegalStateException v;
oadd.org.apache.drill.exec.rpc.security.plain.PlainServer v;
int v, v;
javax.security.sasl.SaslException v;
boolean v;
v := @this: oadd.org.apache.drill.exec.rpc.security.plain.PlainServer;
v := @parameter: byte[];
v := @parameter: int;
v := @parameter: int;
v = v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: boolean completed>;
if v == 0 goto label;
v = new javax.security.sasl.SaslException;
specialinvoke v.<javax.security.sasl.SaslException: void <init>(java.lang.String)>("PLAIN supports neither integrity nor privacy");
throw v;
label:
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("PLAIN authentication not completed");
throw v;
}
public byte[] unwrap(byte[], int, int) throws javax.security.sasl.SaslException
{
byte[] v;
java.lang.IllegalStateException v;
oadd.org.apache.drill.exec.rpc.security.plain.PlainServer v;
int v, v;
javax.security.sasl.SaslException v;
boolean v;
v := @this: oadd.org.apache.drill.exec.rpc.security.plain.PlainServer;
v := @parameter: byte[];
v := @parameter: int;
v := @parameter: int;
v = v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: boolean completed>;
if v == 0 goto label;
v = new javax.security.sasl.SaslException;
specialinvoke v.<javax.security.sasl.SaslException: void <init>(java.lang.String)>("PLAIN supports neither integrity nor privacy");
throw v;
label:
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("PLAIN authentication not completed");
throw v;
}
public void dispose() throws javax.security.sasl.SaslException
{
oadd.org.apache.drill.exec.rpc.security.plain.PlainServer v;
v := @this: oadd.org.apache.drill.exec.rpc.security.plain.PlainServer;
v.<oadd.org.apache.drill.exec.rpc.security.plain.PlainServer: java.lang.String authorizationID> = null;
return;
}
}