从NodeJS应用程序的AlwaysEncrypted列中显示数据? [英] Display data from an AlwaysEncrypted column in a NodeJS app?

查看:72
本文介绍了从NodeJS应用程序的AlwaysEncrypted列中显示数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Azure中有一个 SQL Server数据库,可以通过 .NET应用 NodeJS应用访问.我只是将 AlwaysEncrypted 应用于包含敏感信息的表列.我使用了 Azure Key Vault 存储加密密钥.

I have a SQL Server database in Azure that is accessed by a .NET app and by a NodeJS app. I just applied AlwaysEncrypted to a table column that contains sensitive information. I used Azure Key Vault to store the encryption key.

我想知道是否可以在我的NodeJS应用中显示(解密的)数据?

I was wondering if it is possible to display the (decrypted) data in my NodeJS app?

一种解决方法是通过.NET应用程序中的API端点公开要查询的数据,然后从NodeJS应用程序中调用该端点,但是我正在寻找更优雅的的方式.

A workaround to this would be to expose the data that I want to query through an API endpoint in my .NET app, and then call that endpoint from my NodeJS app, but I'm looking for a more elegant way of doing it.

推荐答案

根据我的理解,我认为您所说的更优雅的方法是直接使用JavaScript解密应用了Always Always Encrypted的列的数据.

Based on my understanding, I think the more elegant way you said is that directly using JavaScript to decrypte data for column applied Always Encrypted.

我找不到直接执行此操作的任何代码.但是,我认为您可以尝试两种方法.

I can't find any code for doing it directly. However, I think there are two ways which you can try.

  1. 根据官方文档 使用JDBC驱动程序始终加密 ,您可以尝试使用节点包 node-java 桥接使用Java查询加密列数据的API.请在下面列出内容.

Always Encrypted仅受 Microsoft JDBC Driver 6.0(预览版)或更高版本的SQL Server SQL Server 2016(预览版)支持.

Always Encrypted is supported only by Microsoft JDBC Driver 6.0 (Preview) or higher for SQL Server with SQL Server 2016 (Preview).

  1. 有一个文档 始终加密密码学 描述了用于导出SQL Server和Azure SQL数据库的始终加密"功能中使用的加密材料的加密算法和机制.似乎您可以尝试使用某些节点程序包(例如 bcrypt

希望有帮助.

这篇关于从NodeJS应用程序的AlwaysEncrypted列中显示数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