安全性 - 权限配置 [英] Security - Permissions Configuration

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

问题描述

有没有办法根据用户角色设置权限,为我的应用程序使用一些

配置文件?


我来自一个Java背景,可以很容易地完成,但是虽然我已经搜索过MSDN,但我找不到一个明确的

答案...


非常感谢你们,


天使

O:]

Is there a way to set Permissions based on user roles by using some
configuration file for my application ?

I''m coming from a Java background, where that could very easily be
accomplished but although I''ve searched around MSDN I can''t find a clear
answer to this ...

Thanks a lot guys,

Angel
O:]

推荐答案

Asp.net安全性基于iis。


在IIS中,您可以定义用户,组等,然后在您的web.config文件中

你可以启用windows security或手动启用/禁用

某些群组的访问权限。


如果您希望整个asp.net应用程序在另一个帐户下运行而不是

标准的asp.net wp你可以使用模拟。


在msdn上尝试一些搜索,他们有关于所有这些主题的优秀文章


你的

Henrik


" Angelos Karantzalis"写道:
Asp.net security is based on iis.

In IIS you can define users, groups etc, and then in your web.config file
you can enable "windows security" or manually enable/disable access for
certain groups.

if you want the entire asp.net app to run under another account than the
standard asp.net wp you can use impersonation.

Try some searches on msdn, they have excellent articles on all these subjects

yours
Henrik

"Angelos Karantzalis" wrote:
有没有办法通过为我的应用程序使用一些
配置文件来设置基于用户角色的权限?

我是来自Java背景,可以很容易地完成,但是虽然我在MSDN上搜索过,但我找不到明确的答案...

天使
O:]
Is there a way to set Permissions based on user roles by using some
configuration file for my application ?

I''m coming from a Java background, where that could very easily be
accomplished but although I''ve searched around MSDN I can''t find a clear
answer to this ...

Thanks a lot guys,

Angel
O:]



我想要什么得到具有CodeAccess权限,基于我的用户
的角色。不仅在ASP.NET上,而且肯定是使用自定义的

IPrincipal实现。我不想仅仅根据当前用户限制对某些

url模式的访问:(


非常感谢,

Angel

O:]

" Henrik Nordgren"< He ************ @ discussion.microsoft.com>写道在

消息新闻:CD ********************************** @ microsof t .com ...
What I want to get at is having CodeAccess permissions, based on the role of
my user. Not only on ASP.NET though, and definitely by using custom
IPrincipal implementations. I don''t want just to restrict accesss to some
url pattern based on the current user :(

Thanks though,
Angel
O:]
"Henrik Nordgren" <He************@discussions.microsoft.com> wrote in
message news:CD**********************************@microsof t.com...
Asp.net安全性基于iis。

在IIS中,您可以定义用户,组等,然后在您的web.config文件中
如果您希望整个asp.net应用程序在另一个帐户下运行而不是
标准的asp.net wp你可以使用模拟。

在msdn上尝试一些搜索,他们有关于所有这些
主题的优秀文章
你的
Henrik

Angelos Karantzalis写道:
Asp.net security is based on iis.

In IIS you can define users, groups etc, and then in your web.config file
you can enable "windows security" or manually enable/disable access for
certain groups.

if you want the entire asp.net app to run under another account than the
standard asp.net wp you can use impersonation.

Try some searches on msdn, they have excellent articles on all these subjects
yours
Henrik

"Angelos Karantzalis" wrote:
有没有办法根据使用情况设置权限通过为我的应用程序使用一些
配置文件来设置角色?

我来自Java背景,可以很容易地完成它但是我已经在MSDN周围搜索我找不到一个明确的答案......

非常感谢你们,

天使
O:]
Is there a way to set Permissions based on user roles by using some
configuration file for my application ?

I''m coming from a Java background, where that could very easily be
accomplished but although I''ve searched around MSDN I can''t find a clear
answer to this ...

Thanks a lot guys,

Angel
O:]



" Angelos Karantzalis" < AK ********** @ agiltech.gr>写道:
"Angelos Karantzalis" <ak**********@agiltech.gr> wrote:
我想得到的是具有CodeAccess权限,基于我的用户的角色。不仅在ASP.NET上,而且肯定是使用自定义的IPrincipal实现。我不想仅限制根据当前用户访问某些
网址模式:(

非常感谢,
天使
O:]
What I want to get at is having CodeAccess permissions, based on the role of
my user. Not only on ASP.NET though, and definitely by using custom
IPrincipal implementations. I don''t want just to restrict accesss to some
url pattern based on the current user :(

Thanks though,
Angel
O:]




