You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "lhotari (via GitHub)" <gi...@apache.org> on 2026/09/30 00:42:51 UTC
[PR] [fix][txn] Improve transaction admin checks [pulsar]
lhotari opened a new pull request, #26773:
URL: https://github.com/apache/pulsar/pull/26773
### Motivation
The v3 transaction admin endpoints expose two kinds of information: coordinator-wide
data (coordinator list, coordinator stats and internal stats, transaction metadata and
slow transactions), which spans all tenants, and topic-scoped transaction buffer and
pending ack stats. Access checks for these endpoints were not consistent with other admin
endpoints: coordinator-wide reads did not require superuser access and the topic-scoped
stats endpoints only validated topic ownership, not the caller's permission on the topic.
### Modifications
- Require superuser access for the coordinator-wide read endpoints: `listCoordinators`,
`getCoordinatorStats` (all or by id), `getCoordinatorInternalStats`,
`getTransactionMetadata` and `getSlowTransactions`.
- Check the `GET_STATS` topic operation before resolving the topic for the transaction
buffer and pending ack stats endpoints, in the same way as other topic stats endpoints.
Callers with `produce` or `consume` permission on the topic keep access.
- Update `TransactionAndSchemaAuthZTest` to cover the expected access for these endpoints
and remove the related TODOs.
Roles without the required permission now get an authorization error (HTTP 401) from
these endpoints.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change is covered by the updated `TransactionAndSchemaAuthZTest`, which verifies that
coordinator-wide reads are allowed for superusers and rejected for tenant admins and other
roles, and that the topic-scoped transaction stats endpoints require the `GET_STATS` topic
operation.
### Does this pull request potentially affect one of the following parts:
*If the box was checked, please highlight the changes*
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [x] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
--
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
Re: [PR] [fix][txn] Improve transaction admin checks [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #26773:
URL: https://github.com/apache/pulsar/pull/26773
--
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