azure managed identity support

This commit is contained in:
SPRINX0\prochazka
2025-02-05 13:05:02 +01:00
parent 6c8cf8e327
commit ac2128dcde
4 changed files with 131 additions and 22 deletions

View File

@@ -72,6 +72,14 @@ const driver = {
}
);
}
if (!platformInfo.isElectron) {
res.push({
title: 'Azure Managed Identity',
name: 'azureManagedIdentity',
disabledFields: ['user', 'password'],
});
}
if (res.length > 0) {
return _.uniqBy(res, 'name');
}
@@ -80,7 +88,8 @@ const driver = {
async connect(conn) {
const { authType } = conn;
const connectionType = platformInfo?.isWindows && (authType == 'sspi' || authType == 'sql') ? 'msnodesqlv8' : 'tedious';
const connectionType =
platformInfo?.isWindows && (authType == 'sspi' || authType == 'sql') ? 'msnodesqlv8' : 'tedious';
const client = connectionType == 'msnodesqlv8' ? await nativeConnect(conn) : await tediousConnect(conn);
return {