防止标准用户替换SQL Server中的数据库文件

发布于 2025-02-08 05:50:41 字数 474 浏览 1 评论 0原文

我正在尝试设计一台气动服务器,该服务器将由用户托管和管理。我将在该服务器上运行SQL Server 2019,该服务器将访问重要的托管数据库。

如何阻止用户在文件系统级别上修改或替换数据库?请注意,用户将是标准用户,并且 not 具有管理员特权。

我知道我可以使用角色和密码来控制数据库访问,因此我更担心文件系统访问数据库文件。

架构

  • A .NET应用程序运行具有标准特权,用户可以使用该应用程序从数据库中查看一些数据(有限的读取访问)。
  • WCF Web服务运行,具有可以读 /写入数据库的管理特权,但用户无法访问此信息。

理想的方案

  • 所有对数据库的访问都必须通过SQL Server。
  • 用户将无法通过文件系统直接访问数据库。
  • 用户只能通过.NET应用程序选择性地查看一些数据。

I'm trying to design an air-gapped server, which will be hosted and managed by the user. I will have SQL Server 2019 running on that server, which will access an important hosted database.

How do I prevent the user from modifying or replacing the database on the filesystem level? Note that the user will be a standard user and will not have Administrator privileges.

I know that I can control database access using roles and passwords, so I'm more worried about the filesystem access to the database files.

Architecture

  • A .NET application running with standard privileges which the user can use to view some data from the database (limited read access).
  • A WCF webservice running with administrative privileges that can read / write to the database but the user will have no access to this.

Ideal scenario

  • All access to the database must go through SQL Server.
  • The user will have no direct access to the database through the filesystem.
  • The user should only be able to selectively view some data through the .NET application.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

话少情深 2025-02-15 05:50:41

您无能为力可以防止系统上拥有管理员权利的用户做任何他们想要的。

理想情况下,您将为他们提供一个没有管理员权利的黑匣子系统,但是他们无法正确管理它,因为Sysadmin Work始终需要管理权。

因此,包含数据库文件的文件和文件夹将由SQL Server Service帐户访问。所有其他用户都不应拥有任何权利。这应防止标准用户无实际访问框的物理访问获得访问权限。

如果他们是有限的用户,则可以轻松地锁定文件系统,但是具有物理访问的确定用户仍然可以闯入。最终,您要么在云上提供此内容(自己主持),要么写一份好的合同。 根本没有其他方法。

There is nothing you can do to prevent a user who has admin rights on the system from doing whatever they want.

Ideally you would give them a black box system which they have no admin rights on, but then they cannot manage it properly, as sysadmin work always needs admin rights.

So the files and folders containing the database files would be owned and only have access by the SQL Server service account. All other users should have no rights on it. This should prevent a standard user without physical access to the box from gaining access.

If they are a limited user you can lock down the file system like this easily, but a determined user with physical access can still hack through. Ultimately, either you provide this over the cloud (host it yourself) or write a good contract. There is simply no other way.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文