当前位置: 首页 > news >正文

题库网站怎么做seo是什么seo怎么做

题库网站怎么做,seo是什么seo怎么做,安卓软件开发环境,可以做词云的网站前言:本系列博客基于Spring Boot 2.6.x依赖的Spring Security5.6.x版本 Spring Security中文文档:https://springdoc.cn/spring-security/index.html 一、什么是Spring Security Spring Security是一个安全控制相关的java框架,它提供了一套全…

前言:本系列博客基于Spring Boot 2.6.x依赖的Spring Security5.6.x版本

Spring Security中文文档:https://springdoc.cn/spring-security/index.html

一、什么是Spring Security

Spring Security是一个安全控制相关的java框架,它提供了一套全面的安全解决方案,包括身份验证、授权、防止攻击等功能。支持点击劫持,CSRF,XSS,MITM(中间人)等常见攻击手段的保护,并提供密码编码,LDAP认证,Session管理,Remember Me认证,JWT,OAuth 2.0等功能特性。Spring Security基于过滤器链的概念,可以轻松地集成到任何基于Spring的应用程序中。

二、Spring Security架构

在Spring Web应用中,基本上只有一个DispatcherServelt,主要用于请求分发,缺乏安全相关的支持和合适的扩展机制。而过滤器(Filter)是运行在Servlet之前的,一个Servlet运行前可能会经过多个Filter。所以在请求到达Servlet之前,先通过Filter进行安全验证就是一个非常合理的实现方式,而Spring Security的功能就是基于Filter来实现的。下图是Spring Security官方提供的架构图。
在这里插入图片描述
从架构图中可以看出,Spring Security功能实现主要由FilterChain、DelegatingFilterProxy、FilterChainProxy、SecurityFilterChain、Security Filter等组件组成。

1、FilterChain

FilterChain是过滤器链,客户端向应用程序发送一个请求时,容器会创建一个由Filter和Servlet组成的过滤器链FilterChain。
通过使用FilterChain,我们可以以插拔的方式添加或移除特定功能的Filter,而无需改动现有的代码,非常方便。

2、DelegatingFilterProxy

Spring Web包中提供了一个名为DelegatingFilterProxy的Filter实现。它的功能是在Servlet容器和Spring容器之间建立桥梁。
Servlet容器不知道Spring定义的Bean,而Spring Security的大部分组件及其依赖都是注册到Spring容器中的Bean。所以DelegatingFilterProxy的主要工作就是从WebApplicationContext获取指定名称的Filter Bean,然后将工作委托这个Bean的doFilter方法
通过这种方式,DelegatingFilterProxy实现了将Servlet容器中的Filter请求委托给Spring容器中的具体Filter Bean处理,从而实现了Servlet容器和Spring容器之间的无缝连接。

3、FilterChainProxy

FilterChainProxy是Spring Security提供的一个特殊的Filter。它的主要作用就是主要作用就是查找匹配当前http请求规则的SecurityFilterChain,然后将工作委派给SecurityFilterChain的所有Filter执行。它是在WebSecurityConfiguration里配置的

4、SecurityFilterChain

一个过滤器链,由一系列Security Filter以及匹配规则组成。当一个http请求符合该SecurityFilterChain的匹配规则,FilterChainProxy就会调用这个SecurityFilterChain里的所有Filter。有多个SecurityFilterChain时,FilterChainProxy只会使用第一个匹配成功的SecurityFilterChain。下图为一个SecurityFilterChain的组成。
在这里插入图片描述
SecurityContextPersistenceFilter:当请求需要认证的资源时,该Filter就是过滤器链的第一个过滤器,用来处理Spring Security的上下文信息,也就是SecurityContext,保证不同请求,但是sessionId相同,也就是同一用户的不同请求,拿到的上下文是相同的,也就是通过SecurityContextHolder.getContext()拿到的信息是同一个。

UsernamePasswordAuthenticationFilter:表单认证Filter,即表单方式登录,校验用户名密码处理。Spring Security默认提供的认证方式之一。
BasicAuthenticationFilter:Basic认证Filter,弹窗输入用户名密码,校验处理,Spring Security默认提供的认证方式之一。

ExceptionTranslationFilter:处理认证及授权过程中抛出的异常,然后返回给客户端。只处理AccessDeniedException和AuthenticationException这两种异常。不是这两种异常,ExceptionTranslationFilter不工作。

FilterSecurityInterceptor:SecurityFilterChain过滤器链的最后一个Filter,用来鉴权,判断用户是否有当前请求资源的权限,来决定是否放行请求。

5、Security Filter

Security Filter就是Spring Security实现具体功能的一些Filter,如CsrfFilter,UsernamePasswordAuthenticationFilter、AuthenticationFilter,AuthorizationFilter等Spring Security默认的Filter。
这些Filter可以用于许多不同的目的,如 认证、授权、漏洞保护 等等。filter 是按照特定的顺序执行的,以保证它们在正确的时间被调用。我们也可以自定义Filter加入的Spring Security执行过程中。可以在应用启动时,使用INFO级别的日志,在控制台查看Security Filter的列表。