代码访问安全性(CAS)和基于角色的安全性(RBS)

完全独立的概念。


CAS关注代码的身份和来源

并进一步限制Windows

用户/帐户可能已拥有的任何权限。


RBS关注的是您的应用程序的用户 - 它可能与Windows用户和他/她的会员资格一致

Windows Groups(即角色),但RBS也可以是独立的Windows安全总计
,以你的软件为中心。


设计应用程序管理授权
http:/ /msdn.microsoft.com/library/de...html/DAMAZ.asp


.NET Framework开发人员指南基于角色的介绍

安全
http://msdn.microsoft.com/library/de .. .edsecurity.asp


..NET Framework开发人员指南校长和身份

对象
http:// msdn。 microsoft.com/library/de...ityobjects.asp

要(重新)使用Windows用户和组,请使用WindowsIdentity和

WindowsPrincipal 。


.NET Framework开发人员指南创建WindowsIdentity和

WindowsPrincipal对象
http://msdn.microsoft.com/library/de...palObjects.asp

.NET Framework类库WindowsIdentity类
http://msdn.microsoft.com/library/de...classtopic.asp

..NET Framework类库WindowsPrincipal类
http://msdn.microsoft。 com / library / de ... ClassTopic.asp


实现自己的基本 RBS使用GenericIdentity和

GenericPrincipal。


..NET Framework开发人员指南创建GenericPrincipal

和GenericIdentity对象
http://msdn.microsoft.com/library/de...palObjects.asp

..NET Framework类库GenericIdentity类
http://msdn.microsoft .com / library / de ... ClassTopic.asp

..NET Framework类库GenericPrincipal类
http://msdn.microsoft.com/librar y / de ... ClassTopic.asp


如果您需要更复杂的RBS,例如你的角色暗示

a某些信任heirarchy,那么你需要实现一些

自定义类来实现IIdentity和IPrincipal

的表面。


..NET Framework类库IIdentity接口
http://msdn.microsoft.com/library/de...ClassTopic.asp

.NET Framework类库IPrincipal接口
http://msdn.microsoft.com/library/de...ClassTopic.asp

有关CAS的概述


..NET Framework开发人员的指南代码访问安全性
http://msdn.microsoft.com/library/de...sssecurity.asp



Code Access Security (CAS) and Role-Based Security (RBS) are
totally independent concepts.

CAS is concerned with the identity and origin of the code
and further restricts any permissions that the Windows
User/Account may already have.

RBS is concerned with the user of your application - it may
coincide with the Windows User and his/her membership in
Windows Groups (i.e. roles), but RBS can also be independent
of Windows Security total, centered on your software.

Designing Application-Managed Authorization
http://msdn.microsoft.com/library/de...html/DAMAZ.asp

NET Framework Developer''s Guide Introduction to Role-Based
Security
http://msdn.microsoft.com/library/de...edsecurity.asp

..NET Framework Developer''s Guide Principal and Identity
Objects
http://msdn.microsoft.com/library/de...ityobjects.asp

To (re)use Windows Users and Groups use WindowsIdentity and
WindowsPrincipal.

NET Framework Developer''s Guide Creating WindowsIdentity and
WindowsPrincipal Objects
http://msdn.microsoft.com/library/de...palObjects.asp
NET Framework Class Library WindowsIdentity Class
http://msdn.microsoft.com/library/de...classtopic.asp
..NET Framework Class Library WindowsPrincipal Class
http://msdn.microsoft.com/library/de...ClassTopic.asp

To implement your own "basic" RBS use GenericIdentity and
GenericPrincipal.

..NET Framework Developer''s Guide Creating GenericPrincipal
and GenericIdentity Objects
http://msdn.microsoft.com/library/de...palObjects.asp
..NET Framework Class Library GenericIdentity Class
http://msdn.microsoft.com/library/de...ClassTopic.asp
..NET Framework Class Library GenericPrincipal Class
http://msdn.microsoft.com/library/de...ClassTopic.asp

If you need a more sophisticated RBS, e.g. your roles imply
a certain trust heirarchy, then you need to implement some
custom classes implementing the IIdentity and IPrincipal
inferfaces.

..NET Framework Class Library IIdentity Interface
http://msdn.microsoft.com/library/de...ClassTopic.asp
NET Framework Class Library IPrincipal Interface
http://msdn.microsoft.com/library/de...ClassTopic.asp

For an overview of CAS

..NET Framework Developer''s Guide Code Access Security
http://msdn.microsoft.com/library/de...sssecurity.asp


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

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