michaeljmarshall opened a new pull request, #19888:
URL: https://github.com/apache/pulsar/pull/19888

   PIP: #19771  
   
   ### Motivation
   
   In order to make OIDC work with functions, we must give them a way to 
authenticate with the broker using tokens that are able to be validated by an 
using an Authorization Server. This PR introduces the 
`KubernetesServiceAccountAuthProvider`.
   
   ### Modifications
   
   * Create an `KubernetesServiceAccountAuthProvider` implementation. It adds a 
service account token volume projection as defined in the k8s docs 
[here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection).
 The implementation provides a way to specify the expiration time that the 
token will receive.
   
   * Instead of creating a secret with the broker's trusted `ca.crt` in it, 
this new `KubernetesServiceAccountAuthProvider` expects a secret to already 
exist with the `ca.crt`. The major advantage for this implementation is that 
when the `ca.crt` is rotated, we can refresh it (assuming the client is 
configured to observe the updated file).
   
   * One point of divergence from the `KubernetesSecretsTokenAuthProvider` 
implementation is that I did not provide a way for functions to authenticate as 
the anonymous role. It seems like a stretch that functions would use such 
authentication because it will not be multi-tenant. However, if that is a 
concern, we can add the support.
   
   ### Verifying this change
   
   I verified the correctness of the code with unit tests. I'll verify the 
integration with k8s once we've determined this PR's design is correct.
   
   ### Does this pull request potentially affect one of the following parts:
   
   This adds new configuration options to the function worker.
   
   ### Documentation
   
   - [x] `doc-required`
   
   ### Matching PR in forked repository
   
   PR in forked repository: https://github.com/michaeljmarshall/pulsar/pull/36


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to