如何防止其他管理员用户解密 web 配置
How to prevent other admin user to decrypt web config
我想将我的 windows 10 pro 桌面用作 LAN 中的 Web 服务器。我使用 IIS,并且已经成功部署了 Web 应用程序。现在,我想保护网络配置。所以我在 google 中搜索,发现我可以用 aspnet_regiis 加密它。我已经成功地使用 aspnet_regiis -pef "connectionStrings" "D:\TEST"
加密并使用 aspnet_regiis -pdf "connectionStrings" "D:\TEST"
解密
现在,我的问题是如果我的计算机有其他 windows 管理员级别的用户,he/she 也可以使用 aspnet_regiis -pdf "connectionStrings" "D:\TEST"
命令解密我的 Web 配置。如何防止 he/she 解密我的网络配置?
默认情况下,机器上的解密是使用 DPAPI 完成的,这意味着任何有权访问机器的人都可以 encrypt/decrypt。如果您只想允许管理员和 Web 应用程序可以执行解密,那么您需要使用 RSA 提供程序(而不是 DPAPI)。这将允许您在密钥容器中创建密钥,然后您可以将 DACL 分配给您想要访问该密钥的帐户的密钥容器。
ASP.NET web.config encryption security
https://inthetechpit.com/2019/05/21/encrypt-web-config-with-rsa-encryption/
我想将我的 windows 10 pro 桌面用作 LAN 中的 Web 服务器。我使用 IIS,并且已经成功部署了 Web 应用程序。现在,我想保护网络配置。所以我在 google 中搜索,发现我可以用 aspnet_regiis 加密它。我已经成功地使用 aspnet_regiis -pef "connectionStrings" "D:\TEST"
加密并使用 aspnet_regiis -pdf "connectionStrings" "D:\TEST"
现在,我的问题是如果我的计算机有其他 windows 管理员级别的用户,he/she 也可以使用 aspnet_regiis -pdf "connectionStrings" "D:\TEST"
命令解密我的 Web 配置。如何防止 he/she 解密我的网络配置?
默认情况下,机器上的解密是使用 DPAPI 完成的,这意味着任何有权访问机器的人都可以 encrypt/decrypt。如果您只想允许管理员和 Web 应用程序可以执行解密,那么您需要使用 RSA 提供程序(而不是 DPAPI)。这将允许您在密钥容器中创建密钥,然后您可以将 DACL 分配给您想要访问该密钥的帐户的密钥容器。
ASP.NET web.config encryption security
https://inthetechpit.com/2019/05/21/encrypt-web-config-with-rsa-encryption/