Skip to content

Commit

Permalink
feat(Microsoft SQL Node): Add support for self signed certificates (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Joffcom committed Mar 9, 2023
1 parent 5b9c521 commit 971d5ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/nodes-base/credentials/MicrosoftSql.credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ export class MicrosoftSql implements ICredentialType {
type: 'boolean',
default: true,
},
{
displayName: 'Ignore SSL Issues',
name: 'allowUnauthorizedCerts',
type: 'boolean',
default: false,
description: 'Whether to connect even if SSL certificate validation is not possible',
},
{
displayName: 'Connect Timeout',
name: 'connectTimeout',
Expand Down
3 changes: 3 additions & 0 deletions packages/nodes-base/nodes/Microsoft/Sql/MicrosoftSql.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ export class MicrosoftSql implements INodeType {
options: {
encrypt: credentials.tls as boolean,
enableArithAbort: false,
tdsVersion: credentials.tdsVersion as string,
trustServerCertificate: credentials.allowUnauthorizedCerts as boolean,
},
};
const pool = new mssql.ConnectionPool(config);
Expand Down Expand Up @@ -269,6 +271,7 @@ export class MicrosoftSql implements INodeType {
encrypt: credentials.tls as boolean,
enableArithAbort: false,
tdsVersion: credentials.tdsVersion as string,
trustServerCertificate: credentials.allowUnauthorizedCerts as boolean,
},
};

Expand Down

0 comments on commit 971d5ae

Please sign in to comment.