zhang-arvin opened a new pull request, #7707:
URL: https://github.com/apache/kyuubi/pull/7707
Closes #6689.
## Proposed changes
Allow users to pass `kyuubiClientPrincipal` and `kyuubiClientKeytab` through
JDBC connection properties (via `DriverManager.getConnection(url, properties)`
or URL parameters), instead of only being able to set them globally in
`kyuubi-defaults.conf`.
Previously, `Utils.extractURLComponents()` only extracted `user`,
`password`, and `auth` from the JDBC connection properties object. The
`kyuubiClientPrincipal` and `kyuubiClientKeytab` could only be set through the
JDBC URL session parameters.
This change adds extraction of `kyuubiClientPrincipal`,
`kyuubiClientKeytab`, `kyuubiClientTicketCache`, and `kyuubiServerPrincipal`
from the JDBC connection properties, similar to how `user`/`password`/`auth`
are already handled.
### Usage example
```java
Properties properties = new Properties();
properties.put("kyuubiClientPrincipal", "user@REALM");
properties.put("kyuubiClientKeytab", "/path/to/user.keytab");
Connection connection =
DriverManager.getConnection("jdbc:kyuubi://host:10009/default;principal=kyuubi/_HOST@REALM",
properties);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]