Commit af4e661
feat: Add database-managed key rotation and enhanced configuration serialization v1.13.0
This release introduces comprehensive database-managed key rotation capabilities
and fixes critical TOML configuration serialization issues.
## Key Features Added
### Database-Managed Key Rotation System
- Complete PostgreSQL and MySQL support for automated key rotation
- Rotation scheduling with configurable intervals and timestamps
- Background rotation service for automated lifecycle management
- Enhanced rotation detection using database-native time comparisons
- Comprehensive rotation schedule management (update, query, schedule)
- Real-time rotation status tracking and version management
### Enhanced Configuration Serialization
- Fixed Duration serialization to use human-readable TOML format ("30s", "5m", "1h", "1d")
- Fixed UUID serialization compatibility issues by converting to string format
- Enhanced duration parsing supporting multiple formats and plain numbers
- Removed duplicate struct definitions causing serialization conflicts
### Database Statistics Implementation
- Real database statistics queries replacing placeholder implementations
- Comprehensive key counts by status (Active, Retired, Revoked, Expired)
- Database-specific date functions for accurate key age calculations
- Expiration monitoring with 7-day early warning system
- Integration tests for both PostgreSQL and MySQL backends
## Technical Improvements
- Added Clone trait implementation for KeyManager background operations
- Enhanced error handling and logging throughout rotation operations
- Cross-database compatibility with functional equivalence
- Production-ready database queries with proper indexing support
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent fe86bc5 commit af4e661
File tree
6 files changed
+2015
-126
lines changed- src
- encryption
- queue
6 files changed
+2015
-126
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
18 | 38 | | |
19 | 39 | | |
20 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 13 | + | |
17 | 14 | | |
18 | 15 | | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
| 21 | + | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | | - | |
28 | 25 | | |
29 | 26 | | |
30 | 27 | | |
| |||
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | | - | |
| 52 | + | |
56 | 53 | | |
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
60 | 57 | | |
61 | 58 | | |
62 | 59 | | |
63 | | - | |
| 60 | + | |
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
67 | 64 | | |
68 | | - | |
| 65 | + | |
69 | 66 | | |
70 | 67 | | |
71 | 68 | | |
72 | 69 | | |
73 | | - | |
| 70 | + | |
74 | 71 | | |
75 | | - | |
| 72 | + | |
| 73 | + | |
76 | 74 | | |
77 | | - | |
| 75 | + | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
345 | | - | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
| |||
702 | 701 | | |
703 | 702 | | |
704 | 703 | | |
705 | | - | |
706 | | - | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
707 | 712 | | |
708 | 713 | | |
709 | 714 | | |
| |||
768 | 773 | | |
769 | 774 | | |
770 | 775 | | |
771 | | - | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
772 | 781 | | |
773 | 782 | | |
774 | 783 | | |
| |||
0 commit comments