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

NTLM support in mssql #609

Open
aniruddhakhadkikar opened this issue Apr 23, 2020 · 1 comment
Open

NTLM support in mssql #609

aniruddhakhadkikar opened this issue Apr 23, 2020 · 1 comment
Labels
driver:mssql Issues relating to the MSSQL driver enhancement New feature proposal help wanted Community contributions are welcome.

Comments

@aniruddhakhadkikar
Copy link

aniruddhakhadkikar commented Apr 23, 2020

Is your feature request related to a problem? Please describe.
Most production implementations of SQL Server today use windows authentication aka NTLM. Today the support for it is missing in cube.js although the underlying tedious library supports it.

Describe the solution you'd like
An ability to set the authentication type in .env file which is used in MSSqlDriver.js appropriately.
CUBEJS_DB_AUTHTYPE=takes options supported by tedious e.g. default, ntlm. Below I have used hardcoding as variables did not give the right behaviour and that is what needs solving.

class MSSqlDriver extends BaseDriver {
constructor(config) {
super();
this.config = {
server: process.env.CUBEJS_DB_HOST,
database: process.env.CUBEJS_DB_NAME,
port: process.env.CUBEJS_DB_PORT && parseInt(process.env.CUBEJS_DB_PORT, 10),
user: process.env.CUBEJS_DB_USER,
authentication: {
type: 'ntlm',
options: {
userName: 'hardcodedusername',
password: 'hardcodedpassword',
domain: 'hardcodeddomain'
}
},

Describe alternatives you've considered
This has been the only way I have been able to get ntlm working.

Additional context
I am not a javascript developer and will probably break something. So I thought it better to share the way I managed to get it working.

@paveltiunov
Copy link
Member

@aniruddhakhadkikar Hey Aniruddha! Thanks for posting this! Yeah. Makes sense to have it as an env option.

@paveltiunov paveltiunov added enhancement New feature proposal help wanted Community contributions are welcome. labels Apr 24, 2020
@hassankhan hassankhan added the driver:mssql Issues relating to the MSSQL driver label Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver:mssql Issues relating to the MSSQL driver enhancement New feature proposal help wanted Community contributions are welcome.
Projects
None yet
Development

No branches or pull requests

4 participants