A Trino plugin that enables group retrieval from an HTTP endpoint for user authorization and access control.
- HTTP-based group provider for Trino
- Configurable endpoint URL
- Bearer token authentication support
- Fault-tolerant HTTP client implementation
- Compatible with Trino's security model
- Java 24
- Maven 3.9.11 or later
- Trino server (tested with version 429)
-
Build the plugin:
mvn clean package
-
Copy the plugin to your Trino installation:
cp -r target/trino-http-group-provider-{version} $TRINO_HOME/plugin/http-group-provider/
Create etc/group-provider.properties in your Trino configuration directory:
group-provider.name=http
http-group-provider.endpoint=https://your-api-endpoint/groups
http-group-provider.auth-token=your-bearer-tokenThe HTTP server should expose an endpoint compatible with Open Policy Agent (OPA) input/output formats.
The HTTP endpoint should:
- Accept
POSTrequests - Return a JSON object with the
resultkey containing a list of strings representing group names - Use Bearer token authentication (if needed)
- Return 404 (or other non 2XX status code) for unknown users
{
"input": {
"user": "<username>"
}
}{
"result": [
"<group>",
"<group>"
]
}git clone https://github.com/baptistegh/trino-http-group-provider.git
cd trino-http-group-provider
mvn clean verifyThe project includes both unit and integration tests using JUnit 5:
-
Run unit tests only:
mvn test -
Run all tests (including integration tests):
mvn verify
-
Run code style check:
mvn checkstyle:check
The project uses Google Java Style for code formatting.
A Dockerfile is provided to build and package the plugin:
docker build -t trino-http-group-provider .- Fork the repository
- Create your feature branch:
git checkout -b feature/my-new-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature/my-new-feature - Submit a pull request
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
For issues, questions, or contributions, please create an issue in the GitHub repository.