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

   Fixes #8425
   
   ### Motivation
   
   Currently the Java and Python pulsar functions can access secrets that are 
set when functions are installed, but not pulsar functions written in Go.
   
   ### Modifications
   
    - The pulsar function runtime code has been updated so that 
`secretsProviderClassName` and `secretsProviderConfig` are passed to Go pulsar 
functions.
    - The default `secretsProviderClassName` for Go functions has been set to 
`ClearTextSecretsProvider`
    - Go pulsar function start-up has been updated to setup the secrets 
provider.
    - A new Go method `GetSecretValue` has been added to the `FunctionContext` 
type so that a pulsar function can retrieve secrets.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
    - A pulsar function runtime unit test has been updated to ensure that 
`secretsProviderClassName` and `secretsProviderConfig` are passed to the Go 
function.
    - New Go unit tests have been written to test the `GetValue` method for the 
two Go `SecretsProvider` implementations
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [x] The public API
   
   A new Go method `GetSecretValue` has been added to the FunctionContext type.
   
   - [ ] The schema
   - [x] The default values of configurations
   
   The default `secretsProviderClassName` for Go functions has been set to 
`ClearTextSecretsProvider`
   
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [x] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   Pulsar-site changes here: https://github.com/apache/pulsar-site/pull/903
   
   ### Matching PR in forked repository
   
   PR in forked repository: [<!-- ENTER URL HERE 
-->](https://github.com/DavidRayner/pulsar/pull/3)
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions 
will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since 
the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed 
in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments 
have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
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