Skip to content

Add Trusted Launch (non-Confidential-Computing) Secure Key Release example - #40

Open
Eugene Fedorenko (eedorenko) wants to merge 2 commits into
Azure-Samples:mainfrom
eedorenko:samples/skr-trusted-launch-accelerator
Open

Eugene Fedorenko (eedorenko) wants to merge 2 commits into
Azure-Samples:mainfrom
eedorenko:samples/skr-trusted-launch-accelerator

Conversation

@eedorenko

Copy link
Copy Markdown

What

Adds a self-contained, deployable Trusted Launch counterpart to the existing
Deploy-SKRExample.ps1 Confidential VM example in skr-examples/:

  • skr-examples/deploy-skr-trusted-launch.sh — one command deploys a resource group,
    VNet/NSG (SSH locked to the deployer's IP), an Azure Key Vault Premium with two exportable
    HSM-backed keys (one gated on secureboot == true, one pinning a deliberately-bogus PCR to
    demonstrate the deny path), a user-assigned managed identity, and an Ubuntu 24.04 Gen2
    Trusted Launch
    VM (Secure Boot + vTPM). It then builds the canonical
    AzureAttestSKR
    tool on the VM, attests via the vTPM, and exercises both the success case
    (release + unwrap round-trip) and the negative case (AccessDenied). It auto-cleans up.
  • skr-examples/README-trusted-launch.md — CVM-vs-Trusted-Launch comparison, the release
    policy grammar, PCR pinning for production, and troubleshooting.
  • skr-examples/README.md — a short pointer to the new Trusted Launch counterpart.

Why this matters

Secure Key Release is frequently assumed to require Confidential Computing. It does not: SKR is a
feature of Azure Key Vault Premium / Managed HSM that validates a signed Microsoft Azure
Attestation (MAA) token against a key's release policy, independent of compute type. A Trusted
Launch VM is not a Confidential VM, yet its MAA token carries vTPM measured-boot claims
(secureboot, x-ms-azurevm-attested-pcr-values.pcrN) that a release policy can gate on — giving
attestation-gated key release on any Gen2 SKU, at standard cost, with broad region/GPU availability.

Why bash + Azure CLI (the sibling example is PowerShell)

The workflow is entirely Linux-side — it SSHes into an Ubuntu VM and builds/runs a native Linux
attestation tool — so an az CLI + bash driver keeps the whole example in one idiom and runs on
macOS/Linux/WSL without a PowerShell dependency. It complements, rather than replaces, the
PowerShell CVM example. The script is shellcheck-clean and portable back to bash 3.2.

Verification

Deployed and run end-to-end on a real Trusted Launch VM (Gen2, Secure Boot + vTPM):

  • Success: the secureboot-gated key was released to the attested VM and the unwrap round-trip
    recovered the original secret.
  • Negative: the mismatch key (bogus pinned PCR4) returned HTTP 403 / AccessDenied —
    "Target environment attestation does not meet key release requirements."

Notes

  • No secrets or environment-specific identifiers are committed; PCR pins in the docs are
    placeholders (<BASE64_PCR4> / <BASE64_PCR7>) and the mismatch key uses an obviously-bogus
    all-zero-ish value purely to demonstrate the deny path.

🤖 Generated with Claude Code

Adds a self-contained bash + Azure CLI accelerator demonstrating Secure
Key Release to a Trusted Launch VM (Gen2, Secure Boot + vTPM). It proves
SKR is an Azure Key Vault Premium / Managed HSM feature that gates on a
signed Microsoft Azure Attestation token independent of compute type — no
Confidential Computing SKU or quota required.

- skr-examples/deploy-skr-trusted-launch.sh: deploys RG + VNet/NSG + Key
  Vault Premium (two exportable HSM keys — a secureboot==true release
  policy and a deliberately-bogus pinned-PCR mismatch) + user-assigned
  identity + Ubuntu 24.04 Gen2 Trusted Launch VM, builds the canonical
  AzureAttestSKR tool on the VM, and exercises the success case
  (release + unwrap round-trip) and the negative case (AccessDenied);
  auto-cleans up.
- skr-examples/README-trusted-launch.md: CVM-vs-Trusted-Launch
  comparison, release-policy grammar, PCR pinning, troubleshooting.
- skr-examples/README.md: pointer to the Trusted Launch counterpart.

Verified end-to-end on a Trusted Launch VM: the secureboot-gated key
released and round-tripped; the mismatch key returned HTTP 403 /
AccessDenied.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two README edits:

- Remove the "CVM vs. Trusted Launch — what actually differs" section.
  Confidential Computing is an additive protection layer (defends against
  the host/hypervisor), not an either/or alternative to Trusted Launch.
  The removed table implied a "choose one" tradeoff and attributed
  subscription-owner protection to CC's memory encryption — but it is the
  attestation gate and identity authorization (present in both) that
  defend against the subscription owner, not memory encryption.
- In the flow, name the script (deploy-skr-trusted-launch.sh) instead of
  the ambiguous "Script".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@eedorenko

Copy link
Copy Markdown
Author

sgallagherMS Simon Gallagher (@vinfnet) could you please review or assign a reviewer tomorrow this PR?

@vinfnet

Copy link
Copy Markdown
Contributor

Reviewing, thanks

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.

2 participants