Add support for AAD interactive connection strings for project data sources (#11761)

* add support for AAD interactive for project data sources

* fix whitespace

* remove warning message

* choose azureMFA if a connection string has both integrated security=true and authentication=active directory interactive
This commit is contained in:
Kim Santiago
2020-08-14 16:13:22 -07:00
committed by GitHub
parent a34a72795b
commit 3b2e53d270
6 changed files with 38 additions and 6 deletions

View File

@@ -16,6 +16,14 @@
"data": {
"connectionString": "Data Source=.;Initial Catalog=testDb2;Integrated Security=False"
}
},
{
"name": "AAD Interactive Data Source",
"type": "sql_connection_string",
"version": "0.0.0",
"data": {
"connectionString": "Data Source=.;Initial Catalog=testDb3;Authentication='Active Directory Interactive'"
}
}
]
}

View File

@@ -18,7 +18,7 @@ describe.skip('Data Sources: DataSource operations', function (): void {
const dataSourcePath = await testUtils.createTestDataSources(baselines.openDataSourcesBaseline);
const dataSourceList = await dataSources.load(dataSourcePath);
should(dataSourceList.length).equal(2);
should(dataSourceList.length).equal(3);
should(dataSourceList[0].name).equal('Test Data Source 1');
should(dataSourceList[0].type).equal(sql.SqlConnectionDataSource.type);
@@ -26,5 +26,9 @@ describe.skip('Data Sources: DataSource operations', function (): void {
should(dataSourceList[1].name).equal('My Other Data Source');
should((dataSourceList[1] as sql.SqlConnectionDataSource).integratedSecurity).equal(false);
should(dataSourceList[2].name).equal('AAD Interactive Data Source');
should((dataSourceList[2] as sql.SqlConnectionDataSource).integratedSecurity).equal(false);
should((dataSourceList[2] as sql.SqlConnectionDataSource).azureMFA).equal(true);
});
});

View File

@@ -84,7 +84,7 @@ describe('ProjectsController', function (): void {
const project = await projController.openProject(vscode.Uri.file(sqlProjPath));
should(project.files.length).equal(9); // detailed sqlproj tests in their own test file
should(project.dataSources.length).equal(2); // detailed datasources tests in their own test file
should(project.dataSources.length).equal(3); // detailed datasources tests in their own test file
});
it('Should load both project and referenced project', async function (): Promise<void> {