[feat][proxy] PIP 97: Implement for ProxyConnection#19292
Merged
michaeljmarshall merged 6 commits intoapache:masterfrom Feb 1, 2023
Merged
[feat][proxy] PIP 97: Implement for ProxyConnection#19292michaeljmarshall merged 6 commits intoapache:masterfrom
michaeljmarshall merged 6 commits intoapache:masterfrom
Conversation
ac3d94d to
6db2232
Compare
This was referenced Jan 20, 2023
Member
Author
eolivelli
requested changes
Jan 25, 2023
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnection.java
Outdated
Show resolved
Hide resolved
| remoteAddress, authMethod); | ||
| } | ||
| state = State.Connecting; | ||
| } catch (Exception e) { |
Contributor
There was a problem hiding this comment.
why do we catch blindly "Exception" here ?
Member
Author
There was a problem hiding this comment.
I wrote it this way because we are in a callback and if we miss the exception, we will leak the connection forever. If we think we should only catch more specific exceptions, I can update it to catch AuthenticationExcpetion and RuntimeException.
eolivelli
reviewed
Jan 25, 2023
pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyAuthenticationTest.java
Show resolved
Hide resolved
Member
Author
|
The last commit is effectively present in this PR: #19331. I wanted that one to get it's own review since it complicates this PR. Once that is merged, it'll be out of the diff in this PR. |
eolivelli
approved these changes
Jan 26, 2023
nodece
approved these changes
Jan 29, 2023
michaeljmarshall
added a commit
to michaeljmarshall/pulsar
that referenced
this pull request
Apr 19, 2023
PIP: apache#12105 Implement asynchronous auth for the proxy connection. This is one of the core PRs for implementing apache#12105. * Update `ProxyConnection` class to asynchronously handle the authentication result. The result is handled on the handler's event loop to ensure correctness. * Update `ProxyAuthenticationTest` class to implement async auth methods and to make authentication asynchronous to test that code path. There is an updated test, but it doesn't cover all code paths in this PR. - [x] `doc-not-needed` We do not need to document this portion of PIP 97. PR in forked repository: #16 (cherry picked from commit fa6af43)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PIP: #12105
Motivation
Implement asynchronous auth for the proxy connection. This is one of the core PRs for implementing #12105.
Modifications
ProxyConnectionclass to asynchronously handle the authentication result. The result is handled on the handler's event loop to ensure correctness.ProxyAuthenticationTestclass to implement async auth methods and to make authentication asynchronous to test that code path.Verifying this change
There is an updated test, but it doesn't cover all code paths in this PR.
Documentation
doc-not-neededWe do not need to document this portion of PIP 97.
Matching PR in forked repository
PR in forked repository: michaeljmarshall#16