spring-boot-starter-security Spring Boot中集成Spring Security
spring security是springboot支持的权限控制系统。
security.basic.authorize-mode
要使用权限控制模式.security.basic.enabled
是否开启基本的鉴权,默认为truesecurity.basic.path
需要鉴权的path,多个的话以逗号分隔,默认为[/**]security.basic.realm
HTTP basic realm 的名字,默认为Springsecurity.enable-csrf
是否开启cross-site request forgery校验,默认为false.security.filter-order
Security filter chain的order,默认为0security.headers.cache
是否开启http头部的cache控制,默认为false.security.headers.content-type
是否开启X-Content-Type-Options头部,默认为false.security.headers.frame
是否开启X-Frame-Options头部,默认为false.security.headers.hsts
指定HTTP Strict Transport Security (HSTS)模式(none, domain, all).security.headers.xss
是否开启cross-site scripting (XSS) 保护,默认为false.security.ignored
指定不鉴权的路径,多个的话以逗号分隔.security.oauth2.client.access-token-uri
指定获取access token的URI.security.oauth2.client.access-token-validity-seconds
指定access token失效时长.security.oauth2.client.additional-information.[key]
设定要添加的额外信息.security.oauth2.client.authentication-scheme
指定传输不记名令牌(bearer token)的方式(form, header, none,query),默认为headersecurity.oauth2.client.authorities
指定授予客户端的权限.security.oauth2.client.authorized-grant-types
指定客户端允许的grant types.security.oauth2.client.auto-approve-scopes
对客户端自动授权的scope.security.oauth2.client.client-authentication-scheme
传输authentication credentials的方式(form, header, none, query),默认为header方式security.oauth2.client.client-id
指定OAuth2 client ID.security.oauth2.client.client-secret
指定OAuth2 client secret. 默认是一个随机的secret.security.oauth2.client.grant-type
指定获取资源的access token的授权类型.security.oauth2.client.id
指定应用的client ID.security.oauth2.client.pre-established-redirect-uri
服务端pre-established的跳转URI.security.oauth2.client.refresh-token-validity-seconds
指定refresh token的有效期.security.oauth2.client.registered-redirect-uri
指定客户端跳转URI,多个以逗号分隔.security.oauth2.client.resource-ids
指定客户端相关的资源id,多个以逗号分隔.security.oauth2.client.scope
client的scopesecurity.oauth2.client.token-name
指定token的名称security.oauth2.client.use-current-uri
是否优先使用请求中URI,再使用pre-established的跳转URI. 默认为truesecurity.oauth2.client.user-authorization-uri
用户跳转去获取access token的URI.security.oauth2.resource.id
指定resource的唯一标识.security.oauth2.resource.jwt.key-uri
JWT token的URI. 当key为公钥时,或者value不指定时指定.security.oauth2.resource.jwt.key-value
JWT token验证的value. 可以是对称加密或者PEMencoded RSA公钥. 可以使用URI作为value.security.oauth2.resource.prefer-token-info
是否使用token info,默认为truesecurity.oauth2.resource.service-id
指定service ID,默认为resource.security.oauth2.resource.token-info-uri
token解码的URI.security.oauth2.resource.token-type
指定当使用userInfoUri时,发送的token类型.security.oauth2.resource.user-info-uri
指定user info的URIsecurity.oauth2.sso.filter-order
如果没有显示提供WebSecurityConfigurerAdapter时指定的Filter order.security.oauth2.sso.login-path
跳转到SSO的登录路径默认为/login.security.require-ssl
是否对所有请求开启SSL,默认为false.security.sessions
指定Session的创建策略(always, never, if_required, stateless).security.user.name
指定默认的用户名,默认为user.security.user.password
默认的用户密码.security.user.role
默认用户的授权角色.
spring-boot-starter-security Spring Boot中集成Spring Security的更多相关文章
- 【Spring】关于Boot应用中集成Spring Security你必须了解的那些事
Spring Security Spring Security是Spring社区的一个顶级项目,也是Spring Boot官方推荐使用的Security框架.除了常规的Authentication和A ...
- 关于Boot应用中集成Spring Security你必须了解的那些事
Spring Security Spring Security是Spring社区的一个顶级项目,也是Spring Boot官方推荐使用的Security框架.除了常规的Authentication和A ...
- Spring Boot中集成Spring Security 专题
check to see if spring security is applied that the appropriate resources are permitted: @Configurat ...
- Spring Boot 2.X(十八):集成 Spring Security-登录认证和权限控制
前言 在企业项目开发中,对系统的安全和权限控制往往是必需的,常见的安全框架有 Spring Security.Apache Shiro 等.本文主要简单介绍一下 Spring Security,再通过 ...
- 06_在web项目中集成Spring
在web项目中集成Spring 一.使用Servlet进行集成测试 1.直接在Servlet 加载Spring 配置文件 ApplicationContext applicationContext = ...
- 在Struts2中集成Spring详细讲解
Spring的官方定义是:一个轻量级的IoC和Aop容器框架,它使用了一种叫做依赖注入的技术. 所谓依赖注入,就是指将创建对象以及协议依赖对象之间合作的责任从对象自身中转移到"工厂" ...
- JavaWeb_(Spring框架)在Struts+Hibernate框架中引入Spring框架
spring的功能:简单来说就是帮我们new对象,什么时候new对象好,什么时候销毁对象. 在MySQL中添加spring数据库,添加user表,并添加一条用户数据 使用struts + hibern ...
- SpringBoot集成Spring Security
1.Spring Security介绍 Spring security,是一个强大的和高度可定制的身份验证和访问控制框架.它是确保基于Spring的应用程序的标准 --来自官方参考手册 Spring ...
- spring boot rest 接口集成 spring security(2) - JWT配置
Spring Boot 集成教程 Spring Boot 介绍 Spring Boot 开发环境搭建(Eclipse) Spring Boot Hello World (restful接口)例子 sp ...
随机推荐
- 【测试工具】tcpdump + wireshark 抓包实践
Tcpdump + Wireshark 抓包实践 工具介绍 Tcpdump 看到dump大家应该有所意识吧,就是下载数据,抓数据.tcpdump是linux下的一个抓取tcp包的命令 Usage: t ...
- ubuntu 添加应用到Dash启动器
打开终端输入 $sudo vim /usr/share/applications/name.desktop name是你的程序标识名称 在打开的编辑器中添加以下内容,这里以配置NetBeans为例: ...
- 每天一个linux命令:【转载】rm命令
今天学习一下linux中删除文件和目录的命令: rm命令.rm是常用的命令,该命令的功能为删除一个目录中的一个或多个文件或目录,它也可以将某个目录及其下的所有文件及子目录均删除.对于链接文件,只是删除 ...
- BZOJ3998 TJOI2015 弦论 【后缀自动机】【贪心】
Description 对于一个给定长度为N的字符串,求它的第K小子串是什么. Input 第一行是一个仅由小写英文字母构成的字符串S 第二行为两个整数T和K,T为0则表示不同位置的相同子串算作一个. ...
- NOI2001 食物链【扩展域并查集】*
NOI2001 食物链 动物王国中有三类动物 A,B,C,这三类动物的食物链构成了有趣的环形.A 吃 B,B吃 C,C 吃 A. 现有 N 个动物,以 1 - N 编号.每个动物都是 A,B,C 中的 ...
- vector 介绍
介绍 这篇文章的目的是为了介绍std::vector,如何恰当地使用它们的成员函数等操作.本文中还讨论了条件函数和函数指针在迭代算法中使用,如在remove_if()和for_each()中的使用.通 ...
- <mvc:annotation-driven>注册了什么
前言 上一篇文章dispatcherservlet初始化中提到,如果没有配置handlermapping就会采取默认的策略进行配置handlermapping,这篇文章就要讲述mvc:annotati ...
- 使用 commander && inquirer 构建专业的node cli
备注: 比较简单就是使用nodejs 的两个类库帮助我们进行开发而已,具体的使用参考类库文档 1. 项目初始化 a. 安装依赖 yarn init -y yarn add commander in ...
- consul dns 转发配置
测试使用dnsmasq. 优势:可以方便的进行应该编码,进行动态域名解析,容错处理. 因为consul 默认的dns 为127.0.0.1 8600 所以配置如下: 文件目录: /etc/d ...
- bzoj1002 [FJOI2007]轮状病毒——找规律+高精度
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1002 打表找规律,似乎是这样:https://blog.csdn.net/fzhvampir ...