-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Driver attempts to connect to non-secretsmanager JDBC URLs #2
Comments
Thank you for submitting this issue and providing this feedback. You are correct, today the driver only supports connecting to a database using secrets retrieved from AWS Secrets Manager. The thought was that those using this driver would only be connecting to a database using secrets retrieved from AWS Secrets Manager, and that they would want an error if that was not the case. I understand though that this is not true in your scenario. Can you help us better understand your use case by providing details on how you are defining the driver and the URL for the two databases within your app today? Would it be possible to configure different jdbc drivers for each database? |
We are making a change to not process any URL's that start with "jdbc:". In that case it will move on to the next JDBC driver instead of throwing an exception. We believe that will address your use case. |
A pull request has been created for this issue: #3. We hope to include it in the next release. |
The PR has been merged and a new release (1.0.1) has been created. The new JARs should be available in maven central momentarily. Closing this issue. |
My JDK 11 app connects to two databases, one using a jdbc-secretsmanager URL and the other using a plain jdbc URL. When DriverManager.getConnection() walks through the registered drivers to connect to the JDBC URL, if it tries the Secrets Manager driver first, it throws an exception complaining that the JDBC URL is not a valid secret ID.
I think AWSSecretsManagerDriver.connect() should not try to connect if the URL doesn't match the jdbc-secretsmanager scheme, or at least it should not try to connect if the URL does match the jdbc scheme.
The text was updated successfully, but these errors were encountered: