在项目之间传递管理员密码 [英] Passing an administrator password between projects

查看:74
本文介绍了在项目之间传递管理员密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的解决方案目前构建为WinForms EXE作为主要项目,包含3个支持它的DLL(类,自定义控件和对话框)。我需要做的是安全地将管理员密码传递给对话框DLL中的各种对话框到
确保某些功能仅在适当的授权下发生。有没有一种简单的安全方法可以将加密的管理员密码手动传递给需要它的每个对话框?

My solution is currently structured as a WinForms EXE as the main project with 3 DLLs (classes, custom controls, and dialogs) which support it. What I need to do is securely pass around an administrator password to various dialogs in the dialog DLL to make sure that certain functions only happen with appropriate authorization. Is there a simple secure way to do this short of manually passing the encrypted administrator password to each dialog that needs it?

推荐答案

大多数会使用某种方式角色基础安全性基于用户及其用户ID 和psw登录到应用程序并使用其分配的角色。

Most would use some kind of role base security based on the user with their user-id  and psw logging into the application and using their assigned role.

https://www.red-gate.com/simple-talk/dotnet/windows-forms/controls-based-security -in-a-windows-forms-application /

https://www.red-gate.com/simple-talk/dotnet/windows-forms/controls-based-security-in-a-windows-forms-application/


这篇关于在项目之间传递管理员密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