Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Azure Active Directory login in MSSQL/Tedious #375

Closed
ransagy opened this issue Sep 10, 2019 · 8 comments
Closed

Support for Azure Active Directory login in MSSQL/Tedious #375

ransagy opened this issue Sep 10, 2019 · 8 comments
Assignees
Labels
feature request New issue opened using "Feature request" template good first issue Easy issue for beginners to start contributing to the project

Comments

@ransagy
Copy link
Contributor

ransagy commented Sep 10, 2019

Would it be possible to support Azure Active Directory (password) logins in the extension?

As per the tediousjs documentation (http://tediousjs.github.io/tedious/api-connection.html), tedious and the version used by node-mssql already supports it.

Where would i look to if i wanted to add a PR for this?

@ransagy ransagy added the feature request New issue opened using "Feature request" template label Sep 10, 2019
@mtxr
Copy link
Owner

mtxr commented Sep 19, 2019

Hey @ransagy is possible for sure.

But I believe we already support this, it's just not documented.

Did you try to add it those options to mssqlOptions like this:

"mssqlOptions": {
  ...
  "authentication": {
    "type": "azure-active-directory-password",
    "options": {
      "userName": "<userName>",
      "password": "<password>"
    }
  },
}

@mtxr mtxr added the good first issue Easy issue for beginners to start contributing to the project label Sep 19, 2019
@ransagy
Copy link
Contributor Author

ransagy commented Sep 22, 2019

@mtxr You're right, it does work; but only if the password is embedded in the configuration. if i try to use "askForPassword": false and only leave the username part of that, authentication fails. In this case, the password is my Azure account pass which is a bit too sensitive to leave in the json in plaintext.

@BobbyMcWho
Copy link

@ransagy wouldn't you want "askForPassword" to be true if you're not embedding it in the json?

@ransagy
Copy link
Contributor Author

ransagy commented Sep 27, 2019

@BobbyMcWho that's just the problem; it doesn't input the password into the specific aad password field in this case, but into the generic one, thus failing the login.

@ransagy ransagy closed this as completed Sep 27, 2019
@ransagy ransagy reopened this Sep 27, 2019
@mtxr mtxr closed this as completed in 2eb5efa Sep 28, 2019
@mtxr
Copy link
Owner

mtxr commented Sep 28, 2019

@ransagy I just did a commit. I don't have a way to test it. Would you mind testing and reaching me back?

@mtxr mtxr self-assigned this Sep 28, 2019
@ransagy
Copy link
Contributor Author

ransagy commented Sep 28, 2019

@mtxr I'll try grabbing the repo and building to test, will get back to you.

@ransagy
Copy link
Contributor Author

ransagy commented Sep 28, 2019

@mtxr confirmed working, thanks!

@mtxr
Copy link
Owner

mtxr commented Sep 28, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template good first issue Easy issue for beginners to start contributing to the project
Projects
None yet
Development

No branches or pull requests

3 participants