You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have middleware in our REST API for API key validation. For the read only API key, we have a list of POST endpoints we still allow reading from. Our scroll endpoint is a good example of this.
In the following lines we grab the pattern that matches a user request, and match it against the list of allowed read only patterns:
Related to qdrant/qdrant-web-ui#158.
Current Behavior
We have middleware in our REST API for API key validation. For the read only API key, we have a list of POST endpoints we still allow reading from. Our scroll endpoint is a good example of this.
In the following lines we grab the pattern that matches a user request, and match it against the list of allowed read only patterns:
qdrant/src/actix/api_key.rs
Lines 161 to 164 in 524adc3
However, with some debugging I found out that matching patterns is giving us wrong results breaking our logic.
For example:
POST /collections/benchmark/points/scroll
/collections/{name}/points/{id}
/collections/{name}/points/scroll
Steps to Reproduce
dbg!()
Expected Behavior
Instead, it should show the correct match pattern.
Possible Solution
Maybe we can tweak the ordering of pattern matching to always match strict paths like
/scroll
first, and/{id}
after.Additional details
Fixes qdrant/qdrant-web-ui#158.
The text was updated successfully, but these errors were encountered: