Skip to content

cmek split 2/8: TiKV encryption metadata HTTP client (#4571) - #5859

Merged
ti-chi-bot[bot] merged 6 commits into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-4571-to-release-8.5
Aug 2, 2026
Merged

cmek split 2/8: TiKV encryption metadata HTTP client (#4571)#5859
ti-chi-bot[bot] merged 6 commits into
pingcap:release-8.5from
ti-chi-bot:cherry-pick-4571-to-release-8.5

Conversation

@ti-chi-bot

Copy link
Copy Markdown
Member

This is an automated cherry-pick of #4571

What problem does this PR solve?

Issue Number: ref #3943

This is split PR 2/8 from #3955.

What is changed and how it works?

This PR adds TiKV-side encryption metadata retrieval:

  • Add TiKV encryption metadata HTTP client.
  • Add JSON/bytes decoding helpers for metadata payloads.
  • Parse and normalize metadata for keyspace-level encryption usage.
  • Add unit tests for endpoint behavior and decoding logic.

This PR focuses only on metadata retrieval and parsing, and does not yet wire server lifecycle.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Questions

Will it cause performance regression or break compatibility?

No direct user-facing behavior change in this split; it introduces a client used by later PRs.

Do you need to update user documentation, design documentation or monitoring documentation?

No.

Release note

None

Summary by CodeRabbit

  • New Features

    • Added encryption metadata client for TiKV store integration with support for protobuf encoding and HTTP communication with configurable TLS.
  • Tests

    • Added comprehensive test coverage for encryption metadata retrieval, including edge cases, error handling, and protocol validation.

Signed-off-by: tenfyzhong <tenfy@tenfy.cn>
Signed-off-by: tenfyzhong <tenfy@tenfy.cn>
- Remove JSON decoding fallback for encryption meta responses
- Use protobuf directly as the only supported format
- Simplify error handling by removing redundant JSON decode attempts
- Clean up logging by removing response format field
- Update protobuf import to use standard package alias

Signed-off-by: tenfyzhong <tenfy@tenfy.cn>
Signed-off-by: tenfyzhong <tenfy@tenfy.cn>
Signed-off-by: tenfyzhong <tenfy@tenfy.cn>
@ti-chi-bot ti-chi-bot added lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Aug 2, 2026
@ti-chi-bot ti-chi-bot Bot added cherry-pick-approved Cherry pick PR approved by release team. and removed do-not-merge/cherry-pick-not-approved labels Aug 2, 2026
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: df665bfd-4c41-49ab-81b3-69d1020b57d2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ti-chi-bot

ti-chi-bot Bot commented Aug 2, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tenfyzhong

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the approved label Aug 2, 2026
@ti-chi-bot
ti-chi-bot Bot merged commit d2d8414 into pingcap:release-8.5 Aug 2, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants