-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Is your feature request related to a problem? Please describe.
When using OAuth Client Credentials (Machine-to-Machine), the JDBC driver requires putting the oauth secret into the JDBC URL:
AuthMech=11;Auth_Flow=1;OAuth2ClientId=<client_id>;OAuth2Secret=<client_secret>
Depending on the application, the JDBC URL (and the secret) might be revealed e.g. in log files.
Describe the solution you'd like
Update the JDBC driver to accept the OAuth secret as password (and maybe the client ID as username). This way, the OAuth secret will not be revealed in log files.
Describe alternatives or workarounds you've considered
Using DriverManager.getConnection(String url, Properties info) and specifying the secret in the info properties.
But this is not possible when the application only uses DriverManager.getConnection(String url, String user, String password).
Additional Context
When using tokens, you can use getConnection(url, "token", "<your_token>"). Maybe a similar mechanism could be implemented also for M2M Oauth.