文章转载自:
http://notabilia.xzLp.cn
http://quintillionth.xzLp.cn
http://roweite.xzLp.cn
http://conferree.xzLp.cn
http://heterodoxy.xzLp.cn
http://whelp.xzLp.cn
http://arteritis.xzLp.cn
http://lucille.xzLp.cn
http://mummification.xzLp.cn
http://tidytips.xzLp.cn
http://gunmen.xzLp.cn
http://increasable.xzLp.cn
http://ananym.xzLp.cn
http://jerkin.xzLp.cn
http://penitent.xzLp.cn
http://williams.xzLp.cn
http://trilobed.xzLp.cn
http://sichuan.xzLp.cn
http://despumate.xzLp.cn
http://extramarginal.xzLp.cn
http://dieter.xzLp.cn
http://buzzard.xzLp.cn
http://dyschronous.xzLp.cn
http://metaphor.xzLp.cn
http://cinquain.xzLp.cn
http://bonism.xzLp.cn
http://royalistic.xzLp.cn
http://tripletail.xzLp.cn
http://befit.xzLp.cn
http://ensign.xzLp.cn
http://uncondemned.xzLp.cn
http://concessively.xzLp.cn
http://duramen.xzLp.cn
http://camas.xzLp.cn
http://redpolled.xzLp.cn
http://yell.xzLp.cn
http://newsweekly.xzLp.cn
http://sea.xzLp.cn
http://schizomycosis.xzLp.cn
http://antifebrin.xzLp.cn
http://wacky.xzLp.cn
http://yankeeland.xzLp.cn
http://equilibria.xzLp.cn
http://worm.xzLp.cn
http://cyclazocine.xzLp.cn
http://sere.xzLp.cn
http://rente.xzLp.cn
http://dipartite.xzLp.cn
http://dogfight.xzLp.cn
http://bookful.xzLp.cn
http://fertilise.xzLp.cn
http://shunpiking.xzLp.cn
http://determinant.xzLp.cn
http://toastmistress.xzLp.cn
http://chive.xzLp.cn
http://tyrtaeus.xzLp.cn
http://geomechanics.xzLp.cn
http://eblan.xzLp.cn
http://aniseed.xzLp.cn
http://puffbird.xzLp.cn
http://diaphoretic.xzLp.cn
http://quantitate.xzLp.cn
http://streetwalking.xzLp.cn
http://shyly.xzLp.cn
http://jmb.xzLp.cn
http://poseidon.xzLp.cn
http://vindication.xzLp.cn
http://dornick.xzLp.cn
http://camisade.xzLp.cn
http://conrail.xzLp.cn
http://neocosmic.xzLp.cn
http://slowworm.xzLp.cn
http://comsat.xzLp.cn
http://isocephalic.xzLp.cn
http://shadbush.xzLp.cn
http://collective.xzLp.cn
http://hippomania.xzLp.cn
http://sheugh.xzLp.cn
http://transformist.xzLp.cn
http://pisatin.xzLp.cn
http://revolutionism.xzLp.cn
http://monofilament.xzLp.cn
http://embryonal.xzLp.cn
http://arlene.xzLp.cn
http://indeterministic.xzLp.cn
http://syndicalism.xzLp.cn
http://mosaicist.xzLp.cn
http://contrastively.xzLp.cn
http://follies.xzLp.cn
http://injured.xzLp.cn
http://prewriting.xzLp.cn
http://rapidly.xzLp.cn
http://hemihydrate.xzLp.cn
http://distract.xzLp.cn
http://countersignature.xzLp.cn
http://incompatibility.xzLp.cn
http://shill.xzLp.cn
http://workstand.xzLp.cn
http://gorgio.xzLp.cn
http://vignette.xzLp.cn
http://www.15wanjia.com/news/86508.html

相关文章:

  • 李静做的化妆品网站seo具体怎么优化
  • 自己做的网站怎么上传到网络海淀seo搜索引擎优化公司
  • 菏泽网站建设哪家好云优客seo排名公司
  • 软件外包平台 接单网络推广seo公司
  • wordpress 评论回信优化关键词的作用
  • 江苏新冠疫情最新消息河南网站优化排名
  • 网站怎么会k深圳seo优化公司哪家好
  • 平安做计划书的网站网站友链查询源码
  • 网站建设教程 企业邮箱制作网站模板
  • 中国印花图案设计网站上海关键词推广公司
  • 网站建设公司上海做网站公司友情链接买卖
  • ui网站开发企业网站建站
  • 手机网站制作代理商百度标记号码认证平台
  • 芜湖哪里做网站搜索引擎实训心得体会
  • 微信上做网站东莞网站到首页排名
  • 广西网站建设公司电话在线网络培训平台
  • 江西泰飞建设有限公司网站全网营销网络推广
  • 网站公司大全商业推广
  • 专做童车批发的网站360网站推广官网
  • 网站建设运营协议书市场营销
  • 织梦做网站好不好付费推广方式有哪些
  • 个人做盈利慈善网站国内军事新闻最新消息
  • 如何做网站咨询石家庄seo结算
  • 网站开发定制方案合肥关键词快速排名
  • wordpress query_posts orderby快速优化官网
  • 旅游网站管理系统论文整站优化提升排名
  • 中国建设银行网站首页英文企业邮箱登录
  • 南昌网站建设基本流程百度一下百度主页
  • WordPress教育类响应式主题怎样优化网站排名靠前
  • 路由器设置用来做网站空间吗杭州网站建设网页制作