-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][fn] enable Go function token auth and TLS #20468
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
[fix][fn] enable Go function token auth and TLS #20468
Conversation
This is the intial checkin of the work on apache#20451, currently supporting org.apache.pulsar.client.impl.auth/AuthenticationToken only.
|
NOTE Unless I missed something there are no unit integration tests for functions that enable auth. The closest I could find was the tests in |
michaeljmarshall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The one detail I see that might be missing for the go function runtime is an ability to configure TLS. Token based auth is recommended to be performed over TLS.
That feature would go in another PR. At the very least, we'll want to document this limitation to make sure users are aware of the current state of go functions.
...ar-functions/runtime/src/test/java/org/apache/pulsar/functions/runtime/RuntimeUtilsTest.java
Outdated
Show resolved
Hide resolved
|
|
|
michaeljmarshall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @flowchartsman! I left one comment, but it's very minor.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20468 +/- ##
============================================
- Coverage 72.95% 72.91% -0.05%
+ Complexity 31914 31907 -7
============================================
Files 1867 1867
Lines 138485 138540 +55
Branches 15202 15208 +6
============================================
- Hits 101037 101014 -23
- Misses 29438 29509 +71
- Partials 8010 8017 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Merging... Thanks for your contribution @flowchartsman! |
Note: there were conflicts with the go.sum file. In order to get things working, I cleared out the conflicts and then ran `go mod tidy` in the `pulsar-funcion-go/examples` directory. Co-authored-by: Andy Walker <andy@andy.dev> (cherry picked from commit 8b3c085)
Co-authored-by: Andy Walker <andy@andy.dev> (cherry picked from commit 8b3c085)
Fixes #20451
Motivation
Go functions die when auth is turned on. I would like them to not die.
Modifications
Added transport of auth plugin and auth plugin params to go instance config.
Added parsing of these values into the pf sdk
Verifying this change
Cannot integration test functions with authDoes this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
docdoc-requireddoc-not-neededdoc-completeNo doc change needed, because the docs don't mention the exception, so now the intuitive assumption holds.
Matching PR in forked repository
PR in forked repository: flowchartsman#6