-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add gRPC client builtins #1450
Comments
I agree this would be useful, I'm just hesitant about including dependencies for N different protocols. Labeling this as "design" so that we can track it and keep it in mind. |
I'd also be able to make use of GRPC builtins. One option might be to expose additional builtins as separate Go modules. Then a runtime that uses the core OPA engine can add them if it makes sense and the dependencies are not dragged into the main module. The obvious downside of this is the increased release management overhead :) |
✨ maybe via #3631, one day. 🌠 |
This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. |
We've got builtins to query HTTP endpoints, and we're tracking an enhancement for LDAP querying in #938. What about gRPC? It's not HTTP-compatible enough to be comfortably queried using
http.send
.Commonly, you'd generate your gRPC client code from the
proto3
service definition. However, if you look at howgrpcurl
does it, cleverly usinggithub.com/jhump/protoreflect
to fetch the service's definition at runtime using the reflection API -- OPA could do the same, and make it available via an interface not too different fromhttp.send
.It could look like
grpc.send({method, host, message, metadata, output})
(metadata
is just headers in grpc-land). The marshaling and unmarshaling of the input and output messages could be done via JSON, just likegrpcurl
does it.Note that gRPC defaults to using TLS, so the recent improvements to
http.send
TLS support (#1067) would be relevant here, too.Caveats
grpcurl
pulls in protobuf, grpc, etc..The text was updated successfully, but these errors were encountered: