Skip to main content

Polaris on Azure

This page explains how Polaris works on Azure and why it is built the way it is. Read Deploying Polaris first for the choices common to every cloud.

To deploy and run your own workload, use the how-to guides, and to look up a size, a permission or a config key, use the Azure reference. The reference also lists what Polaris offers on Azure today and what is still to come.

The shape of a deployment​

A deployment is two confidential VMs in a virtual network of their own, together with a Key Vault and a key that the deployment creates.

  • The workload VM runs your container, with the Polaris proxy in front of it and, when you turn it on, the Sentinel agent beside it.
  • The Policy Manager VM checks the evidence the workload VM sends and decides whether the workload VM's identity keeps access to the key.

The Policy Manager runs on its own VM so that the machine judging the evidence is separate from the machine producing it. It is a confidential VM of the same family as the workload VM, and it has no public address. It reaches the internet through a NAT gateway.

Everything sits in one resource group that the deployment creates and owns. The workload VM has a static public address, which stays when the VM is replaced.

What Azure's hardware proves​

Azure runs Polaris on AMD SEV-SNP or Intel TDX confidential VMs. Both encrypt the VM's memory and have the CPU sign a report about the VM.

On Azure a confidential VM boots under Microsoft's paravisor, and the guest reads the hardware report through the VM's virtual TPM, together with a TPM quote signed by the virtual TPM's attestation key. On SEV-SNP, the Policy Manager checks:

  • that the report's signature chains back to AMD,
  • that the report names a paravisor signing authority on the deployment's allowlist, cloud.azure.id_key_digests, which by default holds the one Microsoft digest the tooling knows,
  • that the attestation key's certificate comes from one of Microsoft's virtual TPM certificate authorities, by the issuer's name,
  • that the AMD firmware is at or above the levels in AMD bulletin AMD-SB-3020.

The report also carries a launch measurement. On Azure the paravisor gives each VM a measurement of its own, so the Policy Manager records it rather than checking it against a fixed value. The allowlist of paravisor signing authorities takes its place. When Microsoft rolls out a new authority, a deploy that can reach the Policy Manager over SSH stops and prints the new digest, and you append it to the list once you have checked the rollout.

On TDX the Policy Manager records the TDX launch measurement without checking it, since there is no allowlist for it yet.

Polaris adds its own layers on top for image integrity, runtime behavior and kernel integrity. See Attestation & Trust Model for the layers. On Azure the runtime and kernel evidence comes from the Sentinel agent, which runs only when features.ebpf is true.

How the Policy Manager knows which VM it is talking to​

Every Azure VM in a deployment has a system-assigned managed identity. With each report, the proxy sends a token for that identity, which it gets from the Azure instance metadata service and which Microsoft signs. The Policy Manager checks:

  • Microsoft's signature on the token, and the tenant and audience it names,
  • that the identity is one of the deployment's workload VM identities, an allowlist the deployment fills in with the workload VM's identity,
  • that Azure assigned the identity to the very VM named in the hardware evidence. The Policy Manager looks the VM up through Azure Resource Graph, using a role that can read VMs in the resource group and nothing else.

The token alone is not bound to the hardware, which is why the last check matters: a token copied from another machine names an identity that Azure did not assign to the attested VM.

How the workload VM recognises its Policy Manager​

On tee.cpu: sev-snp, the workload VM checks the Policy Manager's hardware evidence before it trusts its TLS key: the SNP report under Microsoft's paravisor, Secure Boot, the virtual TPM, and a TPM quote that names the key the Policy Manager presents. It then holds the Policy Manager to its VM ID, which deploy writes to Key Vault, and reads it from there again every five minutes, so it follows a Policy Manager that a run replaced.

On tee.cpu: tdx it does the same with the Policy Manager's Intel TDX quote in place of the SNP report, when the proxy the deployment runs has the Azure TDX check. The first proxy release with it turns this on through the release manifest. With an older proxy, or nothing to say it has the check, the workload VM fetches the Policy Manager's TLS certificate at first boot and keeps it, trusting what answers first, and deploy warns that it does. TDX has no paravisor signing authority in its quote, so the check rests on Intel's signature, Microsoft's certificate for the attestation key and the VM ID, and it records the paravisor's launch measurement rather than checking it, as the Policy Manager does for workload VMs.

deploy also captures an identity record for the Policy Manager, pm-identity-<name>.json, from its hardware evidence, which Polaris Desktop checks the Policy Manager against. The record is captured over SSH through the workload VM, so deploy skips it when cloud.azure.operator_ssh_cidrs is empty.

How your key is gated​

On Azure the key stays in Key Vault, and access to it is an Azure role assignment. Polaris does not use Secure Key Release, and the key never leaves the vault.

The deployment creates a Key Vault on the premium SKU, with Azure RBAC authorization, purge protection and a firewall that admits only the deployment's subnets and the machine that ran deploy. In it is one HSM-backed RSA key.

