Skip to content

Grace period fix - #11

Open
saranggalada wants to merge 1 commit into
mainfrom
sarang/grace-period
Open

Grace period fix#11
saranggalada wants to merge 1 commit into
mainfrom
sarang/grace-period

Conversation

@saranggalada

@saranggalada saranggalada commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Azure private-key fetch now appends all=true to the KMS /key URL so a service caches every non-expired key, not just the latest.

Why

When keys rotate weekly as per the Refresh Keys workflow, there will be a key mismatch window which may last up to the duration of the CCR services' private-key cache interval (i.e. 3h). To prevent this, a grace period is introduced with a time period as set in the Key Rotation Policy, which allows all services to continue using the previous key during the rotation window while also transitioning to the newly rotated key. This ensures that a service launched during the grace period can fetch and cache both the previous and new private keys, allowing it to decrypt traffic encrypted with either key.

Change

CreateHttpRequest (TEE and non-TEE) appends ?all=true or &all=true to PRIMARY_COORDINATOR_PRIVATE_KEY_ENDPOINT. Parsing, per-key unwrap via /unwrapKey, and cache insert were already multi-key-capable.

No change to AWS/GCP fetchers.

Behavior

  • No all / no kid: latest key only (unchanged).
  • all=true (no kid, fmt=tink): all keys with now < creationTime + rotation_interval_seconds (currently 31 days).
  • Explicit kid: that key only (unchanged).
  • Expired keys (isExpired / expiryTimeMs) are skipped.

Compatibility

In order for this to work, the Azure KMS repo must implement the equivalent fix to include the updated API call to return all valid private keys. (See PR #68)

Note: Only the DEPA Private Inferencing Key Management Service (KMS) versions>=1.1.0 contain the required fix for the grace period.

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