-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Sqlserver input: require authentication method to be specified #9388
Conversation
@cerilewis could you test the PR build once CI passes? @avinash-nigam what do you think of this solution? |
@reimda I've found this via #9362 I've a thought if it helps in any way, normally in my experience whilst no user or password is provided in the connection string for Windows Integrated Authentication, normally the setting Integrated Security=true would be set to indicate the intention e.g. |
@reimda I can confirm that using the config that failed previously with 1.19.0rc0 now works with the tiger build above. |
@srebhan Tagging you in on this to see if you can help merge this please? |
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.
The code looks good to me, however, I think we should give the "default" auth method a more descriptive name e.g. "credentials" or "connection params".
Looks like new artifacts were built from this PR. Get them here!Artifact URLs |
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.
LGTM!
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 good to me.
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.
This looks good, but you may want to consider adding a test to ensure future changes don't break support for this, but that's optional here and not required to merge. just let us know if you want to wait on merging.
(cherry picked from commit 537ac63)
The sqlserver input plugin uses windows authentication (aka integrated security) when there is no username and password in the connection string.
#8822 added support for AAD authentication but only when there is no password in the connection string. Since the new check for no password happens before the previous connection logic, this causes windows authentication to be unavailable, which is a regression.
This PR adds a setting to enable AAD authentication. This allows use of windows authentication as before. It's backward compatible because the default of the new setting is the old behavior. New users who want to use AAD will to opt in to the new auth behavior by changing the setting to "AAD".
resolves #9362