• SpringBoot配置属性之Security


    spring security是springboot支持的权限控制系统。

        • security.basic.authorize-mode
          要使用权限控制模式.

        • security.basic.enabled
          是否开启基本的鉴权,默认为true

        • security.basic.path
          需要鉴权的path,多个的话以逗号分隔,默认为[/**]

        • security.basic.realm
          HTTP basic realm 的名字,默认为Spring

        • security.enable-csrf
          是否开启cross-site request forgery校验,默认为false.

        • security.filter-order
          Security filter chain的order,默认为0

        • security.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),默认为header

        • security.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的scope

        • security.oauth2.client.token-name
          指定token的名称

        • security.oauth2.client.use-current-uri
          是否优先使用请求中URI,再使用pre-established的跳转URI. 默认为true

        • security.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,默认为true

        • security.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的URI

        • security.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
          默认用户的授权角色.

  • 相关阅读:
    css伪类和伪对象
    多浏览器css兼容分析小结
    Hibernate3源码分析之hibernate.cfg.xml配置文件与SessionFactory类
    php示例代码之使用mysqli对象
    C#中Web Service身份验证
    未能转换为类型库。类型库导出程序在处理,时遇到了错误。错误: 找不到元素
    MS RDLC reportview 在 Chrome中不显示查询结果的原因
    C# 创建ActiveX
    How to rebuild performance counters on Windows Vista/Server2008/7/Server2008R2
    jqGrid中文说明文档——选项设置
  • 原文地址:https://www.cnblogs.com/snail90/p/9579849.html
Copyright © 2020-2023  润新知