Modify connection management to support Active Directory authType for non-SQL DBs (#8434)

* First attempt to add Azure MFA login for PostgreSQL

* Finish merge with master

* Fix auth type default selection

* Add AzureMFAAndUser auth type for Orcas

* Fix formatting

* Update change log

* Incorporate some review comments

* Missed an occurrence of AzureResource

* Try to move all changes out of azdata.d.ts and sqlops.d.ts

* Concrete implementation of ConnectionProfile in azdata no longer has azureAccount

* Use enum names instead of numbers in config files
This commit is contained in:
Rich Smith
2019-11-26 10:32:59 -08:00
committed by Karl Burtram
parent d9997cebfc
commit b631530753
20 changed files with 231 additions and 52 deletions

View File

@@ -158,7 +158,8 @@ export class AzureAccountProvider implements azdata.AccountProvider {
const resourceIdMap = new Map<azdata.AzureResource, string>([
[azdata.AzureResource.ResourceManagement, self._metadata.settings.armResource.id],
[azdata.AzureResource.Sql, self._metadata.settings.sqlResource.id]
[azdata.AzureResource.Sql, self._metadata.settings.sqlResource.id],
[azdata.AzureResource.OssRdbms, self._metadata.settings.ossRdbmsResource.id]
]);
let accessTokenPromises: Thenable<void>[] = [];

View File

@@ -74,6 +74,11 @@ interface Settings {
*/
sqlResource?: Resource;
/**
* Information that describes the OSS RDBMS resource
*/
ossRdbmsResource?: Resource;
/**
* A list of tenant IDs to authenticate against. If defined, then these IDs will be used
* instead of querying the tenants endpoint of the armResource

View File

@@ -31,6 +31,10 @@ const publicAzureSettings: ProviderSettings = {
id: 'https://database.windows.net/',
endpoint: 'https://database.windows.net'
},
ossRdbmsResource: {
id: 'https://ossrdbms-aad.database.windows.net',
endpoint: 'https://ossrdbms-aad.database.windows.net'
},
redirectUri: 'http://localhost/redirect'
}
}

View File

@@ -87,7 +87,13 @@
"description": "%cms.connectionOptions.authType.description%",
"groupName": "Security",
"valueType": "category",
"defaultValue": null,
"defaultValue": "SqlLogin",
"defaultValueOsOverrides": [
{
"os": "Windows",
"defaultValueOverride": "Integrated"
}
],
"objectType": null,
"categoryValues": [
{

View File

@@ -557,7 +557,13 @@
"description": "%mssql.connectionOptions.authType.description%",
"groupName": "Security",
"valueType": "category",
"defaultValue": null,
"defaultValue": "SqlLogin",
"defaultValueOsOverrides": [
{
"os": "Windows",
"defaultValueOverride": "Integrated"
}
],
"objectType": null,
"categoryValues": [
{

View File

@@ -138,6 +138,7 @@ class ConnectionParam implements azdata.connection.Connection, azdata.IConnectio
public saveProfile: boolean;
public id: string;
public azureTenantId?: string;
public azureAccount?: string;
public providerName: string;
public connectionId: string;