Skip to content

Commit 9a20f8d

Browse files
bennychendengyh
authored andcommitted
fix: 修复无法获取用户身份的问题
1 parent d874026 commit 9a20f8d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • runtime/bk-plugin-runtime/bk_plugin_runtime/config

runtime/bk-plugin-runtime/bk_plugin_runtime/config/default.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@
7373
"bk_plugin_framework.services.bpf_service.middlewares.TraceIDInjectMiddleware",
7474
"apigw_manager.apigw.authentication.ApiGatewayJWTGenericMiddleware", # JWT 认证
7575
"apigw_manager.apigw.authentication.ApiGatewayJWTAppMiddleware", # JWT 透传的应用信息
76+
"apigw_manager.apigw.authentication.ApiGatewayJWTUserMiddleware", # JWT 透传的用户信息
77+
)
78+
79+
# 用户认证
80+
AUTHENTICATION_BACKENDS += (
81+
"apigw_manager.apigw.authentication.UserModelBackend",
7682
)
7783

7884
# 所有环境的日志级别可以在这里配置

0 commit comments

Comments
 (0)