Skip to content

Commit

Permalink
KYUUBI #6689 [FEATURE] Extract kyuubiClientPrincipal/kyuubiClientKeyt…
Browse files Browse the repository at this point in the history
…ab/kyuubiServerPrincipal/Principal from JDBC connection properties
  • Loading branch information
Madhukar525722 committed Oct 29, 2024
1 parent 550f1fc commit 062cd08
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,36 @@ public static JdbcConnectionParams extractURLComponents(String uri, Properties i
}
}

if (!connParams.getSessionVars().containsKey(AUTH_KYUUBI_CLIENT_PRINCIPAL)) {
if (info.containsKey(AUTH_KYUUBI_CLIENT_PRINCIPAL)) {
connParams
.getSessionVars()
.put(AUTH_KYUUBI_CLIENT_PRINCIPAL, info.getProperty(AUTH_KYUUBI_CLIENT_PRINCIPAL));
}
}

if (!connParams.getSessionVars().containsKey(AUTH_KYUUBI_CLIENT_KEYTAB)) {
if (info.containsKey(AUTH_KYUUBI_CLIENT_KEYTAB)) {
connParams
.getSessionVars()
.put(AUTH_KYUUBI_CLIENT_KEYTAB, info.getProperty(AUTH_KYUUBI_CLIENT_KEYTAB));
}
}

if (!connParams.getSessionVars().containsKey(AUTH_KYUUBI_SERVER_PRINCIPAL)) {
if (info.containsKey(AUTH_KYUUBI_SERVER_PRINCIPAL)) {
connParams
.getSessionVars()
.put(AUTH_KYUUBI_SERVER_PRINCIPAL, info.getProperty(AUTH_KYUUBI_SERVER_PRINCIPAL));
}
}

if (!connParams.getSessionVars().containsKey(AUTH_PRINCIPAL)) {
if (info.containsKey(AUTH_PRINCIPAL)) {
connParams.getSessionVars().put(AUTH_PRINCIPAL, info.getProperty(AUTH_PRINCIPAL));
}
}

if (info.containsKey(AUTH_TYPE)) {
connParams.getSessionVars().put(AUTH_TYPE, info.getProperty(AUTH_TYPE));
}
Expand Down

0 comments on commit 062cd08

Please sign in to comment.