Skip to content

[improve][txn] Cleanup how superusers abort txns#19976

Merged
michaeljmarshall merged 4 commits intoapache:masterfrom
michaeljmarshall:cleanup-txn-authz
Apr 6, 2023
Merged

[improve][txn] Cleanup how superusers abort txns#19976
michaeljmarshall merged 4 commits intoapache:masterfrom
michaeljmarshall:cleanup-txn-authz

Conversation

@michaeljmarshall
Copy link
Copy Markdown
Member

@michaeljmarshall michaeljmarshall commented Mar 31, 2023

Motivation

This PR builds on #19467. When we modify/abort transactions, we need to make sure that authorization is checked for both the proxy and the client.

Modifications

  • Add a second authorization check when originalPrincipal is set in the ServerCnx.
  • Fix a bug where we were not doing a deep copy of the SubscriptionsList object. (Tests caught this bug!)

Verifying this change

Added a new test to cover some of the changes.

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

This is an internal change.

Documentation

  • doc-not-needed

Matching PR in forked repository

PR in forked repository: michaeljmarshall#38

@michaeljmarshall
Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

@michaeljmarshall
Copy link
Copy Markdown
Member Author

@Technoboy- - I just discovered that this PR will fix a regression introduced by #19467. Once this is ready to go (hopefully today), I will cherry pick it to branch-2.11.

@Technoboy-
Copy link
Copy Markdown
Contributor

@Technoboy- - I just discovered that this PR will fix a regression introduced by #19467. Once this is ready to go (hopefully today), I will cherry pick it to branch-2.11.

Ok

@michaeljmarshall michaeljmarshall merged commit f76beda into apache:master Apr 6, 2023
@michaeljmarshall michaeljmarshall deleted the cleanup-txn-authz branch April 6, 2023 05:59
michaeljmarshall added a commit that referenced this pull request Apr 6, 2023
This PR builds on #19467. When we modify/abort transactions, we need to make sure that authorization is checked for both the proxy and the client.

* Add a second authorization check when `originalPrincipal` is set in the `ServerCnx`.
* Fix a bug where we were not doing a deep copy of the `SubscriptionsList` object. (Tests caught this bug!)

Added a new test to cover some of the changes.

This is an internal change.

- [x] `doc-not-needed`

PR in forked repository: michaeljmarshall#38

(cherry picked from commit f76beda)
@michaeljmarshall
Copy link
Copy Markdown
Member Author

I cherry picked to 2.11 and verified that some of the relevant tests pass.

I will cherry pick to 2.10 tomorrow. There are some conflicts I need to work through.

michaeljmarshall added a commit that referenced this pull request Apr 7, 2023
This PR builds on #19467. When we modify/abort transactions, we need to make sure that authorization is checked for both the proxy and the client.

* Add a second authorization check when `originalPrincipal` is set in the `ServerCnx`.
* Fix a bug where we were not doing a deep copy of the `SubscriptionsList` object. (Tests caught this bug!)

Added a new test to cover some of the changes.

This is an internal change.

- [x] `doc-not-needed`

PR in forked repository: michaeljmarshall#38

(cherry picked from commit f76beda)
(cherry picked from commit 5a180f78d7636537198a758e1c9416e58d80bf42)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request May 11, 2023
This PR builds on apache#19467. When we modify/abort transactions, we need to make sure that authorization is checked for both the proxy and the client.

* Add a second authorization check when `originalPrincipal` is set in the `ServerCnx`.
* Fix a bug where we were not doing a deep copy of the `SubscriptionsList` object. (Tests caught this bug!)

Added a new test to cover some of the changes.

This is an internal change.

- [x] `doc-not-needed`

PR in forked repository: michaeljmarshall#38

(cherry picked from commit f76beda)
(cherry picked from commit 5a180f78d7636537198a758e1c9416e58d80bf42)
(cherry picked from commit 716db37)
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.

4 participants