无需管理员帐户即可保护 ELMAH
我想在面向互联网的应用程序中保护 ELMAH 的安全。系统使用表单身份验证,但当前没有任何非用户帐户(例如管理员)。用户帐户以自动方式设置。
我真的不想将任何管理员帐户硬塞到系统中(用户当前的数据库模式非常不适合存储管理员用户),所以我正在考虑通过检查 SSL 客户端证书来破坏表单身份验证。如果我在 IIS 中选择所有正确的选项,我相信我可以确保只有我们的内部 CA 颁发的证书(当前用于需要 SSL 证书的非生产站点)才会传递到 ASP.Net。
然后,我可以使用 Valid ClientCertificate 的存在(检查 Request.ClientCertificate 的 IsPresent 和 IsValid 属性)来了解这是来自内部用户的连接,并将表单身份验证 cookie 设置为“诊断”或“管理”(或任何其他特殊用户名),然后使用建议通过表单身份验证执行此操作的任何常用方法来保护 elmah.axd。
所以我的问题是——我是否让事情变得过于复杂、遗漏了一些明显的东西、打开了一个巨大的安全漏洞等等?
I'm wanting to secure ELMAH in an internet facing application. The system uses Forms Authentication, but doesn't currently have any non-user accounts (e.g. Admins). The user accounts are set up in an automated fashion.
I don't really want to shoehorn any admin accounts into the system (the current DB schema for the users would be quite inappropriate for storing an admin user in), so I was thinking of corrupting the Forms authentication by checking for an SSL client certificate. If I pick all the right options in IIS, I believe I can ensure that only certificates issued by our internal CA (currently used for non-production sites needing SSL certs) will get passed through to ASP.Net.
I can then use the presence of a Valid ClientCertificate (checking IsPresent and IsValid properties of Request.ClientCertificate) to know that this is a connection from an internal user, and set the Forms Authentication cookie as "Diagnostic" or "Admin" (Or any other special username), and then secure elmah.axd using any of the usual methods suggested for doing it via Forms Authentication.
So my question is - am I overcomplicating things, missing something obvious, opening a massive security hole, etc?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不在 Web.Config 中存储管理员用户帐户凭据并使用表单身份验证锁定 URL?
编辑
好吧,如果应用程序完全是内部的,为什么不使用 Active Directory 保护站点的子目录(例如 myapplication.domain.com/exceptions/elmah.axd 甚至只是 myapplication.domain.com/elmah.axd)并设置通过IIS授权?
Why don't you just store an admin user account credentials within Web.Config and lock down the URL using Forms Authentication anyway?
Edit
Ok, if the application is entirely internal anyway, why not secure a subdirectory of your site (e.g. myapplication.domain.com/exceptions/elmah.axd or even just myapplication.domain.com/elmah.axd) using Active Directory and set authorisation through IIS?