suvodeep-pyne opened a new pull request, #16723:
URL: https://github.com/apache/pinot/pull/16723
## Summary
This PR refactors the audit logging URL exclusion mechanism to use Java's
PathMatcher with glob pattern support instead of simple string matching with
limited wildcards.
### Key Changes:
- **Replaced simple wildcard matching** with PathMatcher-based glob patterns
for more powerful URL filtering
- **Introduced `AuditUrlPathFilter`** - A new stateless, thread-safe
component for URL path filtering
- **Updated configuration property** from `excluded.endpoints` to
`url.filter.exclude.patterns`
- **Removed URL matching logic from `AuditConfigManager`** to maintain
single responsibility principle
- **Added comprehensive unit tests** with 36 test cases covering all glob
pattern features
### Features Supported:
- Wildcards: `*` (within path segment), `**` (across path segments), `?`
(single character)
- Character sets: `[abc]`, `[a-z]`, `[!abc]`
- Regex patterns: `regex:api/v[0-9]+/.*`
- Multiple patterns: Comma-separated list like `health,api/*,admin/**`
### Example Patterns:
- `health` - Exact match
- `api/*` - Matches `api/users` but not `api/v1/users`
- `api/**` - Matches `api/users` and `api/v1/users`
- `api/v[12]/users` - Matches `api/v1/users` and `api/v2/users`
### Limitations:
- Grouping patterns with commas (e.g., `{users,groups}`) are not supported
due to conflict with comma-separated configuration format
## Test Plan
- Added `AuditUrlPathFilterTest` with 36 comprehensive test cases
- All existing tests updated and passing
- Tested various glob patterns including wildcards, character sets, and
regex patterns
- Verified error handling for invalid patterns
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]