You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "michaeljmarshall (via GitHub)" <gi...@apache.org> on 2023/01/23 20:53:52 UTC
[GitHub] [pulsar] michaeljmarshall opened a new pull request, #19312: [improve][broker] ServerCnx: go to Failed state when auth fails
michaeljmarshall opened a new pull request, #19312:
URL: https://github.com/apache/pulsar/pull/19312
PIP: #12105
### Motivation
When authentication fails in the `ServerCnx`, the state is left in `Start` if the primary `authData` fails authentication and in `Connecting` or `Connected` if the `originalAuthData` authentication fails. To prevent any kind of unexpected behavior, we should go to `Failed` state.
### Modifications
* Update `ServerCnx` state to `Failed` when there is an authentication exception.
### Verifying this change
A new test is added. The added test covers the change made in https://github.com/apache/pulsar/pull/19295 where we updated `ServerCnx` so that we call `AuthState#authenticate` instead of relying on the implementation detail that the initialization calls `authenticate`. That PR should have added a test.
### Does this pull request potentially affect one of the following parts:
This is not a breaking change.
### Documentation
- [x] `doc-not-needed`
### Matching PR in forked repository
PR in forked repository: https://github.com/michaeljmarshall/pulsar/pull/18
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] lhotari commented on pull request #19312: [improve][broker] ServerCnx: go to Failed state when auth fails
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #19312:
URL: https://github.com/apache/pulsar/pull/19312#issuecomment-1401490800
/pulsarbot rerun-failure-checks
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] michaeljmarshall commented on pull request #19312: [improve][broker] ServerCnx: go to Failed state when auth fails
Posted by "michaeljmarshall (via GitHub)" <gi...@apache.org>.
michaeljmarshall commented on PR #19312:
URL: https://github.com/apache/pulsar/pull/19312#issuecomment-1447179771
I cherry picked this because it added some important tests that other important bug fixes relied on.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] michaeljmarshall merged pull request #19312: [improve][broker] ServerCnx: go to Failed state when auth fails
Posted by "michaeljmarshall (via GitHub)" <gi...@apache.org>.
michaeljmarshall merged PR #19312:
URL: https://github.com/apache/pulsar/pull/19312
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] codecov-commenter commented on pull request #19312: [improve][broker] ServerCnx: go to Failed state when auth fails
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19312:
URL: https://github.com/apache/pulsar/pull/19312#issuecomment-1402914203
# [Codecov](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19312](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6fecb6f) into [master](https://codecov.io/gh/apache/pulsar/commit/8d813927288a2bb4fb4806f4b0034152d5f5b5d3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8d81392) will **decrease** coverage by `0.44%`.
> The diff coverage is `91.17%`.
[](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #19312 +/- ##
============================================
- Coverage 63.93% 63.49% -0.44%
- Complexity 3470 25900 +22430
============================================
Files 1818 1818
Lines 133061 133079 +18
Branches 14637 14637
============================================
- Hits 85067 84499 -568
- Misses 40270 40818 +548
- Partials 7724 7762 +38
```
| Flag | Coverage Δ | |
|---|---|---|
| inttests | `24.88% <0.00%> (-0.07%)` | :arrow_down: |
| systests | `25.62% <8.82%> (-0.08%)` | :arrow_down: |
| unittests | `60.85% <91.17%> (-0.46%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...va/org/apache/pulsar/broker/service/ServerCnx.java](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1NlcnZlckNueC5qYXZh) | `52.98% <72.72%> (-1.94%)` | :arrow_down: |
| [...er/authentication/OneStageAuthenticationState.java](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3B1bHNhci9icm9rZXIvYXV0aGVudGljYXRpb24vT25lU3RhZ2VBdXRoZW50aWNhdGlvblN0YXRlLmphdmE=) | `100.00% <100.00%> (ø)` | |
| [...ain/java/org/apache/pulsar/broker/rest/Topics.java](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9yZXN0L1RvcGljcy5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...apache/pulsar/broker/web/ProcessHandlerFilter.java](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci93ZWIvUHJvY2Vzc0hhbmRsZXJGaWx0ZXIuamF2YQ==) | `0.00% <0.00%> (-83.34%)` | :arrow_down: |
| [...apache/pulsar/broker/web/MaxRequestSizeFilter.java](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci93ZWIvTWF4UmVxdWVzdFNpemVGaWx0ZXIuamF2YQ==) | `0.00% <0.00%> (-82.36%)` | :arrow_down: |
| [.../pulsar/broker/rest/RestMessagePublishContext.java](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9yZXN0L1Jlc3RNZXNzYWdlUHVibGlzaENvbnRleHQuamF2YQ==) | `0.00% <0.00%> (-77.78%)` | :arrow_down: |
| [...pache/pulsar/broker/tools/GenerateDocsCommand.java](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci90b29scy9HZW5lcmF0ZURvY3NDb21tYW5kLmphdmE=) | `0.00% <0.00%> (-77.28%)` | :arrow_down: |
| [...apache/pulsar/websocket/data/ProducerMessages.java](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLXdlYnNvY2tldC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL3dlYnNvY2tldC9kYXRhL1Byb2R1Y2VyTWVzc2FnZXMuamF2YQ==) | `0.00% <0.00%> (-75.00%)` | :arrow_down: |
| [.../pulsar/broker/service/SharedConsumerAssignor.java](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1NoYXJlZENvbnN1bWVyQXNzaWdub3IuamF2YQ==) | `5.55% <0.00%> (-74.08%)` | :arrow_down: |
| [...ava/org/apache/pulsar/broker/tools/BrokerTool.java](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci90b29scy9Ccm9rZXJUb29sLmphdmE=) | `0.00% <0.00%> (-71.43%)` | :arrow_down: |
| ... and [196 more](https://codecov.io/gh/apache/pulsar/pull/19312?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] michaeljmarshall commented on pull request #19312: [improve][broker] ServerCnx: go to Failed state when auth fails
Posted by "michaeljmarshall (via GitHub)" <gi...@apache.org>.
michaeljmarshall commented on PR #19312:
URL: https://github.com/apache/pulsar/pull/19312#issuecomment-1402828068
Great suggestion @nicoloboschi. I updated this PR since it fits well within the scope. I also extended the tests to cover this part of the protocol.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org