Commit a2d4964
committed
feat: Add security features, test infrastructure, and modular binlog processing
This commit introduces critical security enhancements, comprehensive test reorganization,
and modular binlog event processing architecture.
Major changes:
- Security: Add rate limiting (token bucket algorithm), connection limits, and network ACL with fail-closed defaults
- Architecture: Refactor binlog processing into modular parser/processor/evaluator components
- Testing: Reorganize test suite with focused, granular test files for better maintainability
- CI/CD: Add develop branch CI workflow with build and format checking
- Documentation: Update configuration docs with detailed security guidance (EN/JA)
Security enhancements:
- Rate limiting per client IP with configurable burst/refill (disabled by default)
- TCP max_connections limit to prevent file descriptor exhaustion
- Network ACL now denies all by default (fail-closed) - requires explicit allow_cidrs
- Security-focused test coverage for ACL, dump operations, and connection limits
Binlog refactoring:
- Split binlog_reader into event_parser, event_processor, and filter_evaluator
- Improve separation of concerns and testability
- Enhanced GTID tracking and cancellation handling
Test infrastructure improvements:
- Split monolithic test files into focused units (basic, advanced, search, batch, etc.)
- Add integration tests for end-to-end workflows and stress testing
- Comprehensive coverage for HTTP/TCP servers, MySQL binlog, and cache operations
- New tests: deadlock detection, rate limiting, security boundaries
Configuration changes:
- Add api.tcp.max_connections (default: 10000)
- Add api.rate_limiting.{enable,capacity,refill_rate,max_clients}
- Change network.allow_cidrs default behavior to deny-by-default for security
- Update example configs with security-focused defaults (127.0.0.1/32)1 parent fdb9f83 commit a2d4964
File tree
74 files changed
+12163
-2914
lines changed- .github/workflows
- docs
- en
- ja
- examples
- src
- config
- mysql
- query
- server
- storage
- utils
- tests
- cache
- client
- config
- index
- integration
- cache
- server
- mysql
- server
- storage
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
74 files changed
+12163
-2914
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | | - | |
| 105 | + | |
| 106 | + | |
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
| |||
479 | 485 | | |
480 | 486 | | |
481 | 487 | | |
| 488 | + | |
482 | 489 | | |
483 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
484 | 503 | | |
485 | 504 | | |
486 | 505 | | |
| |||
502 | 521 | | |
503 | 522 | | |
504 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
505 | 565 | | |
506 | 566 | | |
507 | | - | |
| 567 | + | |
508 | 568 | | |
509 | | - | |
| 569 | + | |
510 | 570 | | |
511 | | - | |
| 571 | + | |
512 | 572 | | |
513 | | - | |
514 | | - | |
| 573 | + | |
| 574 | + | |
515 | 575 | | |
516 | 576 | | |
517 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
518 | 599 | | |
519 | 600 | | |
520 | 601 | | |
521 | | - | |
522 | | - | |
523 | | - | |
| 602 | + | |
524 | 603 | | |
525 | 604 | | |
526 | 605 | | |
527 | 606 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
534 | 614 | | |
535 | 615 | | |
536 | 616 | | |
| |||
0 commit comments