-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trino-opa-plugin #9787
Comments
OPA is a framework. You would need to first implement authorization model in OPA that you would need to use. Or do you think about a generic plugin that communicates with with OPA but authorization model is some injected into a plugin via configuration? Can you please elaborate how you would like to address this? |
I'm already implementing a plugin for OPA that delegates the decision to OPA Server. So the plugin just queries OPA server with parameters of the authorization method and address the responses from it. i.e. for the method the plugin ask to OPA server to evaluate the rule
the result will be
the policy is like the following
For validating the approach I wrote OPA policies implementing the same logics of the FileBasedSystemAccessControl reading json configuration as OPA data files. I ported the current test suite of FileBasedSystemAccessControl in my plugin. This set of rego files could be used as a starting point for customizing your opa based access control. |
Would it be possible that we run same set of tests for your OPA and |
IMO It is not needed that they are coherent. The goal is to test the plugin opa wrapper and to validate the approach. Moreover you could use the rego files written for the tests as a starting point for your policies but if you need the behaviour of the FileBasedSystemAccessControl you can use it directly. |
I mean we should provide rego files for OPA where we would be able to get the same behavior. |
But I hear your point. We could have some kind of API that we require OPA to provide and users might implement it differently according to their needs. However we need to have something decent that users can use out of the box. Like a recommended template. |
We've been in touch with the developers of https://github.com/stackabletech/trino-opa-authorizerhttps://github.com/stackabletech/trino-opa-authorizer and created a fork of their code to be mainlined and with some tweaks. This is a WIP, but see #17940 |
+1 |
Closing as #19532 |
Developing a plugin that provides a SystemAccessControl implementation that delegates authorization decisions to OPA (Open Policy Access) technology
The text was updated successfully, but these errors were encountered: