什么是“声明式安全"?一般来说 [英] What is "declarative security"? In general

查看:25
本文介绍了什么是“声明式安全"?一般来说的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题的答案:声明式安全——这是什么?并没有真正告诉我太多......没有告诉我任何直言不讳的事情.

The answer to this question: Declarative Security--what's this? Doesn't really tell me much... doesn't tell me anything at all to be blunt.

我看到了一篇关于 .NET 性能的博客,它提到了这一点:

I came across a blog about performance in .NET and it mentioned this:

您使用声明式安全吗?

在可能的情况下,建议您使用声明式安全而不是命令式安全检查.当前的需求实现提供了更好的性能和支持,这些安全工具目前正在构建以帮助安全审计.

请注意,如果您的安全检查在方法中是有条件的,那么命令式安全是您唯一的选择.

链接:http://weblogs.asp.net/sanjeevagarwal/archive/2009/09/09/net-code-performance-tips-part-1.aspx

声明式安全"是什么意思?谁能举个具体的例子?

What does "declarative security" stand for? Can someone give a concrete example?

推荐答案

总的来说,它是基于注释而不是编码的安全性.例如,在 .NET 中,您可以将一个属性应用于一个方法,该方法导致生成的代码要求调用者具有某些权限.

In general, it's security based on annotating instead of coding. For example, in .NET you can apply an attribute to a method that causes the generated code to require the caller to have certain rights.

这是一个具体的例子:http://www.knowdotnet.com/articles/securityattributes.html

这篇关于什么是“声明式安全"?一般来说的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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