From e66d65c6277b1d8fa860e5a49fccaae53efd053a Mon Sep 17 00:00:00 2001 From: Benjin Dubishar Date: Thu, 20 Feb 2025 18:27:46 -0800 Subject: [PATCH] Adding missing secureEnclaves connection parameter to connection interfaces (#18727) * adding missing secureEnclaves connection parameter * adding missing props to tests * Bumping STS version --- src/configurations/config.json | 2 +- src/models/connectionCredentials.ts | 2 ++ test/unit/connectionProfile.test.ts | 1 + test/unit/perFileConnection.test.ts | 1 + test/unit/schemaCompareWebViewController.test.ts | 1 + typings/vscode-mssql.d.ts | 5 +++++ 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/configurations/config.json b/src/configurations/config.json index 9209ebe9bc..a0655e3611 100644 --- a/src/configurations/config.json +++ b/src/configurations/config.json @@ -1,7 +1,7 @@ { "service": { "downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/{#version#}/microsoft.sqltools.servicelayer-{#fileName#}", - "version": "5.0.20250214.1", + "version": "5.0.20250220.4", "downloadFileNames": { "Windows_86": "win-x86-net8.0.zip", "Windows_64": "win-x64-net8.0.zip", diff --git a/src/models/connectionCredentials.ts b/src/models/connectionCredentials.ts index 2eec0f3548..a5c4695bda 100644 --- a/src/models/connectionCredentials.ts +++ b/src/models/connectionCredentials.ts @@ -33,6 +33,7 @@ export class ConnectionCredentials implements IConnectionInfo { public trustServerCertificate: boolean | undefined; public hostNameInCertificate: string | undefined; public persistSecurityInfo: boolean | undefined; + public secureEnclaves: string | undefined; public columnEncryptionSetting: string | undefined; public attestationProtocol: string | undefined; public enclaveAttestationUrl: string | undefined; @@ -86,6 +87,7 @@ export class ConnectionCredentials implements IConnectionInfo { credentials.hostNameInCertificate; details.options["persistSecurityInfo"] = credentials.persistSecurityInfo; + details.options["secureEnclaves"] = credentials.secureEnclaves; details.options["columnEncryptionSetting"] = credentials.columnEncryptionSetting; details.options["attestationProtocol"] = diff --git a/test/unit/connectionProfile.test.ts b/test/unit/connectionProfile.test.ts index 9b74ca9cc1..59536d830c 100644 --- a/test/unit/connectionProfile.test.ts +++ b/test/unit/connectionProfile.test.ts @@ -47,6 +47,7 @@ function createTestCredentials(): IConnectionInfo { hostNameInCertificate: "", persistSecurityInfo: false, columnEncryptionSetting: "Enabled", + secureEnclaves: "Enabled", attestationProtocol: "HGS", enclaveAttestationUrl: "https://attestationurl", connectTimeout: 15, diff --git a/test/unit/perFileConnection.test.ts b/test/unit/perFileConnection.test.ts index 7b32ad0ff5..02b3d83e53 100644 --- a/test/unit/perFileConnection.test.ts +++ b/test/unit/perFileConnection.test.ts @@ -65,6 +65,7 @@ function createTestCredentials(): IConnectionInfo { hostNameInCertificate: "", persistSecurityInfo: false, columnEncryptionSetting: "enabled", + secureEnclaves: "Enabled", attestationProtocol: "HGS", enclaveAttestationUrl: "https://attestationurl", connectTimeout: 15, diff --git a/test/unit/schemaCompareWebViewController.test.ts b/test/unit/schemaCompareWebViewController.test.ts index ab5cfbfab3..4e04430a11 100644 --- a/test/unit/schemaCompareWebViewController.test.ts +++ b/test/unit/schemaCompareWebViewController.test.ts @@ -169,6 +169,7 @@ suite("SchemaCompareWebViewController Tests", () => { hostNameInCertificate: undefined, persistSecurityInfo: undefined, columnEncryptionSetting: undefined, + secureEnclaves: undefined, attestationProtocol: undefined, enclaveAttestationUrl: undefined, commandTimeout: undefined, diff --git a/typings/vscode-mssql.d.ts b/typings/vscode-mssql.d.ts index f363646b5d..519a95b73c 100644 --- a/typings/vscode-mssql.d.ts +++ b/typings/vscode-mssql.d.ts @@ -313,6 +313,11 @@ declare module 'vscode-mssql' { */ persistSecurityInfo: boolean | undefined; + /** + * Gets or sets a value that specifies that Always Encrypted with Secure Enclaves is enabled in a connection. + */ + secureEnclaves: string | undefined; + /** * Gets or sets a string value that specifies whether Always Encrypted is enabled or disabled for the connection. */