Higress外部认证插件(ext-auth)白名单无效 #2142
-
|
问题:使用Higress外部认证插件(ext-auth)调用认证服务,配置的白名单没有效果 这是我的外部认证插件配置,我是在域名下(api-dev.abc.net)配置的外部认证,这是yaml的配置: http_service:
authorization_request:
allowed_headers:
- exact: "Authorization"
- exact: "Content-Type"
- exact: "Accept"
- exact: "User-Agent"
- exact: "X-Request-ID"
- prefix: "Kbfs-"
authorization_response:
allowed_upstream_headers:
- exact: "x-md-global-userID"
- exact: "X-User-Info"
- exact: "X-Auth-Roles"
- prefix: "x-md-"
endpoint:
path: "/auth/validate"
request_method: "POST"
service_name: "abc.user.http.DEFAULT-GROUP.public.nacos"
service_port: 8000
endpoint_mode: "forward_auth"
match_list:
- match_rule_domain: "api-dev.abc.net"
match_rule_method: "*"
match_rule_path: "/user"
match_rule_type: "prefix"
match_type: "whitelist"
|
Beta Was this translation helpful? Give feedback.
Answered by
hanxiantao
Apr 30, 2025
Replies: 3 comments 4 replies
-
|
cc @hanxiantao |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
http_service:
authorization_request:
allowed_headers:
- exact: "Authorization"
- exact: "Content-Type"
- exact: "Accept"
- exact: "User-Agent"
- exact: "X-Request-ID"
- prefix: "Kbfs-"
authorization_response:
allowed_upstream_headers:
- exact: "x-md-global-userID"
- exact: "X-User-Info"
- exact: "X-Auth-Roles"
- prefix: "x-md-"
endpoint:
path: "/auth/validate"
request_method: "POST"
service_name: "abc.user.http.DEFAULT-GROUP.public.nacos"
service_port: 8000
endpoint_mode: "forward_auth"
match_list:
- match_rule_domain: "api-dev.abc.net"
match_rule_method: "*"
match_rule_path: "/user"
match_rule_type: "prefix"
match_type: "whitelist" |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hanxiantao
-
我用上面的配置试了下好像没问题,第一个响应为403,走了认证服务,第二三个跳过了认证返回200 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



match_type、match_list和http_service是一个层级的。试下这样