Introduce mssql connection property 'host name in certificate' (#21064)

This commit is contained in:
Cheena Malhotra
2023-01-25 17:09:28 -08:00
committed by GitHub
parent 065dfef1e4
commit 81b7cd2612
10 changed files with 54 additions and 2 deletions

View File

@@ -245,6 +245,20 @@
"isRequired": false,
"isArray": false
},
{
"specialValueType": null,
"isIdentity": false,
"name": "hostNameInCertificate",
"displayName": "%cms.connectionOptions.hostNameInCertificate.displayName%",
"description": "%cms.connectionOptions.hostNameInCertificate.description%",
"groupName": "%cms.connectionOptions.groupName.security%",
"valueType": "string",
"defaultValue": null,
"objectType": null,
"categoryValues": null,
"isRequired": false,
"isArray": false
},
{
"specialValueType": null,
"isIdentity": false,

View File

@@ -70,6 +70,8 @@
"cms.connectionOptions.encrypt.description": "When true, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed",
"cms.connectionOptions.persistSecurityInfo.displayName": "Persist security info",
"cms.connectionOptions.persistSecurityInfo.description": "When false, security-sensitive information, such as the password, is not returned as part of the connection",
"cms.connectionOptions.hostNameInCertificate.displayName": "Host name in certificate",
"cms.connectionOptions.hostNameInCertificate.description": "Indicates the host name specified in TLS certificate that will be used by SQL Server to validate server certificate. When not specified, the server name is used by default for certificate validation.",
"cms.connectionOptions.trustServerCertificate.displayName": "Trust server certificate",
"cms.connectionOptions.trustServerCertificate.description": "When true (and encrypt=true), SQL Server uses SSL encryption for all data sent between the client and server without validating the server certificate",
"cms.connectionOptions.attachedDBFileName.displayName": "Attached DB file name",

View File

@@ -849,6 +849,20 @@
"isRequired": false,
"isArray": false
},
{
"specialValueType": null,
"isIdentity": false,
"name": "hostNameInCertificate",
"displayName": "%mssql.connectionOptions.hostNameInCertificate.displayName%",
"description": "%mssql.connectionOptions.hostNameInCertificate.description%",
"groupName": "%mssql.connectionOptions.groupName.security%",
"valueType": "string",
"defaultValue": null,
"objectType": null,
"categoryValues": null,
"isRequired": false,
"isArray": false
},
{
"specialValueType": null,
"isIdentity": false,

View File

@@ -119,6 +119,8 @@
"mssql.connectionOptions.encrypt.description": "When true, SQL Server uses SSL encryption for all data sent between the client and server if the server has a certificate installed",
"mssql.connectionOptions.persistSecurityInfo.displayName": "Persist security info",
"mssql.connectionOptions.persistSecurityInfo.description": "When false, security-sensitive information, such as the password, is not returned as part of the connection",
"mssql.connectionOptions.hostNameInCertificate.displayName": "Host name in certificate",
"mssql.connectionOptions.hostNameInCertificate.description": "Indicates the host name specified in TLS certificate that will be used by SQL Server to validate server certificate. When not specified, the server name is used by default for certificate validation.",
"mssql.connectionOptions.trustServerCertificate.displayName": "Trust server certificate",
"mssql.connectionOptions.trustServerCertificate.description": "When true (and encrypt=true), SQL Server uses SSL encryption for all data sent between the client and server without validating the server certificate",
"mssql.connectionOptions.attachedDBFileName.displayName": "Attached DB file name",

View File

@@ -93,6 +93,7 @@ export function createTestCredentials(): vscodeMssql.IConnectionInfo {
expiresOn: 0,
encrypt: false,
trustServerCertificate: false,
hostNameInCertificate: '',
persistSecurityInfo: false,
connectTimeout: 15,
connectRetryCount: 0,

View File

@@ -79,6 +79,7 @@ export class ConnectionService {
multipleActiveResultSets: undefined,
packetSize: undefined,
persistSecurityInfo: undefined,
hostNameInCertificate: undefined,
pooling: undefined,
replication: undefined,
trustServerCertificate: undefined,

View File

@@ -75,6 +75,7 @@ export const mockConnectionInfo: vscodeMssql.IConnectionInfo = {
expiresOn: 0,
encrypt: false,
trustServerCertificate: false,
hostNameInCertificate: '',
persistSecurityInfo: false,
connectTimeout: 15,
connectRetryCount: 0,

View File

@@ -295,6 +295,11 @@ declare module 'vscode-mssql' {
*/
trustServerCertificate: boolean | undefined;
/**
* Indicates the host name specified in TLS certificate that will be used by SQL Server to validate server certificate. When not specified, the server name is used by default for certificate validation.
*/
hostNameInCertificate: string | undefined;
/**
* Gets or sets a Boolean value that indicates if security-sensitive information, such as the password, is not returned as part of the connection
* if the connection is open or has ever been in an open state.

View File

@@ -269,6 +269,12 @@
<trans-unit id="cms.connectionOptions.serverName.displayName">
<source xml:lang="en">Server</source>
</trans-unit>
<trans-unit id="cms.connectionOptions.hostNameInCertificate.description">
<source xml:lang="en">Indicates the host name specified in TLS certificate that will be used by SQL Server to validate server certificate. When not specified, the server name is used by default for certificate validation.</source>
</trans-unit>
<trans-unit id="cms.connectionOptions.hostNameInCertificate.displayName">
<source xml:lang="en">Host name in certificate</source>
</trans-unit>
<trans-unit id="cms.connectionOptions.trustServerCertificate.description">
<source xml:lang="en">When true (and encrypt=true), SQL Server uses SSL encryption for all data sent between the client and server without validating the server certificate</source>
</trans-unit>
@@ -396,4 +402,4 @@
<source xml:lang="en">Version</source>
</trans-unit>
</body></file>
</xliff>
</xliff>

View File

@@ -352,6 +352,12 @@
<trans-unit id="mssql.connectionOptions.serverName.displayName">
<source xml:lang="en">Server</source>
</trans-unit>
<trans-unit id="mssql.connectionOptions.hostNameInCertificate.description">
<source xml:lang="en">Indicates the host name specified in TLS certificate that will be used by SQL Server to validate server certificate. When not specified, the server name is used by default for certificate validation.</source>
</trans-unit>
<trans-unit id="mssql.connectionOptions.hostNameInCertificate.displayName">
<source xml:lang="en">Host name in certificate</source>
</trans-unit>
<trans-unit id="mssql.connectionOptions.trustServerCertificate.description">
<source xml:lang="en">When true (and encrypt=true), SQL Server uses SSL encryption for all data sent between the client and server without validating the server certificate</source>
</trans-unit>
@@ -593,4 +599,4 @@
<source xml:lang="en">Show Log File</source>
</trans-unit>
</body></file>
</xliff>
</xliff>