diff --git a/README.md b/README.md index 2ce4c0e2c07c31ad074936782d8d55a95331ced0..c09f244c2d7b9981a8b5769b3d2d060bb976c6f4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # acp-admin-cloud -###### v6.6.1 [版本更新日志](doc/version_history.md) +###### v6.7.0 [版本更新日志](doc/version_history.md) - 使用Application Construction Platform 应用构建平台作为脚手架 - 基于 Spring Cloud 的微服务版本,基于 Spring Boot @@ -9,9 +9,9 @@ ## 相关组件版本 -- [Spring Boot 3.3.6](https://projects.spring.io/spring-boot) -- [Spring Boot Admin 3.3.6](https://github.com/codecentric/spring-boot-admin) -- [Acp 2024.3.2](https://gitee.com/zhangbinhub/acp) +- [Spring Boot 3.4.1](https://projects.spring.io/spring-boot) +- [Spring Boot Admin 3.4.1](https://github.com/codecentric/spring-boot-admin) +- [Acp 2025.0.0](https://gitee.com/zhangbinhub/acp) - [sensitive](https://github.com/houbb/sensitive) ## 技术栈 diff --git a/doc/version_history.md b/doc/version_history.md index 976e33b2254656b6a44d56dac9c241215ed38846..9ece10b9cce25d1788caea14933109367fb2579d 100644 --- a/doc/version_history.md +++ b/doc/version_history.md @@ -1,5 +1,17 @@ ## 版本更新记录 +##### v6.7.0 + +- Global + - [Upgrade] 升级依赖 + - Acp 2025.0.0 + - Spring Boot 3.4.1 + - Spring Boot Admin 3.4.1 +- gateway-server + - 删除`writeableHeaders`自定义`WebFilter` +- oauth-server + - 修改 csrf 配置 + ##### v6.6.1 - Global diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index d2f96cfec7c4f00a6d2cb432899b646166f0ee58..cfccb1bf95b78d711dcf0e00650f46570de5c722 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -1,14 +1,14 @@ ext { - versions = [:] + versions = [:] } versions += [ - kotlin : "2.1.0", - springBoot : "3.3.6", - springBootAdmin : "3.3.6", - acp : "2024.3.2", - sensitive : "1.7.0", - sensitiveDeepCopy: "0.0.1", - camunda : "7.22.0", - mysql : "9.1.0" + kotlin : "2.1.0", + springBoot : "3.4.1", + springBootAdmin : "3.4.1", + acp : "2025.0.0", + sensitive : "1.7.0", + sensitiveDeepCopy: "0.0.1", + camunda : "7.22.0", + mysql : "9.1.0" ] \ No newline at end of file diff --git a/gradle/moduleVersion.gradle b/gradle/moduleVersion.gradle index 20fbf176b48cbf0880e1a037e5c80b4793ce5ff7..c188b3d9d5b374e7233871f6f1d3047ba43cdee8 100644 --- a/gradle/moduleVersion.gradle +++ b/gradle/moduleVersion.gradle @@ -1,30 +1,30 @@ project(':acp-admin-cloud-constant') { - version '6.6.1' + version '6.7.0' } project(':acp-admin-cloud-dependencies') { - version '6.6.1' + version '6.7.0' } project(':acp-admin-cloud-dependencies-resource-server') { - version '6.6.1' + version '6.7.0' } project(':admin-server') { - version '6.6.1' + version '6.7.0' } project(':deploy-server') { - version '6.6.1' + version '6.7.0' } project(':gateway-server') { - version '6.6.1' + version '6.7.0' } project(':log-server') { - version '6.6.1' + version '6.7.0' } project(':oauth-server') { - version '6.6.1' + version '6.7.0' } project(':route-server') { - version '6.6.1' + version '6.7.0' } project(':workflow-server') { - version '6.6.1' + version '6.7.0' } \ No newline at end of file diff --git a/modules/gateway-server/src/main/kotlin/io/gitee/zhangbinhub/admin/gateway/conf/RouteConfiguration.kt b/modules/gateway-server/src/main/kotlin/io/gitee/zhangbinhub/admin/gateway/conf/RouteConfiguration.kt index 16aa94257f64eb30eccfb93c6669a293c4b0fffb..d0310d0a3f4ee5dfff349032d2ec07d44e1422db 100644 --- a/modules/gateway-server/src/main/kotlin/io/gitee/zhangbinhub/admin/gateway/conf/RouteConfiguration.kt +++ b/modules/gateway-server/src/main/kotlin/io/gitee/zhangbinhub/admin/gateway/conf/RouteConfiguration.kt @@ -17,20 +17,16 @@ import org.springframework.cloud.stream.function.StreamBridge import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import org.springframework.core.Ordered -import org.springframework.core.annotation.Order import org.springframework.core.io.buffer.DataBuffer import org.springframework.core.io.buffer.DataBufferFactory import org.springframework.http.HttpHeaders import org.springframework.http.MediaType -import org.springframework.http.server.reactive.ServerHttpRequestDecorator import org.springframework.http.server.reactive.ServerHttpResponseDecorator import org.springframework.web.server.ServerWebExchange -import org.springframework.web.server.WebFilter import reactor.core.publisher.Flux import reactor.core.publisher.Mono /** - * @author zhang by 17/12/2018 00:41 * @since JDK 11 */ @Configuration(proxyBeanMethods = false) @@ -46,22 +42,6 @@ class RouteConfiguration @Autowired constructor(private val routeLogService: Rou fun routeLogBridge(streamBridge: StreamBridge, objectMapper: ObjectMapper) = RouteLogBridge(streamBridge, objectMapper, RouteConstant.ROUTE_LOG_OUTPUT) - @Bean - @Order(Ordered.HIGHEST_PRECEDENCE) - fun writeableHeaders(): WebFilter = WebFilter { exchange, chain -> - HttpHeaders.writableHttpHeaders(exchange.request.headers).let { writeableHeaders -> - object : ServerHttpRequestDecorator(exchange.request) { - override fun getHeaders(): HttpHeaders { - return writeableHeaders - } - }.let { writeableRequest -> - exchange.mutate().request(writeableRequest).build() - }.let { writeableExchange -> - chain.filter(writeableExchange) - } - } - } - @Bean fun logRequestFilter(routeLogBridge: RouteLogBridge): GlobalFilter = GlobalFilter { exchange, chain -> exchange.mutate().request(exchange.request.mutate().headers { httpHeaders: HttpHeaders -> diff --git a/modules/oauth-server/src/main/kotlin/io/gitee/zhangbinhub/admin/oauth/conf/AuthorizationServerConfiguration.kt b/modules/oauth-server/src/main/kotlin/io/gitee/zhangbinhub/admin/oauth/conf/AuthorizationServerConfiguration.kt index 4340dfcafd9a93a2263b5f733baa8493a3cf7b04..7987961121cefcce623060cdf142149ca097fafa 100644 --- a/modules/oauth-server/src/main/kotlin/io/gitee/zhangbinhub/admin/oauth/conf/AuthorizationServerConfiguration.kt +++ b/modules/oauth-server/src/main/kotlin/io/gitee/zhangbinhub/admin/oauth/conf/AuthorizationServerConfiguration.kt @@ -37,9 +37,9 @@ import org.springframework.security.oauth2.server.authorization.token.Delegating import org.springframework.security.oauth2.server.authorization.token.OAuth2AccessTokenGenerator import org.springframework.security.oauth2.server.authorization.token.OAuth2RefreshTokenGenerator import org.springframework.security.oauth2.server.authorization.token.OAuth2TokenGenerator -import org.springframework.security.oauth2.server.authorization.web.authentication.DelegatingAuthenticationConverter import org.springframework.security.oauth2.server.authorization.web.authentication.OAuth2ClientCredentialsAuthenticationConverter import org.springframework.security.web.SecurityFilterChain +import org.springframework.security.web.authentication.DelegatingAuthenticationConverter import org.springframework.security.web.util.matcher.AntPathRequestMatcher import org.springframework.web.bind.annotation.RequestMethod import org.springframework.web.client.RestClient @@ -76,7 +76,7 @@ class AuthorizationServerConfiguration @Autowired constructor( @Throws(Exception::class) fun acpBasicSecurityFilterChain(httpSecurity: HttpSecurity): SecurityFilterChain? { // 配置 endpoint 策略 - httpSecurity.csrf { it.disable() } + httpSecurity.csrf { it.ignoringRequestMatchers("/**") } .securityMatcher( "$contextPath${webEndpointProperties.basePath}", "$contextPath${webEndpointProperties.basePath}/**" @@ -104,7 +104,7 @@ class AuthorizationServerConfiguration @Autowired constructor( val authorizationServerConfigurer = OAuth2AuthorizationServerConfigurer() httpSecurity.with(authorizationServerConfigurer, Customizer.withDefaults()) // 配置 endpoint 策略 - httpSecurity.csrf { it.disable() }.authorizeHttpRequests { authorizeRequests -> + httpSecurity.csrf { it.ignoringRequestMatchers("/**") }.authorizeHttpRequests { authorizeRequests -> authorizeRequests.requestMatchers(authorizationServerConfigurer.endpointsMatcher).permitAll() .requestMatchers(AntPathRequestMatcher("/**", RequestMethod.OPTIONS.name)).permitAll() .requestMatchers(*security.map { AntPathRequestMatcher(it) }.toTypedArray()).authenticated()