apache / apache/servicecomb-java-chassis
CommonHttpDispatcher does not invoke handler chain and Configured Auth handler is not triggered
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 814
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 1
Description
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+
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing CommonHttpDispatcher from edge routing into the configured Consumer handler chain, using the configuration in the issue as the reproduction setup. Determine why authClientGrant is not invoked before forwarding to mfa-login-service; done means the configured consumer handler runs for this dispatcher path, with the behavior verified by a regression test if the repository provides one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100