apache / apache/servicecomb-java-chassis
CommonHttpDispatcher does not invoke handler chain and Configured Auth handler is not triggered
- Langage dominant
- Java
- Étoiles
- 1.9k
- Forks
- 814
- Merge moyen
- 8 j 23 h
- PR mergées (30 j)
- 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+
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par suivre CommonHttpDispatcher depuis le routage en périphérie jusqu’à la chaîne de handlers Consumer configurée, en utilisant la configuration de l’issue comme configuration de reproduction. Déterminez pourquoi authClientGrant n’est pas appelé avant la transmission vers mfa-login-service ; le travail est terminé lorsque le handler Consumer configuré s’exécute pour ce chemin du dispatcher, avec un comportement vérifié par un test de régression si le dépôt en fournit un.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- api, backend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100