The Policy Manager holds Role Based Access Control Administrator on that one key, with a condition that lets it create and delete assignments of a single role, Key Vault Crypto User, and create them only for this deployment's workload VM identities. So it can grant only the crypto role the workload needs, and only to the deployment's own workload VMs. While the workload VM passes, the Policy Manager assigns that role on the key to the workload VM's managed identity. When a layer you enforce fails, or the VM stops reporting, it deletes the assignment. Layers in advise report findings without touching it.

The assignment is a real change in Azure, which you can see by listing the role assignments on the key. Azure applies role assignment changes with a delay. The deployment allows up to about five minutes for a new assignment to take effect, and it sets the grant lifetime to 300 seconds for that reason.

Azure gives a role assignment no expiry of its own, and the lifetime is kept by the Policy Manager. Polaris has no equivalent on Azure of the AWS grant retirer, so a Policy Manager that stops or hangs leaves the assignment in place until it runs again. When it starts, it deletes Polaris assignments on the key that it is not tracking.

The deployment creates the key, so the key lives and dies with it. destroy deletes the vault, and Azure keeps it soft-deleted for the retention window, 90 days by default.

How a workload uses the key​

Your workload never holds an Azure credential and cannot reach the instance metadata service. It asks the Polaris proxy in its own VM, over two routes on the proxy's internal listener, to encrypt and decrypt. The proxy calls Key Vault as the workload VM's managed identity, which only the Policy Manager's role assignment lets use the key, so calls fail once the assignment is removed. The routes are in Use the gated key from your workload, and the workload contract says what a revoke ends.

What your clients see when a check fails​

The proxy holds workload traffic when a layer you enforce fails, and serves it otherwise. While traffic is held, new requests receive 503 with a Retry-After: 30 header and a message that ends in attestation pending.

On Azure the proxy has no start-up grace period. It holds traffic from the moment it starts until the first passing verdict.

A set of status routes stays reachable throughout. See Monitor a deployment.

What stays closed​

  • Your workload never holds the VM's Azure identity. The workload container cannot reach the instance metadata service. Only the proxy's container is let through, and the rule is applied again every time Docker restarts.
  • The host cannot reach the workload directly. Traffic from the VM to the workload's network is dropped, so requests reach the workload only through the proxy.
  • Tokens stay out of the VM's configuration. The management, read-only, workload-swap and Sentinel tokens live as Key Vault secrets, and each VM reads them at boot with its own identity.
  • Outbound traffic is limited. Both VMs can reach the internet on ports 443 and 80 and the ranges you list, and nothing else on the internet.
  • Inbound traffic is limited. The endpoint admits the ranges you list, or only the machine that ran deploy when you list none. Ranges as wide as half the internet are refused. SSH opens only to the ranges you list, and the tooling pins each VM's SSH host keys, read from its boot console through the Azure API.
  • Fr0ntierX has no access to your subscription. The deployment makes no role assignment to anyone outside your tenant, and the VMs send no telemetry unless you point the Policy Manager at your own collector.

Learning, then enforcing​

A new deployment starts in an advisory state with empty allowlists, and Polaris fills them by watching the healthy workload.

On Azure the tooling ships every layer in advise. Once learning has finished, promote moves layers to enforce. It reaches the Policy Manager over SSH through the workload VM, so it needs cloud.azure.operator_ssh_cidrs and the SSH host keys deploy pins. The Marketplace template lets you choose an enforcing mode at deploy time instead. See Move a layer to enforce.

The Policy Manager keeps its state on a managed disk of its own, <name>-pm-state, which outlives the Policy Manager VM. What it learned, and the layers you moved to enforce, survive a restart, and a replacement Policy Manager attaches the same disk. It keeps them only while the deployment's baseline file stays the same. The baseline the tooling writes for Azure has a fixed name and date, so a deploy keeps them unless something the baseline names changes, such as the workload image's digest, the workload port or the VM image.

What survives a replacement​

A new workload VM has a new managed identity, which the Policy Manager's configuration names, so replacing the workload VM replaces the Policy Manager too. The Policy Manager's state disk survives, and with it its keys, its record of the workload VMs, what it learned and your promote settings, as long as the baseline is unchanged. The Key Vault, the key and the workload VM's public address stay as well.

What Polaris relies on in your subscription​

Polaris protects your workload from the cloud operator and from a compromised workload. Within your own subscription, it relies on the people who can change role assignments.

  • The identity that deploys keeps Key Vault Crypto Officer on the vault, which lets it use the key directly.
  • The Policy Manager's role can assign Key Vault Crypto User on the key only to this deployment's workload VM identities, so it cannot give the key to anyone else. The condition that limits it is part of a role assignment, so anyone who can change role assignments can change it too.
  • Anyone who can change role assignments on the key, the vault or anything above them can grant access to the key themselves.

A subscription of its own and a short list of people who can change role assignments keep that group small.