apache / apache/servicecomb-java-chassis

CommonHttpDispatcher does not invoke handler chain and Configured Auth handler is not triggered

Aperta
#3,201 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
edge
Lingua principale
Java
Stelle
1.9k
Fork
814
Merge medio
8g 23h
PR unite (30g)
1

Descrizione

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+
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Inizia tracciando CommonHttpDispatcher dal routing edge fino alla catena di handler Consumer configurata, utilizzando la configurazione dell’issue come setup di riproduzione. Determina perché authClientGrant non viene invocato prima dell’inoltro a mfa-login-service; il lavoro è completato quando l’handler Consumer configurato viene eseguito per questo percorso del dispatcher, con il comportamento verificato da un test di regressione se il repository ne fornisce uno.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
api, backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.