TLS option for MSSQL credentials type (#1132)

* Update MicrosoftSql.node.ts

* Update MicrosoftSql.credentials.ts

* Update MicrosoftSql.node.ts

Add TLS encryption toggle to MSSQL credentials type and implement into the connection config object. This will help users connect to certain Azure MSSQL products and older MSSQL instances.
This commit is contained in:
bsanderrmg 2020-11-10 17:30:03 -05:00 committed by GitHub
parent 03a672300f
commit 10645c2ef5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -44,5 +44,11 @@ export class MicrosoftSql implements ICredentialType {
type: 'string' as NodePropertyTypes, type: 'string' as NodePropertyTypes,
default: '', default: '',
}, },
{
displayName: 'TLS',
name: 'tls',
type: 'boolean' as NodePropertyTypes,
default: true,
},
]; ];
} }

View file

@ -217,6 +217,9 @@ export class MicrosoftSql implements INodeType {
user: credentials.user as string, user: credentials.user as string,
password: credentials.password as string, password: credentials.password as string,
domain: credentials.domain ? (credentials.domain as string) : undefined, domain: credentials.domain ? (credentials.domain as string) : undefined,
options: {
encrypt: credentials.tls as boolean
},
}; };
const pool = new mssql.ConnectionPool(config); const pool = new mssql.ConnectionPool(config);