neurobagel / federation-api

REST API for query federation over multiple Neurobagel graph databases
https://federate.neurobagel.org
MIT License
0 stars 0 forks source link

f-API does not pass on auth token for federated query #131

Closed surchs closed 3 weeks ago

surchs commented 3 weeks ago

Is there an existing issue for this?

Expected Behavior

f-API passes on an auth token to all n-APIs it is federating with

Current Behavior

The f-API query endpoint accepts (and validates) an auth token:

https://github.com/neurobagel/federation-api/blob/d29cae82ae8a771191763b5d074878f7231cf353/app/api/routers/query.py#L37-L42

But does not pass on the token when querying the node-API:

https://github.com/neurobagel/federation-api/blob/d29cae82ae8a771191763b5d074878f7231cf353/app/api/routers/query.py#L66-L79

Error message

n-API with auth enabled just show up as "failed".

We could also consider handling the "not allowed / 403" error a little more verbosely.

Environment

No response

How to reproduce

No response

Anything else?

No response

neurobagel-bot[bot] commented 3 weeks ago

:rocket: Issue was released in v0.4.1 :rocket: