Skip to content

Commit

Permalink
Revert "Merge pull request #1436 from Shin-Aska/feature/aad-integrati…
Browse files Browse the repository at this point in the history
…on-conn-string"

This reverts commit 7220582, reversing
changes made to 655f439.
  • Loading branch information
dhensby committed Jan 18, 2023
1 parent ab79c86 commit d270570
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 49 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -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])
Expand Down
26 changes: 1 addition & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
[msnodesqlv8-url]: https://www.npmjs.com/package/msnodesqlv8
25 changes: 1 addition & 24 deletions lib/base/connection-pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -301,7 +278,7 @@ class ConnectionPool extends EventEmitter {
break
}
return config
}, { authentication: { options: {} }, options: {}, pool: {} })
}, { options: {}, pool: {} })
}

/**
Expand Down

0 comments on commit d270570

Please sign in to comment.