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

Trouble querying from linked server #854

Closed
jennypho opened this issue Jan 30, 2019 · 4 comments
Closed

Trouble querying from linked server #854

jennypho opened this issue Jan 30, 2019 · 4 comments

Comments

@jennypho
Copy link

jennypho commented Jan 30, 2019

I have DB1 and added a linked server DB2 and have stored procedures that execute from DB2.
Windows account has read-only permissions in DB2

const {Request} = require('tedious');
const TYPES = require('tedious').TYPES;
const ConnectionPool = require('tedious-connection-pool');
//const dbConfig = require('./dbconfig');
const client = require("mssql/msnodesqlv8");

const poolConfig = {
    min: 1,
    max: 1,
    log: true
};

const config = {
    userName: "WindowsUsername",
    password: "Password",
    server: "localhost",
    domain: "US",
    options: {
        instance: "SQLEXPRESS",
        database: "DB1",
        encrypt: false,
        rowCollectionOnDone: true,
        useColumnNames: true
    }
};

const pool = new ConnectionPool(poolConfig, config);

My sql query executes within sql management on the same windows account in a stored procedure under db1 but gets an error when running on the application

    SELECT *
    FROM [SERVERNAME].[DB2].[SCHEMA].[TABLE]

Error when executing stored procedure in DB1

message: 'Login failed for user \'NT AUTHORITY\\ANONYMOUS LOGON\'.',
  code: 'EREQUEST',
  number: 18456,
  state: 1,
  class: 14,
  serverName: 'DB2',
  procName: '',
  lineNumber: 1 }
@MichaelSun90
Copy link
Contributor

Hi @jennypho, just read through your problem with the linked server. Unfortunately, tedious doesn't currently support delegated authentication. This has been discussed in another issue #735. You can check that issue for some more details.

@drc-schihak
Copy link

@MichaelSun90 It looks like the main issue #624 hasn't been updated in while. Do you have any idea on a timeline for that issue?

@MichaelSun90
Copy link
Contributor

MichaelSun90 commented Jul 29, 2019

HI @drc-schihak, I think that PR is still in progress. I saw you already pined Arthur for progress a few days ago. I think the pluggable authentication providers are still going to happen, but there has not been a decision made on the date yet.

@IanChokS
Copy link
Member

IanChokS commented Dec 13, 2019

@drc-schihak @jennypho, this feature request should be made possible with #624, so stay tuned on that PR for updates. Closing this issue.

Right now, some team members of tedious are focusing on the Always Encrypted feature which could take a while (a year or so), but we will also see how to finish up PR#624 led by @arthurschreiber as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants