[grid] Add config blocked-routes and specific blocked-delete-session in Router#15920
[grid] Add config blocked-routes and specific blocked-delete-session in Router#15920
blocked-routes and specific blocked-delete-session in Router#15920Conversation
PR Code Suggestions ✨No code suggestions found for the PR. |
|
/review |
PR Reviewer Guide 🔍(Review updated until commit 24e5e23)Here are some key observations to aid the review process:
|
…on` in Router Signed-off-by: Viet Nguyen Duc <[email protected]>
|
@pujagani thanks Puja for approval. In the last commit, I added a minor fix for AI review point "Path traversal vulnerability". |
|
/review |
|
Persistent review updated to latest commit 24e5e23 |
User description
🔗 Related Issues
💥 What does this PR do?
1. Add a config to support #15808 (a flag to block session deletion - both on UI and API via route filter).
--blocked-delete-session truewhen starting Router/Hub/Standalone component. (or similar config name in TOML)2. Extend the feature for advanced users are able to define a list of routes to block.
CLI options
TOML configs
In logs, we can monitor the config apply
User who performs method to route path matched will see the response with status 403
From Router logs, we can also monitor how many blocked methods get hit
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
• Add configurable route blocking for Grid components
• Implement specific flag to block session deletion
• Support comma-separated list of blocked routes
• Add comprehensive test coverage for new functionality
Changes walkthrough 📝
5 files
Apply blocked routes filter to HubApply blocked routes filter to StandaloneCreate BlockedRoute model classImplement HTTP request filtering logicApply blocked routes filter to RouterServer3 files
Add CLI flags for route blockingParse blocked routes configurationAdd test build configuration2 files
Test blocked routes filter functionalityTest router options configuration parsing