Does pinot JDBC client support pinot authenticatio...
# troubleshooting
y
Does pinot JDBC client support pinot authentication. We are trying to connect to our pinot instance but keep getting 403.
k
Hi, it doesn't at the moment. Can you tell me how you are trying to connect. I can work on integrating the auth.
y
Copy code
@Bean
    public DataSource pinotDatabase(PinotConfig pinotConfig) {
        Map<String, PinotClientProperties> clients = pinotConfig.getClients();
        Optional<PinotClientProperties> 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");

        return dataSource;
    }
Want to add
Copy code
dataSource.setUsername("username");
        dataSource.setPassword("password");
k
Got it. And your pinot cluster is not accessible without username and password, right?
y
Yes.
k
Got it.
y
Created an issue for the same. https://github.com/apache/pinot/issues/8031