Skip to content

security: add authorization checks to TransactionHttpHandler#16098

Open
mohammadmseet-hue wants to merge 1 commit intocdapio:developfrom
mohammadmseet-hue:fix/transaction-handler-authorization
Open

security: add authorization checks to TransactionHttpHandler#16098
mohammadmseet-hue wants to merge 1 commit intocdapio:developfrom
mohammadmseet-hue:fix/transaction-handler-authorization

Conversation

@mohammadmseet-hue
Copy link
Copy Markdown

Summary

TransactionHttpHandler exposes 12 transaction management endpoints on the external AppFabric router (port 11015) without any authorization enforcement. Sibling handlers on the same router (ConfigHandler, MonitorHandler) correctly call contextAccessEnforcer.enforce() on every endpoint.

This adds ContextAccessEnforcer checks to all 12 endpoints:

  • GET endpoints → StandardPermission.GET
  • POST endpoints (invalidate, reset, truncate, prune) → StandardPermission.UPDATE

Inconsistency addressed

Handler Operation Auth Check
ConfigHandler GET system config enforce(InstanceId.SELF, GET)
MonitorHandler Restart service enforce(systemServiceId, UPDATE)
TransactionHttpHandler Reset ALL tx state NONE ✗ (before this PR)

Changes

  • Added ContextAccessEnforcer dependency via constructor injection
  • Added enforce() calls to all 12 handler methods
  • Follows the exact same pattern as ConfigHandler and MonitorHandler

TransactionHttpHandler exposes transaction management endpoints on the
external AppFabric port (11015) without any authorization enforcement.
Sibling handlers on the same router (ConfigHandler, MonitorHandler)
correctly use contextAccessEnforcer.enforce() for all operations.

This adds ContextAccessEnforcer checks to all 12 endpoints:
- GET endpoints: StandardPermission.GET
- POST endpoints (invalidate, reset, truncate, prune): StandardPermission.UPDATE

Matches the authorization pattern used by ConfigHandler and
MonitorHandler on the same router binding.
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.

1 participant