stackabletech / stackabletech/druid-opa-authorizer
Enhancement: Support for Row-Level Filtering and Column Masking in Druid OPA Authorizer
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5
- Forks
- 5
- Avg merge
- 7d 16h
- Merged PRs (30d)
- 1
Description
Description:
We are currently using the druid-opa-authorizer plugin to integrate Open Policy Agent (OPA) with Apache Druid for fine-grained access control.
At present, the plugin only supports boolean authorization decisions (i.e., true or false) returned from OPA policies.
This works well for basic allow/deny authorization but does not support more granular data security requirements such as row-level filtering and column-level masking.
In enterprise environments, it’s common to need:
- Row-Level Security (RLS): Restricting access to specific rows based on user identity, role, or group (e.g., a user in the APAC region should only see records where
region = 'APAC'). - Column Masking: Masking or hiding sensitive columns (e.g., salary, SSN) from certain users while allowing others full access.
Currently, since the OPA policy can only return a boolean value, Druid cannot apply dynamic filtering or masking logic at the query level.
We propose enhancing the plugin to handle structured JSON responses from OPA that include both access decisions and filter/masking metadata.
Proposed Enhancement:
Support for JSON-based OPA responses, for example:
{
"allow": true,
"row_filter": "region = 'APAC'",
"column_mask": {
"ssn": "MASKED",
"salary": "NULL"
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating the plugin’s current boolean OPA authorization response handling and its Druid authorization integration, then clarify the response contract and enforcement points for row_filter and column_mask. Done should include structured OPA responses that apply row filtering and column masking while preserving allow/deny decisions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authorization, backend, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100