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
DM-21222: Stop forcing existence of credentials in connection strings. #191
Conversation
I was just thinking of removing most of the error Reading through the file twice (for |
Instead of parsing through the file twice with `exists` and then `getAuth` re-write the `DbAuth.getAuth` method to allow username and password to be None. This requires silencing any errors when credentials are miss-configured from ConnectionStringFactory's side. Short of having an explicit key in config stating whether a credentials lookup is desired there is no clear cut way to say if we must insist that username/password must exist or not. Instead, we believe the provided db string and try to return it unchanged as often as possible unless everything is configured correctly.
Ok. redid it the way @ktlim wanted. Username and password are allowed to be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, any PR where you end up with less LOC is usually good 👍
@ktlim You are probably quite busy this week, but could you take a look and comment on the changes. Is this more like what you had in mind? Someone should also run Jenkins on this because I don't have the privileges too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay to me. I'll do a Jenkins run. I don't think we need to wait for @ktlim to also approve.
Not forcing username and password in connection strings allows other mechanisms, such as Oracle Wallet, to insert the credentials.
It was difficult to untangle
getAuth
into sub-functionality soexists
is implemented in terms ofgetAuth
. Is that ok?Would this work?