From e49b37ea9985d0d7c5314912bb7d65526ab2fc0b Mon Sep 17 00:00:00 2001 From: kunlongli Date: Fri, 27 Oct 2023 15:37:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4devx=E6=8B=A6?= =?UTF-8?q?=E6=88=AA=E5=99=A8=E4=BC=98=E5=85=88=E7=BA=A7=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E4=B8=BAInt=20#1335?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tencent/bkrepo/common/security/SecurityAutoConfiguration.kt | 2 +- .../bkrepo/common/security/interceptor/devx/DevxProperties.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/SecurityAutoConfiguration.kt b/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/SecurityAutoConfiguration.kt index 9d565afa90..2a6a16b401 100644 --- a/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/SecurityAutoConfiguration.kt +++ b/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/SecurityAutoConfiguration.kt @@ -116,7 +116,7 @@ class SecurityAutoConfiguration { // 不应用到服务间调用 registry.addInterceptor(DevxSrcIpInterceptor(properties)) // 需要在[httpAuthInterceptor]之后执行才能取得用户信息, 100为随机取值 - .order(properties.interceptorOrder.toInt()) + .order(properties.interceptorOrder) .excludePathPatterns("/service/**", "/replica/**") } } diff --git a/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/interceptor/devx/DevxProperties.kt b/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/interceptor/devx/DevxProperties.kt index 050a199878..246cb15900 100644 --- a/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/interceptor/devx/DevxProperties.kt +++ b/src/backend/common/common-security/src/main/kotlin/com/tencent/bkrepo/common/security/interceptor/devx/DevxProperties.kt @@ -79,5 +79,5 @@ data class DevxProperties( /** * devx拦截器优先级,如果需要取用户信息优先级需要比[HttpAuthInterceptor]拦截器低 */ - var interceptorOrder: Long = (Ordered.LOWEST_PRECEDENCE - 100).toLong(), + var interceptorOrder: Int = Ordered.LOWEST_PRECEDENCE - 100, )