简体   繁体   English

在Excel加载项中保护SQL身份验证数据的方法

[英]Ways to protect SQL authentication data in Excel Add-in

I have written an Excel addin which connects to a specific database and pulls data from it. 我已经编写了一个Excel插件,它可以连接到特定的数据库并从中提取数据。 Currently, SQL Server authentication data is hard-coded in the add-in. 当前,SQL Server身份验证数据已在加载项中进行了硬编码。 I am planning to distribute the add-in without removing the SQL Server connection functionality. 我计划在不删除SQL Server连接功能的情况下分发加载项。 Protection of the authentication data is an inevitable prerequisite. 认证数据的保护是必然的前提。 However, I am stuggling to find a suitable solution. 但是,我正在努力寻找合适的解决方案。

The authentication data for SQL Server is not unique. SQL Server的身份验证数据不是唯一的。 Setting up a unique login for each end user would be nearly impossible. 为每个最终用户设置唯一的登录名几乎是不可能的。

Are there any recommendations how to best achieve a good protection level for the SQL Server authentication data? 是否有任何建议如何最好地达到对SQL Server身份验证数据的良好保护级别?

This is a very common problem of how to protect connection strings. 这是如何保护连接字符串的非常普遍的问题。 Few years ago i have develop a C# application and i have used an app.config file that the connection strings to the db where encrypted. 几年前,我开发了一个C#应用程序,并使用了一个app.config文件,该文件将连接字符串加密到数据库中。

Save the connection string in an external encrypted file and while reading it decrypt it: 将连接字符串保存在外部加密文件中,并在读取时解密:

You can check here for more information: https://msdn.microsoft.com/en-us/library/ms254494(v=vs.110).aspx 您可以在此处查看更多信息: https : //msdn.microsoft.com/zh-cn/library/ms254494(v=vs.110).aspx

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

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