Skip to content

Conversation

@massakam
Copy link
Contributor

…hen subscription_auth_mode is Prefix

Motivation

When subscription_auth_mode is Prefix, a consumer which use a subscription name that does NOT start with the auth role name hangs up forever without error.

cf. #899

Modifications

The cause of this issue is that ServerCnx is not handling the exception that is thrown if the subscription name is incorrect.
I have modified ServerCnx to catch the exception and return an error to the client.

Result

If an incorrect subscription name is specified, subscribing will immediately fail.

@massakam massakam self-assigned this Feb 20, 2018
@massakam massakam added the type/bug The PR fixed a bug or issue reported a bug label Feb 20, 2018
@massakam massakam added this to the 1.22.0-incubating milestone Feb 20, 2018
Copy link
Contributor

@jai1 jai1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests for this

@massakam
Copy link
Contributor Author

@jai1 I have added the tests.

Copy link
Contributor

@jai1 jai1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - once merged can you please backport the fix

Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@merlimat merlimat merged commit de06bd4 into apache:master Feb 20, 2018
merlimat pushed a commit that referenced this pull request Feb 20, 2018
#1256)

* Fix bug that consumer which specify incorrect subscription hangs up when subscription_auth_mode is Prefix

* Add test for subscription prefix authorization
@merlimat
Copy link
Contributor

@jai1 Backported into 1.22

@massakam
Copy link
Contributor Author

Thank you for backporting!

@massakam massakam deleted the fix-sub-auth-mode branch February 21, 2018 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants