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
Overview
The goal is to add a flexible and customizable security layer to Trino endpoints by allowing developers to define and apply
multiple filters to incoming requests. This will enable additional protection for Trino services exposed over the internet.
Filtering Mechanism
Provider Module: Create a separate module responsible for dynamically loading filter providers. Each provider will be
responsible for creating instances of specific filter classes.
Main Filter: Introduce a main filter class that will serve as an orchestrator, calling multiple filters in a
predetermined order (e.g., based on priority or category). This main filter will delegate the actual filtering to individual
filter instances.
Filter Structure
Filter Interface: Define an abstract interface for filters, specifying the filter method signature. This method will
take a request object as input and return a boolean indicating whether the request is allowed to proceed.
Concrete Filters: Create various concrete filter classes implementing the Filter Interface. These can be specific to
different use cases or security requirements (e.g., IP address filtering, rate limiting, authentication).
Main Filter
We can borrow the ideas from other REST frameworks along the lines of
Filter Chain: In the main filter class, maintain a collection of registered filters in a predefined order.
Request Processing: Upon receiving a request, pass it through each filter in sequence. If any filter returns false,
stop processing and return an error response.
Allowing the request: If all filters allow the request to proceed, forward it to the Trino backend.
Provider Module
Filter Registration: The provider module will be responsible for registering instances of concrete filter classes with
the main filter.
Dynamic Loading: Load filter providers dynamically based on configuration or user input (e.g., via a configuration file
or command-line arguments).
The text was updated successfully, but these errors were encountered:
I think this would be great and is in line with earlier discussion about figuring out how to adapt access control code from Trino into the Trino Gateway .. this specific filtering can also be done independently at first with some simple configuration. We should discuss this more but in general 👍
mosabua
changed the title
Support filters to protect trino endpoints
Support filters to protect Trino endpoints
Jan 22, 2025
Overview
The goal is to add a flexible and customizable security layer to Trino endpoints by allowing developers to define and apply
multiple filters to incoming requests. This will enable additional protection for Trino services exposed over the internet.
Filtering Mechanism
responsible for creating instances of specific filter classes.
predetermined order (e.g., based on priority or category). This main filter will delegate the actual filtering to individual
filter instances.
Filter Structure
filter
method signature. This method willtake a request object as input and return a boolean indicating whether the request is allowed to proceed.
different use cases or security requirements (e.g., IP address filtering, rate limiting, authentication).
Main Filter
We can borrow the ideas from other REST frameworks along the lines of
false
,stop processing and return an error response.
Provider Module
the main filter.
or command-line arguments).
The text was updated successfully, but these errors were encountered: