Skip to content

[fix][broker] Pass subName for subscription operations in ServerCnx - #19184

Merged
michaeljmarshall merged 1 commit into
apache:masterfrom
michaeljmarshall:fix-subscription
Jan 11, 2023
Merged

[fix][broker] Pass subName for subscription operations in ServerCnx#19184
michaeljmarshall merged 1 commit into
apache:masterfrom
michaeljmarshall:fix-subscription

Conversation

@michaeljmarshall

Copy link
Copy Markdown
Member

Motivation

When a DLQ producer connects, it creates a subscription when configured to do so. The subscriptionName should be passed to the authorizationProvider to properly determine authorization.

Modifications

  • Pass initialSubscriptionName to isTopicOperationAllowed method in the ServerCnx.

Verifying this change

I am going to work on generic tests to cover this case (and some others) when I do #19183.

Does this pull request potentially affect one of the following parts:

This is not a breaking change.

Documentation

  • doc-not-needed

This only impacts users that have subscription level permissions, which are not well documented. We should improve those docs eventually, but there is no need to fix those docs while making this fix.

Matching PR in forked repository

PR in forked repository: michaeljmarshall#11

@michaeljmarshall michaeljmarshall added type/bug The PR fixed a bug or issue reported a bug release/2.11.1 area/authz labels Jan 11, 2023
@michaeljmarshall michaeljmarshall added this to the 2.12.0 milestone Jan 11, 2023
@michaeljmarshall michaeljmarshall self-assigned this Jan 11, 2023
@michaeljmarshall michaeljmarshall changed the title [fix][broker] Always pass subName for subscription operations [fix][broker] Pass subName for subscription operations in ServerCnx Jan 11, 2023

@eolivelli eolivelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@nicoloboschi nicoloboschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice catch!

@michaeljmarshall
michaeljmarshall merged commit d96af0a into apache:master Jan 11, 2023
michaeljmarshall added a commit that referenced this pull request Jan 11, 2023
…19184)

### Motivation

When a DLQ producer connects, it creates a subscription when configured to do so. The `subscriptionName` should be passed to the `authorizationProvider` to properly determine authorization.

### Modifications

* Pass `initialSubscriptionName` to `isTopicOperationAllowed` method in the `ServerCnx`.

### Verifying this change

I am going to work on generic tests to cover this case (and some others) when I do #19183.

### Does this pull request potentially affect one of the following parts:

This is not a breaking change.

### Documentation

- [x] `doc-not-needed`

This only impacts users that have subscription level permissions, which are not well documented. We should improve those docs eventually, but there is no need to fix those docs while making this fix.

### Matching PR in forked repository

PR in forked repository: michaeljmarshall#11

(cherry picked from commit d96af0a)
michaeljmarshall added a commit that referenced this pull request Jan 11, 2023
…19184)

### Motivation

When a DLQ producer connects, it creates a subscription when configured to do so. The `subscriptionName` should be passed to the `authorizationProvider` to properly determine authorization.

### Modifications

* Pass `initialSubscriptionName` to `isTopicOperationAllowed` method in the `ServerCnx`.

### Verifying this change

I am going to work on generic tests to cover this case (and some others) when I do #19183.

### Does this pull request potentially affect one of the following parts:

This is not a breaking change.

### Documentation

- [x] `doc-not-needed`

This only impacts users that have subscription level permissions, which are not well documented. We should improve those docs eventually, but there is no need to fix those docs while making this fix.

### Matching PR in forked repository

PR in forked repository: michaeljmarshall#11

(cherry picked from commit d96af0a)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jan 16, 2023
…pache#19184)

### Motivation

When a DLQ producer connects, it creates a subscription when configured to do so. The `subscriptionName` should be passed to the `authorizationProvider` to properly determine authorization.

### Modifications

* Pass `initialSubscriptionName` to `isTopicOperationAllowed` method in the `ServerCnx`.

### Verifying this change

I am going to work on generic tests to cover this case (and some others) when I do apache#19183.

### Does this pull request potentially affect one of the following parts:

This is not a breaking change.

### Documentation

- [x] `doc-not-needed`

This only impacts users that have subscription level permissions, which are not well documented. We should improve those docs eventually, but there is no need to fix those docs while making this fix.

### Matching PR in forked repository

PR in forked repository: michaeljmarshall#11

(cherry picked from commit d96af0a)
(cherry picked from commit 775d5ad)
@michaeljmarshall
michaeljmarshall deleted the fix-subscription branch January 23, 2023 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants