Skip to content

Add custom inbox prefix support for JS pull subscribe #419

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

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

alparslanavci
Copy link
Contributor

@alparslanavci alparslanavci commented Feb 14, 2023

With #276, custom inbox prefix support is added to core NATS features, but not JS. This PR addresses this issue.

This is an important problem since it affects authorization permissions. If the user cannot specify a custom inbox prefix, the user's messages can be received by the non-authorized users who subscribed to the default inbox subject.

@alparslanavci alparslanavci changed the title Added custom inbox prefix support for JS pull subscribe Add custom inbox prefix support for JS pull subscribe Feb 14, 2023
Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

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

LGTM

@wallyqs wallyqs merged commit b51f391 into nats-io:main Jun 1, 2023
@casix
Copy link

casix commented Jun 2, 2023

Maybe I'm late but why do not use the inbox_prefix defined in the client class when the connection is created as a default?

@jmlentijo
Copy link

jmlentijo commented Jun 6, 2023

Yes, because if the user doesn't has permission to subscribe for the default inbox_prefix (_INBOX.>) we will have a "Violation permissions" error when we try to get the consumer info at this line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants