-
Notifications
You must be signed in to change notification settings - Fork 61
cmek split 6/8: eventstore encrypted persistence #4573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
c7b64fe
feat(eventstore): support encrypted persisted events
tenfyzhong 9aafb69
feat(eventstore): remove encryption error logging
tenfyzhong f55924a
eventstore: reorder write branches for fast path
tenfyzhong c1020d0
eventstore: refactor write value preparation
tenfyzhong dcb834c
Revert "eventstore: refactor write value preparation"
tenfyzhong c5d957a
eventstore,encryption: frame plaintext encryption-layer values
tenfyzhong 2d9068e
eventstore,encryption: preserve legacy framed value reads
tenfyzhong 70b86b4
eventstore: restore encryption-layer key metadata
tenfyzhong b11a330
Merge remote-tracking branch 'origin/master' into split/pr3955-06-eve…
tenfyzhong c973a71
eventstore: deduplicate writeEvents encoding
tenfyzhong a2d8300
eventstore: widen encryption-layer key mask
tenfyzhong 33733ad
eventstore: simplify key attribute encoding
tenfyzhong b776bef
eventstore: clarify key field offsets
tenfyzhong 3da9b73
fix(eventstore): Correct diagram alignment in format.go
tenfyzhong 67be557
eventstore: clarify key field lengths
tenfyzhong 38af250
eventstore: move key layout comment
tenfyzhong 3f3e359
encryption: tighten encryption layer decoding
tenfyzhong 3fa8a5b
eventstore: clarify key boundary lengths
tenfyzhong ab781e5
logservice: remove unused eventstore raw value return
tenfyzhong a43786a
pkg/encryption: remove decode panic tests
tenfyzhong 14d624b
Merge branch 'master' into split/pr3955-06-eventstore
tenfyzhong 9ba7503
Merge branch 'master' into split/pr3955-06-eventstore
tenfyzhong 78b971f
tests: move debezium_basic to heavy integration tests
tenfyzhong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: pingcap/ticdc
Length of output: 20144
🏁 Script executed:
Repository: pingcap/ticdc
Length of output: 1966
Keyspace ID mismatch in subscription reuse allows decryption to fail and panic.
The reuse logic in
RegisterDispatcher(lines 509–566) matches existing subscriptions only byTableIDand span containment, ignoringKeyspaceID. This allows a dispatcher to attach to asubStatwith a differentKeyspaceID.When this happens:
subStat.tableSpan.KeyspaceID(subscription's keyspace)stat.keyspaceID(dispatcher's keyspace)If the keyspaces differ,
DecryptDatafails and the iterator panics at line 1527. The test only covers the matching case, leaving this silently exploitable in production withEnableDataSharingenabled.Fix either by:
subStatwith differentKeyspaceID, orsubStat.tableSpan.KeyspaceID) to match the write side.🤖 Prompt for AI Agents