From d270570ef8b12d1b7b2cddd3665d7d1d3e429b3c Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Wed, 18 Jan 2023 23:17:48 +0000 Subject: [PATCH] Revert "Merge pull request #1436 from Shin-Aska/feature/aad-integration-conn-string" This reverts commit 7220582025dd3a06ffb870da8b6d1afd8486c7a7, reversing changes made to 655f4396efef1511c6ce1ccbe4c1966996048874. --- CHANGELOG.txt | 4 ++++ README.md | 26 +------------------------- lib/base/connection-pool.js | 25 +------------------------ 3 files changed, 6 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 01abb583..27cf725f 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,7 @@ +v9.1.1 (2023-01-??) +------------------- +[revert] Add support for AAD authentication via connection string ((#1436)[https://github.com/tediousjs/node-mssql/pull/1436]) + v9.1.0 (2023-01-17) ------------------- [new] Add support for AAD authentication via connection string ((#1436)[https://github.com/tediousjs/node-mssql/pull/1436]) diff --git a/README.md b/README.md index 2d752227..2a763c61 100644 --- a/README.md +++ b/README.md @@ -571,36 +571,12 @@ Complete list of pool options can be found [here](https://github.com/vincit/tarn In addition to configuration object there is an option to pass config as a connection string. Connection strings are supported. ##### Classic Connection String -###### Standard configuration using tedious driver ``` Server=localhost,1433;Database=database;User Id=username;Password=password;Encrypt=true -``` -###### Standard configuration using msnodesqlv8 driver -``` Driver=msnodesqlv8;Server=(local)\INSTANCE;Database=database;UID=DOMAIN\username;PWD=password;Encrypt=true ``` -##### Azure Active Directory Authentication Connection String - -Several types of Azure Authentication are supported: -###### Authentication using Default Azure Credentials -``` -Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-default;ClientID=clientid;Encrypt=true -``` -###### Authentication using Active Directory Password -``` -Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-password;User Id=username;Password=password;ClientID=clientid;TenantID=tenantid;Encrypt=true -``` -###### Authentication using Access Token -``` -Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-access-token;Token=token;Encrypt=true -``` -###### Authentication using Service Principal -``` -Server=*.database.windows.net;Database=database;Authentication=azure-active-directory-service-principal-secret;ClientID=clientid;ClientSecret=clientsecret;TenantID=tenantid;Encrypt=true -``` - ## Drivers ### Tedious @@ -2121,4 +2097,4 @@ to create new connections or not [appveyor-url]: https://ci.appveyor.com/project/tediousjs/node-mssql [tedious-url]: https://www.npmjs.com/package/tedious -[msnodesqlv8-url]: https://www.npmjs.com/package/msnodesqlv8 \ No newline at end of file +[msnodesqlv8-url]: https://www.npmjs.com/package/msnodesqlv8 diff --git a/lib/base/connection-pool.js b/lib/base/connection-pool.js index 527ff045..eb468f2e 100644 --- a/lib/base/connection-pool.js +++ b/lib/base/connection-pool.js @@ -114,9 +114,6 @@ class ConnectionPool extends EventEmitter { case 'attachdbfilename': break case 'authentication': - Object.assign(config.authentication, { - type: value - }) break case 'column encryption setting': break @@ -136,16 +133,6 @@ class ConnectionPool extends EventEmitter { break case 'context connection': break - case 'client id': - Object.assign(config.authentication.options, { - clientId: value - }) - break - case 'client secret': - Object.assign(config.authentication.options, { - clientSecret: value - }) - break case 'current language': Object.assign(config.options, { language: value @@ -235,16 +222,6 @@ class ConnectionPool extends EventEmitter { break case 'replication': break - case 'tenant id': - Object.assign(config.authentication.options, { - tenantId: value - }) - break - case 'token': - Object.assign(config.authentication.options, { - token: value - }) - break case 'transaction binding': Object.assign(config.options, { enableImplicitTransactions: value.toLowerCase() === 'implicit unbind' @@ -301,7 +278,7 @@ class ConnectionPool extends EventEmitter { break } return config - }, { authentication: { options: {} }, options: {}, pool: {} }) + }, { options: {}, pool: {} }) } /**