Skip to content
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

Don't require secret id in user if already given in jdbc url #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dmcgillen
Copy link

Issue #, if available:

Description of changes:

Currently, the jdbc url can be a secret id, which is great, as it saves having to duplicate all the connection details already stored in secrets manager to build a full jdbc url. User, however, is still required to be passed in, and is also required to be a secret id, so just duplicates the one passed in under jdbc url. This change means that if the jdbc url is a secret id, you do not need to pass the secret id in again as user.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

}
} else {
return getWrappedDriver().connect(unwrappedUrl, info);
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is existing code that was previously after this if. It only applies if you are using a full jdbc url with the scheme, so I've moved it up here.

try {
return connectWithSecret(unwrappedUrl, info, credentialsSecretId);
return connectWithSecret(unwrappedUrl, info, url);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And in the case a user is using a secret as the jdbc url, just use that value rather than looking in user.

@dmcgillen
Copy link
Author

Let me know if any help is required or you'd like any changes to this PR. Cheers!

@simonmarty simonmarty added the enhancement New feature or request label May 10, 2022
@dmcgillen dmcgillen requested a review from ecraw-amzn as a code owner December 6, 2023 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants