aws / aws-secretsmanager-jdbc

The AWS Secrets Manager JDBC Library enables Java developers to easily connect to SQL databases using secrets stored in AWS Secrets Manager.
Apache License 2.0
159 stars 78 forks source link

JDBC URL config example is unclear #229

Open eoliphan opened 4 months ago

eoliphan commented 4 months ago

Describe the bug The Usage Example indicates that setting the db url to this driver's scheme (jdbc-secretsmanager) will result in it being 'intercepted' by the driver.

This (to me at least) indicates that the driver will replace the 'jdbc-secretsmanager:...' url with the one in the AWS Secret. When in fact this config only results in the 'jdbc-secretsmanager"' bing replaced with 'jdbc:' (presumably to allow you to only manage the un/pw in AWS Secrets Manager?)

Expected behavior Usage example should document that the rest of the url is passed as is if 'jdbc-secretsmanager:' scheme is used, and that if you wish to pull all the connection info from the secret, that the secret id should be used as the url as well.

Also, the examples in the AWS Docs do make this clear

jbct commented 3 months ago

Hi @eoliphan, thank you for the feedback. We will look into making this more clear.