Tedious: Windows 身份验证需要指定用户名/密码

创建于 2016-08-01  ·  17评论  ·  资料来源: tediousjs/tedious

即使我在同一个域中,Tedious 也要求我为 Windows 身份验证指定用户名/密码。 在这种情况下,我不需要使用 ADO.NET 指定用户名/密码。 我假设驱动程序正在从凭据存储中获取 Kerberos 令牌。

Tedious 目前不提供此功能吗? 或者是否有一些配置可以使 Windows 身份验证工作而无需指定用户名/密码?

@arobson @arthurschreiber - 请思考。

Follow up Response needed

最有用的评论

我把一些东西放在一起把 sspi-client 集成到乏味的,看看它是否有效,它确实有效! 我能够使用 ntlm、kerberos 进行连接,并在不指定密码的情况下协商安全包!

@arthurschreiber你可以在这里找到黑客。 无论如何,这还没有为 PR 做好准备,但是如果您在高层次上看到问题,请告诉我。
https://github.com/tvrprasad/tedious/tree/windows-integrated-auth-draft

所有17条评论

我调查了一些。 到目前为止,我了解到的是,对 Windows 集成身份验证的支持使用 SSPI,而 NodeJS 目前不支持 SSPI。 有一个 node-sspi npm 包,但只支持服务器端。 它也只适用于 HTTP 服务器。 它是带有 JavaScript 绑定的本机实现。 客户端 SSPI 实现也需要是带有 JavaScript 绑定的本机代码。

我的建议是在新的 npm 包中构建客户端 SSPI 支持,其中包含一个适合 Tedious 使用的 API,并使 Tedious 依赖于 SQL Server Windows 集成身份验证包。

将不胜感激任何想法。 谢谢。

是的,这听起来很有道理。 我不认为二进制模块应该是乏味的一部分,所以 👍 将它作为单独的 npm 模块的想法。

凉爽的。 First Cut 可能只支持 Windows。 我们可以开始使用仅限 Windows 的功能吗?

Windows 和 Linux 具有不同的 API 来支持 Windows 集成身份验证。 我们应该能够将两个平台的支持整合到一个包中。 但是想知道是否有先例依赖于 Windows 与 Linux 的不同软件包。

凉爽的。 First Cut 可能只支持 Windows。 我们可以开始使用仅限 Windows 的功能吗?

是的,没关系。 我想这将是一个可选功能,所以最初只支持 Windows 就可以了。 👍

我正在使用我想到的 ClientSspi 类接口共享一个简短的片段。 请分享有关 API 形状的任何反馈。

ClientSspi = require('ClientSspi');

serverName = 'servername.example.com';

// Server name should be the only configuration. Windows SSPI APIs will get
// the tokens to be presented to the server to authenticate the logged in user.
clientSspi = new ClientSspi(serverName);

// authprotocol parameter can take three values.
// Negotiate, Kerberos, Ntlm
// Negotiate: With this option client will negotiate with the server
// on security protocol using SPNEGO.
//
// If nothing is specified, the first supported protocol will be used. The
// protocols will be attempted in the sequence listed above.
clientSspi.initialize(authprotocol, function(errorCode, errorString) {
  if (errorCode || errorString) {
    throw('SSPI intialization failed: ', errorCode, ': ', errorString);
  }

  var sspiServerResponse = new Uint8Array([]);
  var sspiDone = false;

  while (!sspiDone) {
    // This call gets the next set of bytes to send to the server as part of the
    // SSPI dance.
    clientSspi.getNextSspiBlob(sspiServerResponse, function (sspiClientResponse, isDone, errorCode, errorString) {
      if (errorCode || errorString) {
        throw('SSPI intialization failed: ', errorCode, ': ', errorString);
      }

      sspiDone = isDone;

      // This function will send the sspiClientResponse to the server and invokes the
      // callback when the response from the server becomes available.
      SendSspiBlobToSqlServerAndGetResponse(sspiClientResponse, function (serverResponse, errorString) {
        if (errorString) {
          throw(errorString);
        }

        sspiServerResponse = serverResponse;
      });
    });
  }
});

我在https://github.com/tvrprasad/sspi-client有一个 API 的存根实现

@arthurschreiber请在有机会时快速通过。 向我发送针对存储库的任何反馈或未解决的问题。 一旦我填写了实现,我计划使用它来实现 Tedious 中的 Windows 集成身份验证。

我把一些东西放在一起把 sspi-client 集成到乏味的,看看它是否有效,它确实有效! 我能够使用 ntlm、kerberos 进行连接,并在不指定密码的情况下协商安全包!

@arthurschreiber你可以在这里找到黑客。 无论如何,这还没有为 PR 做好准备,但是如果您在高层次上看到问题,请告诉我。
https://github.com/tvrprasad/tedious/tree/windows-integrated-auth-draft

重新打开此问题以跟踪 Windows 集成身份验证,直到它成为可插入的,更多详细信息请参见https://github.com/tediousjs/tedious/commit/f5a2260f。

@v-suhame 这是最新的吗? 你只是在等待#624?

我能做些什么来帮助它移动吗?

@kevinkuszyk感谢您提供帮助😃 在@arthurschreiber 中循环获取最新更新。

Linux 服务器上的 Windows 集成身份验证现在可用吗?

@sxpati2 Windows 集成身份验证,顾名思义是针对 Windows 操作系统。 对于 Linux,它将是 Kerberos 集成身份验证。 Tedious 目前不支持 Windows 或 Kerberos 集成身份验证,这是我们未来的计划。

我只是想看看这个。 似乎有一个重大的重构。 有没有一种方法可以让我将 msnodesqlv8 循环到乏味的状态? 我以为 msnodesqlv8 会进入续集,但事实并非如此。

@arthurschreiber看起来 PR #497 Windows 集成身份验证已合并,允许窗口身份验证而无需用户名/密码,但我似乎无法在最新的乏味版本中找到它。 只是想知道那个功能发生了什么?

从那以后情况有变化吗? 或者该功能在重构中暂时丢失了?

从那以后情况有变化吗? 或者该功能在重构中暂时丢失了?

我也很想知道!

您好,这个功能是什么词? 谢谢!

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

ggazulla picture ggazulla  ·  4评论

spacem picture spacem  ·  4评论

tvrprasad picture tvrprasad  ·  6评论

jstephens7 picture jstephens7  ·  5评论

cdibbs picture cdibbs  ·  6评论