Support TLS, Authn/z for a function's gRPC server #19673
Labels
area/function
Stale
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Search before asking
Motivation
A function pod (k8s runtime) or process (process runtime) starts a gRPC server that is accessed by the function worker for a number of operations does not currently support TLS, authentication, or authorization. The endpoints exposed can modify the function's state with the following endpoints defined:
It is known that functions have this weakness, but it might be valuable to support securing this gRPC server.
For example, here are the two places we start the plaintext clients:
pulsar/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/process/ProcessRuntime.java
Lines 178 to 180 in 82237d3
pulsar/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/KubernetesRuntime.java
Lines 327 to 329 in 82237d3
Solution
The TLS piece would be pretty easy to implement with gRPC, but the authentication and authorization might be more challenging. The question might be whether granular permissions are required. If they are, perhaps there would be a read role and a write role?
Alternatives
No response
Anything else?
I am not able to work on this now, but I wanted to expose this as a potential feature to see if others are interested in it.
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: