Open
Description
Currently all user queries have access to all collections.
I propose a solution that will allow limiting user queries to specific collections. The list of collections will be passed through a proxy, which will pass the collection list via header based on the user's role in KC
Changes on the API side:
- Handling a new HTTP header containing a list of allowed collections (e.g., X-User-Permissions: ["collection1", "collection2", "collection3"])
- Implementation of query filtering logic to specific index aliases
- Adding an environment variable to enable/disable the functionality (e.g. ENABLE_COLLECTION_ACCESS_CONTROL)
System behavior:
-
When ENABLE_COLLECTION_ACCESS_CONTROL variable is disabled:
- All queries work as before (full access)
-
When ENABLE_COLLECTION_ACCESS_CONTROL variable is enabled:
- Missing header: no access to any collections
- Empty header: no access to any collections
- Header with list: access to the listed collections
Metadata
Metadata
Assignees
Labels
No labels