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

Batch commands appear to not honor settingsfile-defined AuthenticationType #386

Closed
jormdav opened this issue Jun 22, 2023 · 0 comments · Fixed by #388
Closed

Batch commands appear to not honor settingsfile-defined AuthenticationType #386

jormdav opened this issue Jun 22, 2023 · 0 comments · Fixed by #388

Comments

@jormdav
Copy link
Contributor

jormdav commented Jun 22, 2023

We're testing a managed identity implementation, and have verified that ManagedIdentity is set as the AuthenticationType in our settingsfile, along with the expected values in the IdentityArgs section.

When the nodes attempt to run the batch command though, we see this in the Errors.log:

The --username and --password arguments are required when authentication type is set to Password or AzurePassword.;Returning error code: 1

Upon reviewing the command line on the batch job task, no --authtype arg is present, so it appears to presume SqlAuthentication, and we've purposefully neither of those values in our key vault.

We worked around in our test branch by shoehorning in the following into BatchManager.CompileCommanLines():

                if (cmdLine.AuthenticationArgs.AuthenticationType == AuthenticationType.ManagedIdentity)
                {
                    sb.Append(" --authtype ManagedIdentity ");
                }
mmckechney added a commit that referenced this issue Jun 23, 2023
…uthenticationType"

Fixes #387 "Batch runs called with --targetdacpac failing to find file on batch nodes"

Added ability to specify a settings file and identity args for `sbm utility override`

Updated connection string when using managed identity
mmckechney added a commit that referenced this issue Jun 23, 2023
Fixes #386 "Batch commands appear to not honor settingsfile-defined AuthenticationType"
Fixes #387 "Batch runs called with --targetdacpac failing to find file on batch nodes"
Added ability to specify a settings file and identity args for `sbm utility override`
Updated connection string when using managed identity
Resetting static ManagedIdentity and TenantId values. Only an issue when running unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant