Skip to content

guest-agent: derive GetKey keys under a selected KMS root epoch - #1521

Closed
kvinwang wants to merge 4 commits into
kms-guest-disk-epochsfrom
kms-getkey-root-epoch
Closed

kvinwang wants to merge 4 commits into
kms-guest-disk-epochsfrom
kms-getkey-root-epoch

Conversation

@kvinwang

@kvinwang kvinwang commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Part 4 of the KMS root key rotation stack (design: #1516). Based on #1520.

  • Guest API v1 GetKey takes an optional root_epoch (unset = current) and returns the epoch it used, so apps can recover keys derived before a rotation.
  • The agent fetches an older epoch's app root from the KMS by number on first use (CertRequestClient::get_app_key) and keeps it in memory.
  • SDKs: Rust get_key_at_root_epoch, Go GetKeyAtRootEpoch, Python root_epoch=, JS rootEpoch. Responses carry root_epoch.

Env migration is coming in a separate SealedEnv PR.

Rebased onto the direct-attestation key-retrieval stack. Historical key requests reuse the pinned KMS client; no temporary-CA protocol is required.

@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from 8da22da to 11871f4 Compare November 6, 2026 13:14
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from 11871f4 to 3a85db5 Compare November 6, 2026 13:28
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch 2 times, most recently from d2d41f0 to b290770 Compare November 6, 2026 14:55
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch 2 times, most recently from d9aa0e4 to f598471 Compare November 6, 2026 15:02
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from f598471 to 7532e2a Compare November 6, 2026 15:09
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from 7532e2a to b76d262 Compare November 6, 2026 15:13
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch 2 times, most recently from 4455b9a to b047e1b Compare November 7, 2026 03:30
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from b047e1b to 80a58ee Compare November 7, 2026 03:40
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from 80a58ee to df99469 Compare November 7, 2026 03:58
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from df99469 to ef19968 Compare November 7, 2026 04:04
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from ef19968 to e4c281a Compare November 7, 2026 04:11
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from 60b75a2 to b252c50 Compare November 7, 2026 15:21
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from b252c50 to 8ee4900 Compare November 7, 2026 15:25
@kvinwang
kvinwang added this pull request to stack #1531 November 7, 2026 15:27
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from 8ee4900 to 17e8f6f Compare November 8, 2026 01:41
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from 17e8f6f to a87d31b Compare November 8, 2026 01:44
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from a87d31b to 09849d9 Compare November 8, 2026 02:21
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch 2 times, most recently from 00be909 to f67797d Compare November 8, 2026 03:34
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from f67797d to 3bb10c2 Compare November 8, 2026 07:25
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from 3bb10c2 to 732131d Compare November 8, 2026 09:21
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from 732131d to a0c967c Compare November 8, 2026 14:13
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from a0c967c to 675f562 Compare November 8, 2026 14:14
GetKey takes an optional root_epoch (unset = current) and reports the epoch
it used, so apps can recover keys derived before a root rotation. The agent
fetches an older epoch's app root from the KMS by number on first use and
keeps it in memory.

The Rust, Go, Python, and JS SDKs expose the selector and the returned
epoch.

Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang force-pushed the kms-getkey-root-epoch branch from 675f562 to 067897d Compare November 8, 2026 15:10
@kvinwang kvinwang closed this Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant