安全模型 [英] Security Model

查看:46
本文介绍了安全模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,


我正在寻找一些反馈,指导,意见,评论,建议或

只是关于以下内容的一般想法:


对于我们的内部开发,我正在尝试创建一个非常灵活的通用,可重用的
安全框架。它必须处理

身份验证和授权。每个''对象''允许的访问级别'

将是:查看/编辑/读/写。


基本上,首先想到的是想要在Windows NTFS中使用ACL的工作方式来模拟它。通过这种方式,我可以灵活地为每个按钮,表单或任何其他

对象/任何可用对象分组分配

查看/编辑/读/写权限给出了应用程序。


不幸的是,我所知道的ACL的工作方式就是我所看到的结束

用户。我假设每个''对象''都有某种形式的唯一标识符

(guid?)。然后系统中的每个用户都链接到一个guid以及

访问级别(读,写等)。此信息存储在database / xml

文件/中。这是一种有效的方法吗?


***然后问题变成:我如何以高效的方式做到这一点?优雅

方式?我不想在每个

按钮,表单或对象访​​问周围放置一个IF语句!


你们怎么做?有没有资源,其他人过去曾做过/尝过这样的事情吗?


提前谢谢!

-ZD

Good Morning,

I was looking for some feedback, guidance, input, comments, suggestions or
just general thoughts on the following:

For our internal development, I''m trying to create a general, reusable
security framework that is very flexible. It would have to handle both
Authentication and Authorization. The access levels allowed on each ''object''
would be: View/Edit/Read/Write.

Essentially, the first thought that came to mind was to model it after the
way ACL''s work in Windows NTFS. This way, I have the flexibility to assign
View/Edit/Read/Write permissions to each button, form, or any other
object/grouping of objects available in any given application.

Unfortunately, all I know about the way ACL''s work is what I see as an end
user. I''m assuming each ''object'' gets some form of a unique identifier
(guid?). Each user in the system is then linked to a guid along with an
access level (Read, write, etc). This info is stored in a database/xml
file/wherever. Is this a valid approach?

***The question then becomes: How do I do this in an efficient & elegant
manner? I dont want to have to put an IF statement around each and every
button, form or object access!

How do you guys do it? Are there any resources, other people that have
done/attempted something like this in the past?

thanks in advance!
-ZD

推荐答案

ZD,


一般来说,我不是关注用户界面元素的访问。

如果你已经正确设计了你的应用程序,你可以让人们按他们想要的任何按钮点击

,因为这些按钮会调用你的

业务层,其代码与UI无关。是否有那个

你将开始你的安全检查。


现在,在这方面,你有很多选择。实际上可以创建自己的ACL(并利用windows提供的b / b
的基础设施)。有一篇很好的文章展示了如何在MSDN上执行此操作(在

非托管代码中可以转换为托管代码),标题为

"保护私有对象的技术应用程序,位于

(注意换行):

http://msdn.microsoft.com/security/d...ateObjects.asp


希望这会有所帮助。

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


" Z D < NO **** @ NOSPAM.com>在消息中写道

news:ev ************** @ TK2MSFTNGP09.phx.gbl ...
Z D,

Generally, I''m not too concerned about user interface element access.
If you have designed your app correctly, you can have people hitting
whatever button they want, because those buttons will call into your
business layer, which has code that is not tied to the UI. Is is there that
you will begin your security checks.

Now, in this area, you have a number of options. It''s actually possible
to create your own ACL (and take advantage of the infrastructure that
windows provides). There is a good article showing how to do this (in
unmanaged code which can be converted to managed code) on MSDN titled
"Techniques for Securing Private Objects in Your Applications", located at
(watch for line wrap):

http://msdn.microsoft.com/security/d...ateObjects.asp

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Z D" <NO****@NOSPAM.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
早安,

我正在寻找一些反馈,指导,意见,评论,建议或对以下内容的一般想法:

对于我们的内部开发,我正在尝试创建一个非常灵活的通用,可重用的安全框架。它必须处理
身份验证和授权。每个
''对象'允许的访问级别为:查看/编辑/读/写。

基本上,我想到的第一个想法就是在<方式ACL在Windows NTFS中的工作方式。通过这种方式,我可以灵活地
为每个按钮,表单或任何其他对象/任何给定应用程序中可用的对象分组分配查看/编辑/读/写权限。
<不幸的是,我所知道的ACL的工作方式就是我所看到的结束用户。我假设每个''对象''都有某种形式的唯一标识符
(guid?)。然后,系统中的每个用户都会链接到一个guid以及一个访问级别(读取,写入等)。此信息存储在database / xml
文件/中。这是一种有效的方法吗?

***问题就变成了:我如何以高效率的方式做到这一点?优雅的方式?我不想在每个
按钮,表单或对象访​​问周围放置IF语句!

你们怎么做?有没有资源,其他人过去曾做过这样的事情?

提前谢谢!
-ZD

Good Morning,

I was looking for some feedback, guidance, input, comments, suggestions or
just general thoughts on the following:

For our internal development, I''m trying to create a general, reusable
security framework that is very flexible. It would have to handle both
Authentication and Authorization. The access levels allowed on each ''object'' would be: View/Edit/Read/Write.

Essentially, the first thought that came to mind was to model it after the
way ACL''s work in Windows NTFS. This way, I have the flexibility to assign View/Edit/Read/Write permissions to each button, form, or any other
object/grouping of objects available in any given application.

Unfortunately, all I know about the way ACL''s work is what I see as an end
user. I''m assuming each ''object'' gets some form of a unique identifier
(guid?). Each user in the system is then linked to a guid along with an
access level (Read, write, etc). This info is stored in a database/xml
file/wherever. Is this a valid approach?

***The question then becomes: How do I do this in an efficient & elegant
manner? I dont want to have to put an IF statement around each and every
button, form or object access!

How do you guys do it? Are there any resources, other people that have
done/attempted something like this in the past?

thanks in advance!
-ZD



ZD,


一般来说,我不太关心用户界面元素访问。

如果你已经正确设计了你的应用程序,你可以让人们点击他们想要的任何按钮,因为这些按钮会调用你的

业务层,具有与UI无关的代码。是否有那个

你将开始你的安全检查。


现在,在这方面,你有很多选择。实际上可以创建自己的ACL(并利用windows提供的b / b
的基础设施)。有一篇很好的文章展示了如何在MSDN上执行此操作(在

非托管代码中可以转换为托管代码),标题为

"保护私有对象的技术应用程序,位于

(注意换行):

http://msdn.microsoft.com/security/d...ateObjects.asp


希望这会有所帮助。

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


" Z D < NO **** @ NOSPAM.com>在消息中写道

news:ev ************** @ TK2MSFTNGP09.phx.gbl ...
Z D,

Generally, I''m not too concerned about user interface element access.
If you have designed your app correctly, you can have people hitting
whatever button they want, because those buttons will call into your
business layer, which has code that is not tied to the UI. Is is there that
you will begin your security checks.

Now, in this area, you have a number of options. It''s actually possible
to create your own ACL (and take advantage of the infrastructure that
windows provides). There is a good article showing how to do this (in
unmanaged code which can be converted to managed code) on MSDN titled
"Techniques for Securing Private Objects in Your Applications", located at
(watch for line wrap):

http://msdn.microsoft.com/security/d...ateObjects.asp

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Z D" <NO****@NOSPAM.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
早安,

我正在寻找一些反馈,指导,意见,评论,建议或对以下内容的一般想法:

对于我们的内部开发,我正在尝试创建一个非常灵活的通用,可重用的安全框架。它必须处理
身份验证和授权。每个
''对象'允许的访问级别为:查看/编辑/读/写。

基本上,我想到的第一个想法就是在<方式ACL在Windows NTFS中的工作方式。通过这种方式,我可以灵活地
为每个按钮,表单或任何其他对象/任何给定应用程序中可用的对象分组分配查看/编辑/读/写权限。
<不幸的是,我所知道的ACL的工作方式就是我所看到的结束用户。我假设每个''对象''都有某种形式的唯一标识符
(guid?)。然后,系统中的每个用户都会链接到一个guid以及一个访问级别(读取,写入等)。此信息存储在database / xml
文件/中。这是一种有效的方法吗?

***问题就变成了:我如何以高效率的方式做到这一点?优雅的方式?我不想在每个
按钮,表单或对象访​​问周围放置IF语句!

你们怎么做?有没有资源,其他人过去曾做过这样的事情?

提前谢谢!
-ZD

Good Morning,

I was looking for some feedback, guidance, input, comments, suggestions or
just general thoughts on the following:

For our internal development, I''m trying to create a general, reusable
security framework that is very flexible. It would have to handle both
Authentication and Authorization. The access levels allowed on each ''object'' would be: View/Edit/Read/Write.

Essentially, the first thought that came to mind was to model it after the
way ACL''s work in Windows NTFS. This way, I have the flexibility to assign View/Edit/Read/Write permissions to each button, form, or any other
object/grouping of objects available in any given application.

Unfortunately, all I know about the way ACL''s work is what I see as an end
user. I''m assuming each ''object'' gets some form of a unique identifier
(guid?). Each user in the system is then linked to a guid along with an
access level (Read, write, etc). This info is stored in a database/xml
file/wherever. Is this a valid approach?

***The question then becomes: How do I do this in an efficient & elegant
manner? I dont want to have to put an IF statement around each and every
button, form or object access!

How do you guys do it? Are there any resources, other people that have
done/attempted something like this in the past?

thanks in advance!
-ZD



ZD

为什么不在模型中包含删除? IMO,写的更像是

更新。你也考虑添加角色吗?确认或授权怎么样?


你犯了一个大错误在规划你的框架时 - 你从

技术问题开始,比如ACL,NTFS和可用的低级功能。

业务需求通常忽略技术问题而且更通用

和模糊比简单的文件/对象权限。


灵活的安全框架应该以灵活的许可方式为目标

定义和有效的声明实现运行时检查。

我建议第一步看看

..Net中的Attributes名称空间以及Permission类和方法。这不是很有用,

但是起点不错


HTH

Alex

Z D < NO **** @ NOSPAM.com>在消息中写道

news:ev ************** @ TK2MSFTNGP09.phx.gbl ...
Hi, Z D

Why you do not include Delete into your model? IMO, write is more like
Update. Do you consider Add role too? What about Confirm or Authorize?

You make one big "mistake" in planning your framework - you start from
technical issues, like ACLs, NTFS and available low-level functionality.
Business requirements usually ignore technical issues and are more general
and fuzzy than simple file/objects permissions.

Flexible security framework should target flexible way of permission
definition and efficient implementation of declaration and run-time checks.
I would suggest as first step to take a look at Attributes namespaces in
..Net and also Permission classes and methods. It''s not really useful,
however good starting point

HTH
Alex
"Z D" <NO****@NOSPAM.com> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
早安,

我正在寻找一些反馈,指导,意见,评论,建议或对以下内容的一般想法:

对于我们的内部开发,我正在尝试创建一个非常灵活的通用,可重用的安全框架。它必须处理
身份验证和授权。每个
''对象'允许的访问级别为:查看/编辑/读/写。

基本上,我想到的第一个想法就是在<方式ACL在Windows NTFS中的工作方式。通过这种方式,我可以灵活地
为每个按钮,表单或任何其他对象/任何给定应用程序中可用的对象分组分配查看/编辑/读/写权限。
<不幸的是,我所知道的ACL的工作方式就是我所看到的结束用户。我假设每个''对象''都有某种形式的唯一标识符
(guid?)。然后,系统中的每个用户都会链接到一个guid以及一个访问级别(读取,写入等)。此信息存储在database / xml
文件/中。这是一种有效的方法吗?

***问题就变成了:我如何以高效率的方式做到这一点?优雅的方式?我不想在每个
按钮,表单或对象访​​问周围放置IF语句!

你们怎么做?有没有资源,其他人过去曾做过这样的事情?

提前谢谢!
-ZD

Good Morning,

I was looking for some feedback, guidance, input, comments, suggestions or
just general thoughts on the following:

For our internal development, I''m trying to create a general, reusable
security framework that is very flexible. It would have to handle both
Authentication and Authorization. The access levels allowed on each ''object'' would be: View/Edit/Read/Write.

Essentially, the first thought that came to mind was to model it after the
way ACL''s work in Windows NTFS. This way, I have the flexibility to assign View/Edit/Read/Write permissions to each button, form, or any other
object/grouping of objects available in any given application.

Unfortunately, all I know about the way ACL''s work is what I see as an end
user. I''m assuming each ''object'' gets some form of a unique identifier
(guid?). Each user in the system is then linked to a guid along with an
access level (Read, write, etc). This info is stored in a database/xml
file/wherever. Is this a valid approach?

***The question then becomes: How do I do this in an efficient & elegant
manner? I dont want to have to put an IF statement around each and every
button, form or object access!

How do you guys do it? Are there any resources, other people that have
done/attempted something like this in the past?

thanks in advance!
-ZD



这篇关于安全模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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