Skip to content

Commit

Permalink
do not infer fromSubject if fromTicketCache && ugi
Browse files Browse the repository at this point in the history
  • Loading branch information
turboFei committed Jan 10, 2024
1 parent 042fa22 commit 098a37b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class JdbcConnectionParams {
public static final String AUTH_PASSWD = "password";
public static final String AUTH_KERBEROS_AUTH_TYPE = "kerberosAuthType";
public static final String AUTH_KERBEROS_AUTH_TYPE_FROM_SUBJECT = "fromSubject";
public static final String AUTH_KERBEROS_AUTH_TYPE_FROM_TICKET_CACHE = "fromTicketCache";
public static final String ANONYMOUS_USER = "anonymous";
public static final String ANONYMOUS_PASSWD = "anonymous";
public static final String USE_SSL = "ssl";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,9 @@ && hasSessionValue(AUTH_PRINCIPAL)
&& !hasSessionValue(AUTH_KYUUBI_CLIENT_KEYTAB)
&& (AUTH_KERBEROS_AUTH_TYPE_FROM_SUBJECT.equalsIgnoreCase(
sessConfMap.get(AUTH_KERBEROS_AUTH_TYPE))
|| isHadoopUserGroupInformationDoAs());
|| (!AUTH_KERBEROS_AUTH_TYPE_FROM_TICKET_CACHE.equalsIgnoreCase(
sessConfMap.get(AUTH_KERBEROS_AUTH_TYPE))
&& isHadoopUserGroupInformationDoAs()));
}

private boolean isTgtCacheAuthMode() {
Expand Down

0 comments on commit 098a37b

Please sign in to comment.