apache / apache/servicecomb-java-chassis
CommonHttpDispatcher does not invoke handler chain and Configured Auth handler is not triggered
- 主要语言
- Java
- 星标
- 1.9k
- 派生
- 814
- 平均合并
- 8 天 23 小时
- 30 天内合并 PR
- 1
描述
I have an issue in `CommonHttpDispatcher` in that the consumer auth handlers configured for the registered third party microservice are not triggered.
Can you help here? Why handlers are not triggered on using this dispatcher?
This is my configuration. Here `authClientGrant` is a consumer auth handler configured for the registered third party service `mfa-login-service` . At run time after `CommonHttpDispatcher` picks the path for routing, the request is forwarded to the `mfa-login-service` . But none of the handlers are triggered before invocation.
```
servicecomb-config-order: 100
servicecomb:
service:
application: m1-services
name: gateway
properties:
allowCrossApp: true #whether to allow calls across applications
version: 0.0.4
registry:
# Default using local service center
address: http://localhost:30100
instance:
watch: false
edge:
filter:
addHeader:
enabled: true
allowedHeaders: xxx
handler:
chain:
Consumer:
default: loadbalance,tracing-consumer
service:
mfa-login-service: authClientGrant,loadbalance,tracing-consumer
Provider:
default: bizkeeper-provider,tracing-provider
rest:
address: 0.0.0.0:9091?sslEnabled=false
tracing:
enabled: true
http:
dispatcher:
edge:
http:
enabled: true
order: 1
mappings:
oauthAdmin:
path: "/admin/oauth/.*"
microserviceName: oauth-service
prefixSegmentCount: 1
versionRule: 0.0.0+
mfaServices:
path: "/a/mfa/login/.*"
microserviceName: mfa-login-service
prefixSegmentCount: 1
versionRule: 0.0.0+
```
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先,使用 issue 中的配置作为复现设置,跟踪 CommonHttpDispatcher 从边缘路由到已配置的 Consumer handler 链。确定为什么在转发到 mfa-login-service 之前没有调用 authClientGrant;当已配置的 Consumer handler 在此 dispatcher 路径上运行,并且在 repository 提供 regression test 的情况下通过该测试验证了行为时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- api, backend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100