You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* MSI Auth for SQL Server
Add MSI Auth option to SQL Server connection. Default if no password is provided in connection string.
* Parse resource endpoint from server for msi
update host name parsing to get just the resource endpoint for msi
* Update go-mssqldb
update go-mssqldb to resolve panic issue referenced here: denisenkom/go-mssqldb#642
* Update sqlserver.go
switch from deprecated methods. NewServicePrincipalTokenFromManagedIdentity calls the two methods that are deprecated for us
* Update sqlserver.go
add useMsi param instead of looking for nil password
* Update sqlserver readme
Update sqlserver readme for msi auth. make useMsi a bit safer
* Update sqlserver.go
remove comment
* Update database/sqlserver/README.md
Co-authored-by: Keegan Campbell <[email protected]>
* Update sqlserver.go
refactor resource uri logic into its own method
* Update sqlserver_test.go
add tests for msi connection. can only test whether it fails with useMsi= true, or succeeds with useMsi=false
* Update sqlserver.go
check msi.EnsureFresh return value
* Return error for multiple auth and move query filter
move migrate.FilterCustomQuery(purl).String() into one line out of if/else. return error if both useMsi=true and password are passed
* Update README.md
update readme with warning for useMsi
* Update sqlserver_test.go
Update TestMsiFalse test case as now it should fail when useMsi=false and no password is provided
Co-authored-by: Keegan Campbell <[email protected]>
Copy file name to clipboardExpand all lines: database/sqlserver/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@
16
16
|`dial+timeout`|| in seconds (default is 15), set to 0 for no timeout. |
17
17
|`encrypt`||`disable` - Data send between client and server is not encrypted. `false` - Data sent between client and server is not encrypted beyond the login packet (Default). `true` - Data sent between client and server is encrypted. |
18
18
|`app+name`|| The application name (default is go-mssqldb). |
19
+
| `useMsi` | | `true` - Use Azure MSI Authentication for connecting to Sql Server. Must be running from an Azure VM/an instance with MSI enabled. `false` - Use password authentication (Default). See [here for Azure MSI Auth details](https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-connect-msi). NOTE: Since this cannot be tested locally, this is not officially supported.
19
20
20
21
See https://github.com/denisenkom/go-mssqldb for full parameter list.
0 commit comments