简体   繁体   English

作为本地系统运行的Windows服务应在哪里将私钥存储在文件系统中?

[英]Where should a Windows service, running as Local System, store a private key in the file system?

I need to generate and store a sensitive file (assume that it is not a traditional PKCS format) private key and keep it accessible to the running service. 我需要生成并存储一个敏感文件(假设它不是传统的PKCS格式)私钥,并使运行的服务可以访问它。

Normally, when running as a service account (AD User), I would store the file under the user's profile, and then let standard Windows security handle this. 通常,当以服务帐户(AD用户)身份运行时,我会将文件存储在用户的配置文件下,然后让标准Windows安全处理此问题。

Outside of the CryptoAPI, where in the file system should I store this private key? 在CryptoAPI之外,我应该将该私钥存储在文件系统中的什么位置?

Using DPAPI, you can either use current user credentials or either the LocalMachine 'creds'. 使用DPAPI,您既可以使用当前用户凭据,也可以使用LocalMachine“信条”。

LocalMachine will make all users on the computer able to Unprotect the data (still a solution though... if you trust every user on this computer). LocalMachine将使计算机上的所有用户都能够取消保护数据(不过,如果您信任此计算机上的每个用户,这仍然是解决方案)。

Or, you can use impersonation to get the current user & do your stuff. 或者,您可以使用模拟来获取当前用户并做您的工作。

暂无
暂无

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

相关问题 在作为本地系统运行的 windows 服务中进行键盘和鼠标操作? - Making keyboard and mouse operations in a windows service running as a local system? 将Windows服务作为“本地系统”运行有哪些安全风险? - What are the security risks in running a Windows Service as “Local System”? 以本地系统权限运行的 Windows 服务,想要从以本地用户权限运行的 Windows 服务创建子进程 - Windows Service running with Local System rights, wants to create child processes from windows service which will running with Local User rights 从服务运行msiexec(本地系统帐户) - Running msiexec from a service (Local System account) 如何获取以用户身份运行的Windows 7应用程序的MainWindowHandle <foo> 从作为本地系统运行的服务中? - How can I get the MainWindowHandle of a Windows 7 application running as user <foo> from within a service running as Local System? 在本地系统下运行的Windows服务能否在其运行的计算机上创建新文件? - Can a Windows service running under Local System create new files on the computer it is running on? 以本地系统运行的Windows服务无法以交互用户身份启动Com Server - Windows Service running as Local System unable to launch Com Server as Interactive User 为什么“本地系统”帐户缺少NTFS文件系统的权限(将java作为Windows服务运行) - Why does “Local System” account lack permissions to NTFS Filesystem (running java as windows service) 在本地系统帐户下的 C# windows 服务中打印 PDF 文件 - printing a PDF file in a C# windows service under Local system account 在Windows Service System中安装后,Windows Service无法写入文本文件 - Windows Service not writing text file after installation in Windows Service System
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM