mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 03:58:33 -05:00
Added NoAuth authenticationType for Kusto (#14375)
* Added NoAuth authenticationType for Kusto * Added SqlLogin to Kusto as an AuthType. Renamed NoAuth to None
This commit is contained in:
@@ -291,6 +291,14 @@
|
||||
{
|
||||
"displayName": "%kusto.connectionOptions.authType.categoryValues.azureMFA%",
|
||||
"name": "AzureMFA"
|
||||
},
|
||||
{
|
||||
"displayName": "%kusto.connectionOptions.authType.categoryValues.none%",
|
||||
"name": "None"
|
||||
},
|
||||
{
|
||||
"displayName": "%kusto.connectionOptions.authType.categoryValues.sqlLogin%",
|
||||
"name": "SqlLogin"
|
||||
}
|
||||
],
|
||||
"isRequired": true,
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
"kusto.connectionOptions.authType.displayName": "Authentication type",
|
||||
"kusto.connectionOptions.authType.description": "Specifies the method of authenticating with Kusto Server",
|
||||
"kusto.connectionOptions.authType.categoryValues.azureMFA": "Azure Active Directory - Universal with MFA support",
|
||||
"kusto.connectionOptions.authType.categoryValues.none": "No Authentication",
|
||||
"kusto.connectionOptions.authType.categoryValues.sqlLogin": "User Authentication",
|
||||
"kusto.connectionOptions.userName.displayName": "User name",
|
||||
"kusto.connectionOptions.userName.description": "Indicates the user ID to be used when connecting to the data source",
|
||||
"kusto.connectionOptions.password.displayName": "Password",
|
||||
|
||||
@@ -91,6 +91,9 @@ export class ConnectionStore {
|
||||
});
|
||||
} else if (credentialsItem.authenticationType === 'AzureMFA' || credentialsItem.authenticationType === 'dstsAuth' && credentialsItem.azureAccount) {
|
||||
return Promise.resolve({ profile: credentialsItem, savedCred: true });
|
||||
} else if (credentialsItem.authenticationType === 'None') {
|
||||
// Kusto supports no authentication
|
||||
return Promise.resolve({ profile: credentialsItem, savedCred: true });
|
||||
} else {
|
||||
// No need to look up the password
|
||||
return Promise.resolve({ profile: credentialsItem, savedCred: credentialsItem.savePassword });
|
||||
|
||||
@@ -42,7 +42,8 @@ export enum AuthenticationType {
|
||||
Integrated = 'Integrated',
|
||||
AzureMFA = 'AzureMFA',
|
||||
AzureMFAAndUser = 'AzureMFAAndUser',
|
||||
dSTSAuth = 'dstsAuth'
|
||||
dSTSAuth = 'dstsAuth',
|
||||
None = 'None' // Kusto supports no authentication
|
||||
}
|
||||
|
||||
export class ConnectionWidget extends lifecycle.Disposable {
|
||||
@@ -78,7 +79,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
protected _databaseNameInputBox: Dropdown;
|
||||
protected _advancedButton: Button;
|
||||
private static readonly _authTypes: AuthenticationType[] =
|
||||
[AuthenticationType.AzureMFA, AuthenticationType.AzureMFAAndUser, AuthenticationType.Integrated, AuthenticationType.SqlLogin, AuthenticationType.dSTSAuth];
|
||||
[AuthenticationType.AzureMFA, AuthenticationType.AzureMFAAndUser, AuthenticationType.Integrated, AuthenticationType.SqlLogin, AuthenticationType.dSTSAuth, AuthenticationType.None];
|
||||
private static readonly _osByName = {
|
||||
Windows: OperatingSystem.Windows,
|
||||
Macintosh: OperatingSystem.Macintosh,
|
||||
@@ -523,6 +524,14 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
this._tableContainer.classList.add('hide-username');
|
||||
this._tableContainer.classList.add('hide-password');
|
||||
this._tableContainer.classList.add('hide-azure-accounts');
|
||||
} else if (currentAuthType === AuthenticationType.None) {
|
||||
this._azureAccountDropdown.disable();
|
||||
this._azureAccountDropdown.hideMessage();
|
||||
this._azureTenantDropdown.disable();
|
||||
this._azureTenantDropdown.hideMessage();
|
||||
this._tableContainer.classList.add('hide-username');
|
||||
this._tableContainer.classList.add('hide-password');
|
||||
this._tableContainer.classList.add('hide-azure-accounts');
|
||||
} else {
|
||||
this._azureAccountDropdown.disable();
|
||||
this._azureAccountDropdown.hideMessage();
|
||||
|
||||
Reference in New Issue
Block a user