简体   繁体   English

启用有线加密后如何使用 Node.js 连接到 Firebird?

[英]How to connect to Firebird with Node.js when wire encryption is enabled?

I'm trying to connect to a Firebird server with Node.js "node-firebird", but I always get the error我正在尝试使用 Node.js“node-firebird”连接到 Firebird 服务器,但我总是收到错误消息

Incompatible wire encryption levels requested on client and server at doCallback在 doCallback 客户端和服务器上请求的不兼容的有线加密级别

The problem is that I'm just trying to connect on a server that a company gave me the data to connect, however I don't have access to change the wire crypt in this Firebird server, neither they know how to do that.问题是我只是想连接公司给我连接数据的服务器,但是我无权更改此 Firebird 服务器中的有线加密,他们也不知道该怎么做。

Could someone give me the leads to show them what to do and make it works?有人可以给我线索,让他们知道该怎么做并让它发挥作用吗? Or if you have any suggestions on how to change on my JS any data to be able to connect.或者,如果您对如何更改我的 JS 上的任何数据以便能够连接有任何建议。

In firebird.conf try to add WireCrypt = Enabledfirebird.conf尝试添加WireCrypt = Enabled

How to disable the wirecrypt setting of Firebird is documented in the node-firebird documentation under "Firebird 3.0 Support" (though personally, I would recommend changing WireCrypt to Enabled instead of Disabled (the default is Required ), so clients that do support wire protocol encryption can still encrypt their connection.如何禁用 Firebird 的 wirecrypt 设置记录在“Firebird 3.0 支持”下的node-firebird 文档中(尽管就个人而言,我建议将WireCrypt更改为Enabled而不是Disabled (默认为Required ),以便支持有线协议的客户端encryption 仍然可以加密他们的连接。

In short:简而言之:

  1. Open firebird.conf打开 firebird.conf
  2. See if WireCrypt is already configured, and add or modify it to WireCrypt = Enabled (lines prefixed with # are comments)查看是否已经配置了WireCrypt ,添加或修改为WireCrypt = Enabled#前缀的行是注释)
  3. Restart Firebird重启火鸟

Be careful with applying the other settings as suggested in the node-firebird documentation, as that might cause problems for other applications connecting to the Firebird server.按照 node-firebird 文档中的建议应用其他设置时要小心,因为这可能会导致连接到 Firebird 服务器的其他应用程序出现问题。 For example, instead of the suggested UserManager = Legacy_UserManager , use UserManager = Srp, Legacy_UserManager .例如,不要使用建议的UserManager = Legacy_UserManager ,而是使用UserManager = Srp, Legacy_UserManager

Alternatively, switch to another Node.js library for Firebird.或者,切换到 Firebird 的另一个 Node.js 库。 The ones using fbclient/libfbclient will support encryption if you're using a Firebird 3.0 or higher client library.如果您使用的是 Firebird 3.0 或更高版本的客户端库,则使用 fbclient/libfbclient 的将支持加密。 For example, node-firebird-driver-native .例如, node-firebird-driver-native Given the documentation of the library is lacking, maybe you'll findthis gist helpful.鉴于缺少库的文档,也许你会发现这个要点很有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM