KKcorps opened a new pull request #8062:
URL: https://github.com/apache/pinot/pull/8062


   This PR handles the issue #8031 . The PR adds support to parse username and 
password from JDBC params and generate auth token.
   The user can provide authorization token directly in the properties as 
`headers.Authorization` 
   OR
   they can provide username and password either in JDBC properties or as 
params in connection URL
   
   Example - 
   
   ### Using Auth property
   ```java
          Properties properties = new Properties();
         properties.put("headers.Authorization", "your_auth_token");
         String url = "jdbc:pinot://localhost:9000";
         DriverManager.getConnection(url, properties);
   ```
   
   ### Using username and password properties
   ```java
          Properties properties = new Properties();
         properties.put("user", "your_username");
         properties.put("password", "your_password");
         String url = "jdbc:pinot://localhost:9000";
         DriverManager.getConnection(url, properties);
   ```
   
   
   ### Using username and password in URL
   ```java
          Properties properties = new Properties();
         String url = 
"jdbc:pinot://localhost:9000?user=your_username&password=your_password";
         DriverManager.getConnection(url, properties);
   ```
   
   In case auth is provided in multiple places, the `Authorization` property 
takes first precedence followed by `user, password` property and finally the 
`user & password` in URL.
   


-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to