This section assumes you have some knowledge of the underlying architecture for access-control within Spring Security. If you don’t you can skip it and come back to it later, as this section is only really relevant for people who need to do some customization in order to use more than simple role-based security.

本节假定您已了解Spring Security中访问控制的基础体系结构。如果不这样做,您可以跳过它并稍后再回过头来看,因为本节仅对需要进行一些自定义以便使用简单基于角色的安全性的人员非常重要。
 
When you use a namespace configuration, a default instance of AccessDecisionManager is automatically registered for you and will be used for making access decisions for method invocations and web URL access, based on the access attributes you specify in your intercept-url and protect-pointcut declarations (and in annotations if you are using annotation secured methods).
当您使用命名空间配置时,将自动为您注册AccessDecisionManager的默认实例,并将根据您在intercept-url和protect-pointcut声明中指定的访问属性,为方法调用和Web URL访问做出访问决策。 (如果使用注释安全方法,则在注释中)。
 
The default strategy is to use an AffirmativeBased AccessDecisionManager with a RoleVoter and an AuthenticatedVoter. You can find out more about these in the chapter on authorization.
默认策略是使用具有RoleVoter和AuthenticatedVoter的AffirmativeBased AccessDecisionManager。您可以在授权章节中找到有关这些内容的更多信息。

6.5.1 Customizing the AccessDecisionManager(定制)

If you need to use a more complicated access control strategy then it is easy to set an alternative for both method and web security.

如果您需要使用更复杂的访问控制策略,那么很容易为方法和Web安全设置替代方案。
 
For method security, you do this by setting the access-decision-manager-ref attribute on global-method-security to the id of the appropriate AccessDecisionManager bean in the application context:
对于方法安全性,可以通过将global-method-security上的access-decision-manager-ref属性设置为应用程序上下文中相应AccessDecisionManager bean的id来执行此操作:
 
<global-method-security access-decision-manager-ref="myAccessDecisionManagerBean">
...
</global-method-security>

The syntax for web security is the same, but on the http element:

Web安全性的语法是相同的,但在http元素上:
 
<http access-decision-manager-ref="myAccessDecisionManagerBean">
...
</http>

  

Spring Security(二十三):6.5 The Default AccessDecisionManager(默认接入策略管理)的更多相关文章

  1. Spring Security(十三):5.2 HttpSecurity

    Thus far our WebSecurityConfig only contains information about how to authenticate our users. How do ...

  2. Spring Security(二) —— Guides

    摘要: 原创出处 https://www.cnkirito.moe/spring-security-2/ 「老徐」欢迎转载,保留摘要,谢谢! 2 Spring Security Guides 上一篇文 ...

  3. Spring(二十三):Spring自动注入的实现方式

    注解注入顾名思义就是通过注解来实现注入,Spring和注入相关的常见注解包含:Autowrired/Resource/Qualifier/Service/Controller/Repository/C ...

  4. Spring Boot JPA 使用 Sql Service 与 不使用默认驼峰策略

    引入 数据源 <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>s ...

  5. Spring Security(二十七):Part II. Architecture and Implementation

    Once you are familiar with setting up and running some namespace-configuration based applications, y ...

  6. Spring Security:Authorization 授权(二)

    Authorization 授权 在更简单的应用程序中,身份验证可能就足够了:用户进行身份验证后,便可以访问应用程序的每个部分. 但是大多数应用程序都有权限(或角色)的概念.想象一下:有权访问你的面向 ...

  7. 【Spring】关于Boot应用中集成Spring Security你必须了解的那些事

    Spring Security Spring Security是Spring社区的一个顶级项目,也是Spring Boot官方推荐使用的Security框架.除了常规的Authentication和A ...

  8. Spring Boot中集成Spring Security 专题

    check to see if spring security is applied that the appropriate resources are permitted: @Configurat ...

  9. Spring Security(三) —— 核心配置解读

    摘要: 原创出处 https://www.cnkirito.moe/spring-security-3/ 「老徐」欢迎转载,保留摘要,谢谢! 3 核心配置解读 上一篇文章<Spring Secu ...

随机推荐

  1. 洛谷P4063 [JXOI2017]数列(dp)

    题意 题目链接 Sol 这题想还是不难想的,就是写起来很麻烦,然后去看了一下loj的最短代码表示只能Orz 首先不难发现一条性质:能够选择的区间一定是不断收缩的,而且新的可选区间一定是旧区间的某个位置 ...

  2. IBM沃森会成为第一个被抛弃的AI技术吗?

    作者|William Vorhies 译者|姚佳灵 编辑|Debra 导读:IBM 的沃森问答机(Question Answering Machine,简称 QAM),因 2011 年参加综艺节目&l ...

  3. Android gradle实现多渠道号打包

    在build.gradle中添加 productFlavors{ LETV { applicationId "×××××××××××" //包名   buildConfigFiel ...

  4. Android 逆向实战篇(加密数据包破解)

    1. 实战背景由于工作需要,要爬取某款App的数据,App的具体名称此处不便透露,避免他们发现并修改加密逻辑我就得重新破解了. 爬取这款App时发现,抓包抓到的数据是加密过的,如图1所示(原数据较长, ...

  5. [20180928]如何能在11g下执行.txt

    [20180928]如何能在11g下执行.txt --//链接问的问题: http://www.itpub.net/thread-2105467-1-1.html create table test( ...

  6. [20170607]再论Private Strand Flush Not Complete.txt

    [20170607]再论Private Strand Flush Not Complete.txt --//曾经跟zergduan有过讨论,链接www.itpub.net/thread-2065703 ...

  7. 洗礼灵魂,修炼python(82)--全栈项目实战篇(10)—— 信用卡+商城项目(模拟京东淘宝)

    本次项目相当于对python基础做总结,常用语法,数组类型,函数,文本操作等等 本项目在博客园里其他开发者也做过,我是稍作修改来的,大体没变的 项目需求: 信用卡+商城: A.信用卡(类似白条/花呗) ...

  8. shell的case用法

    今天给大家简单介绍一下结构条件语句的用法,实际上就是规范的多分支if语句,如下: case语法: case "字符串变量" in 值1)指令1... ;; 值2)指令2... ;; ...

  9. 安全之路 —— 使用Windows全局钩子打造键盘记录器

    简介 键盘记录功能一直是木马等恶意软件窥探用户隐私的标配,那么这个功能是怎么实现的呢?在Ring3级下,微软就为我们内置了一个Hook窗口消息的API,也就是SetWindowsHookEx函数,这个 ...

  10. PAT乙级题:1003我要通过!

    #include <iostream> #include <string> #include <vector> #include <algorithm> ...