apache / apache/pinot

Pinot JDBC does not support pinot authentication

Open
#8,031 2 comments 0 reactions 1 assignee Claimed by @KKcorps View on GitHub
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
1d 21h
Merged PRs (30d)
189

Description

When trying to connect to pinot using jdbc client, after passing username/password details we are still getting 403.

Steps to setup test pinot cluster with auth to test
```
./bin/pinot-admin.sh AuthQuickStart -type batch
```

Code for jdbc client
```
@Bean
public DataSource pinotDatabase(PinotConfig pinotConfig) {
Map clients = pinotConfig.getClients();
Optional client = clients.values().stream().findFirst();
String host;
if (client.isPresent()) {
host = String.format("jdbc:pinot://%s:%s", client.get().getHosts().get(0), client.get().getPort());
} else {
throw new DataLabException(false,
"Unable to find cluster name configured under key 'pinot.clients' in application.yml.");
}
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setUrl(host);
dataSource.setDriverClassName("org.apache.pinot.client.PinotDriver");
dataSource.setUsername("secret");
dataSource.setPassword("verysecret");

return dataSource;
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.