Skip to content

[FEATURE] Accept oauth secret as password #1132

@kaklakariada

Description

@kaklakariada

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions