Skip to content

Commit fb5d924

Browse files
Merge pull request #216776 from MicrosoftDocs/release-maa-tpm-v2-ga
Release maa tpm v2 ga changes
2 parents 0d82f21 + 817d4a4 commit fb5d924

9 files changed

+1181
-107
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Azure TPM VBS attestation usage
3+
description: Learn about how to apply TPM and VBS attestation
4+
services: attestation
5+
author: prsriva
6+
ms.service: attestation
7+
ms.topic: overview
8+
ms.date: 09/05/2022
9+
ms.author: prsriva
10+
ms.custom: tpm attestation
11+
---
12+
13+
# Using TPM/VBS attestation
14+
15+
Attestation can be integrated into various applications and services, catering to different use cases. Azure Attestation service, which acts the remote attestation service can be used for desired purposes by updating the attestation policy. The policy engine works as processor, which takes the incoming payload as evidence and performs the validations as authored in the policy. This architecture simplifies the workflow and enables the service owner to purpose build solutions for the varied platforms and use cases.The workflow remains the same as described in [Azure attestation workflow](workflow.md). The attestation policy needs to be crafted as per the validations required.
16+
17+
Attesting a platform has its own challenges with its varied components of boot and setup, one needs to rely on a hardware root-of-trust anchor which can be used to verify the first steps of the boot and extend that trust upwards into every layer on your system. A hardware TPM provides such an anchor for a remote attestation solution. Azure Attestation provides a highly scalable measured boot and runtime integrity measurement attestation solution with a revocation framework to give you full control over platform attestation.
18+
19+
## Attestation steps
20+
21+
Attestation Setup has two setups. One pertaining to the service setup and one pertaining to the client setup.
22+
23+
:::image type="content" source="./media/tpm-attestation-setup.png" alt-text="A diagram that shows the different interactions for attestation." lightbox="./media/tpm-attestation-setup.png":::
24+
25+
Detailed information about the workflow is described in [Azure attestation workflow](workflow.md).
26+
27+
### Service endpoint setup:
28+
This is the first step for any attestation to be performed. Setting up an endpoint, this can be performed either via code or using the Azure portal.
29+
30+
Here's how you can set up an attestation endpoint using Portal
31+
32+
1 Prerequisite: Access to the Microsoft Azure Active Directory(Azure AD) tenant and subscription under which you want to create the attestation endpoint.
33+
Learn more about setting up an [Azure AD tenant](../active-directory/develop/quickstart-create-new-tenant.md).
34+
35+
2 Create an endpoint under the desired resource group, with the desired name.
36+
> [!VIDEO https://www.microsoft.com/en-us/videoplayer/embed/RE5azcU]
37+
38+
3 Add Attestation Contributor Role to the Identity who will be responsible to update the attestation policy.
39+
> [!VIDEO https://www.microsoft.com/en-us/videoplayer/embed/RE5aoRj]
40+
41+
4 Configure the endpoint with the required policy.
42+
> [!VIDEO https://www.microsoft.com/en-us/videoplayer/embed/RE5aoRk]
43+
44+
Sample policies can be found in the [policy section](tpm-attestation-sample-policies.md).
45+
46+
> [!NOTE]
47+
> TPM endpoints are designed to be provisioned without a default attestation policy.
48+
49+
50+
### Client setup:
51+
A client to communicate with the attestation service endpoint needs to ensure it's following the protocol as described in the [protocol documentation](virtualization-based-security-protocol.md). Use the [Attestation Client NuGet](https://www.nuget.org/packages/Microsoft.Attestation.Client) to ease the integration.
52+
53+
1 Prerequisite: An Azure AD identity is needed to access the TPM endpoint.
54+
Learn more [Azure AD identity tokens](../active-directory/develop/v2-overview.md).
55+
56+
2 Add Attestation Reader Role to the identity that will be need for authentication against the endpoint. Azure i
57+
> [!VIDEO https://www.microsoft.com/en-us/videoplayer/embed/RE5aoRi]
58+
59+
60+
## Execute the attestation workflow:
61+
Using the [Client](https://github.com/microsoft/Attestation-Client-Samples) to trigger an attestation flow. A successful attestation will result in an attestation report (encoded JWT token). Parsing the JWT token, the contents of the report can be easily validated against expected outcome.
62+
63+
> [!VIDEO https://www.microsoft.com/en-us/videoplayer/embed/RE5azcT]
64+
65+
66+
Here's a sample of the contents of the attestation report.
67+
:::image type="content" source="./media/sample-decoded-token.jpg" alt-text="Sample snapshot of a decoded token for tpm attestation." lightbox="./media/sample-decoded-token.jpg":::
68+
69+
Using the Open ID [metadata endpoint](/rest/api/attestation/metadata-configuration/get?tabs=HTTP) contains properties, which describe the attestation service.The signing keys describe the keys, which will be used to sign tokens generated by the attestation service. All tokens emitted by the attestation service will be signed by one of the certificates listed in the attestation signing keys.
70+
71+
## Next steps
72+
- [Set up Azure Attestation using PowerShell](quickstart-powershell.md)
73+
- [Attest an SGX enclave using code samples](/samples/browse/?expanded=azure&terms=attestation)
74+
- [Learn more about policy](policy-reference.md)
148 KB
Loading
131 KB
Loading

articles/attestation/policy-examples.md

Lines changed: 1 addition & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Examples of an Azure Attestation policy
2+
title: Examples of an Azure SGX Attestation policy
33
description: Examples of Azure Attestation policy.
44
services: attestation
55
author: msmbaldwin
@@ -80,74 +80,6 @@ eyJhbGciOiJub25lIn0.eyJBdHRlc3RhdGlvblBvbGljeSI6ICJkbVZ5YzJsdmJqMGdNUzR3TzJGMWRH
8080
eyJhbGciOiJSU0EyNTYiLCJ4NWMiOlsiTUlJQzFqQ0NBYjZnQXdJQkFnSUlTUUdEOUVGakJcdTAwMkJZd0RRWUpLb1pJaHZjTkFRRUxCUUF3SWpFZ01CNEdBMVVFQXhNWFFYUjBaWE4wWVhScGIyNURaWEowYVdacFkyRjBaVEF3SGhjTk1qQXhNVEl6TVRneU1EVXpXaGNOTWpFeE1USXpNVGd5TURVeldqQWlNU0F3SGdZRFZRUURFeGRCZEhSbGMzUmhkR2x2YmtObGNuUnBabWxqWVhSbE1EQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURDQ0FRb0NnZ0VCQUpyRWVNSlo3UE01VUJFbThoaUNLRGh6YVA2Y2xYdkhmd0RIUXJ5L3V0L3lHMUFuMGJ3MVU2blNvUEVtY2FyMEc1WmYxTUR4alZOdEF5QjZJWThKLzhaQUd4eFFnVVZsd1dHVmtFelpGWEJVQTdpN1B0NURWQTRWNlx1MDAyQkJnanhTZTBCWVpGYmhOcU5zdHhraUNybjYwVTYwQUU1WFx1MDAyQkE1M1JvZjFUUkNyTXNLbDRQVDRQeXAzUUtNVVlDaW9GU3d6TkFQaU8vTy9cdTAwMkJIcWJIMXprU0taUXh6bm5WUGVyYUFyMX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XhpBt2htbhemDU1X41o8clQgG84aEHCgkE07pR-7IL_Fn2gWuPVC66yxAp00W1ib2L-96q78D9J52HPdeDCSFio2RL7r5lOtz8YkQnjacb6xA
8181
```
8282

83-
## Sample policy for TPM using Policy version 1.0
84-
85-
```
86-
version=1.0;
87-
88-
authorizationrules {
89-
=> permit();
90-
};
91-
92-
issuancerules
93-
{
94-
[type=="aikValidated", value==true]&&
95-
[type=="secureBootEnabled", value==true] &&
96-
[type=="bootDebuggingDisabled", value==true] &&
97-
[type=="vbsEnabled", value==true] &&
98-
[type=="notWinPE", value==true] &&
99-
[type=="notSafeMode", value==true] => issue(type="PlatformAttested", value=true);
100-
};
101-
```
102-
103-
A simple TPM attestation policy that can be used to verify minimal aspects of the boot.
104-
105-
## Sample policy for TPM using Policy version 1.2
106-
107-
```
108-
version=1.2;
109-
110-
configurationrules{
111-
=> issueproperty(type="required_pcr_mask", value=131070);
112-
=> issueproperty(type="require_valid_aik_cert", value=false);
113-
};
114-
115-
authorizationrules {
116-
c:[type == "tpmVersion", issuer=="AttestationService", value==2] => permit();
117-
};
118-
119-
issuancerules{
120-
121-
c:[type == "aikValidated", issuer=="AttestationService"] =>issue(type="aikValidated", value=c.value);
122-
123-
// SecureBoot enabled
124-
c:[type == "events", issuer=="AttestationService"] => add(type = "efiConfigVariables", value = JmesPath(c.value, "Events[?EventTypeString == 'EV_EFI_VARIABLE_DRIVER_CONFIG' && ProcessedData.VariableGuid == '8BE4DF61-93CA-11D2-AA0D-00E098032B8C']"));
125-
c:[type == "efiConfigVariables", issuer=="AttestationPolicy"]=> issue(type = "SecureBootEnabled", value = JsonToClaimValue(JmesPath(c.value, "[?ProcessedData.UnicodeName == 'SecureBoot'] | length(@) == `1` && @[0].ProcessedData.VariableData == 'AQ'")));
126-
![type=="SecureBootEnabled", issuer=="AttestationPolicy"] => issue(type="SecureBootEnabled", value=false);
127-
128-
// Retrieve bool properties Code integrity
129-
c:[type=="events", issuer=="AttestationService"] => add(type="boolProperties", value=JmesPath(c.value, "Events[? EventTypeString == 'EV_EVENT_TAG' && (PcrIndex == `12` || PcrIndex == `13` || PcrIndex == `19` || PcrIndex == `20`)].ProcessedData.EVENT_TRUSTBOUNDARY"));
130-
c:[type=="boolProperties", issuer=="AttestationPolicy"] => add(type="codeIntegrityEnabledSet", value=JsonToClaimValue(JmesPath(c.value, "[*].EVENT_CODEINTEGRITY")));
131-
c:[type=="codeIntegrityEnabledSet", issuer=="AttestationPolicy"] => issue(type="CodeIntegrityEnabled", value=ContainsOnlyValue(c.value, true));
132-
![type=="CodeIntegrityEnabled", issuer=="AttestationPolicy"] => issue(type="CodeIntegrityEnabled", value=false);
133-
134-
// Bitlocker Boot Status, The first non zero measurement or zero.
135-
c:[type=="events", issuer=="AttestationService"] => add(type="srtmDrtmEventPcr", value=JmesPath(c.value, "Events[? EventTypeString == 'EV_EVENT_TAG' && (PcrIndex == `12` || PcrIndex == `19`)].ProcessedData.EVENT_TRUSTBOUNDARY"));
136-
c:[type=="srtmDrtmEventPcr", issuer=="AttestationPolicy"] => add(type="BitlockerStatus", value=JsonToClaimValue(JmesPath(c.value, "[*].EVENT_BITLOCKER_UNLOCK | @[? Value != `0`].Value | @[0]")));
137-
[type=="BitlockerStatus", issuer=="AttestationPolicy"] => issue(type="BitlockerStatus", value=true);
138-
![type=="BitlockerStatus", issuer=="AttestationPolicy"] => issue(type="BitlockerStatus", value=false);
139-
140-
// Elam Driver (windows defender) Loaded
141-
c:[type=="boolProperties", issuer=="AttestationPolicy"] => add(type="elamDriverLoaded", value=JsonToClaimValue(JmesPath(c.value, "[*].EVENT_LOADEDMODULE_AGGREGATION[] | [? EVENT_IMAGEVALIDATED == `true` && (equals_ignore_case(EVENT_FILEPATH, '\\windows\\system32\\drivers\\wdboot.sys') || equals_ignore_case(EVENT_FILEPATH, '\\windows\\system32\\drivers\\wd\\wdboot.sys'))] | @ != `null`")));
142-
[type=="elamDriverLoaded", issuer=="AttestationPolicy"] => issue(type="ELAMDriverLoaded", value=true);
143-
![type=="elamDriverLoaded", issuer=="AttestationPolicy"] => issue(type="ELAMDriverLoaded", value=false);
144-
145-
};
146-
147-
```
148-
149-
The policy uses the TPM version to restrict attestation calls. The issuancerules looks at various properties measured during boot.
150-
15183
## Next steps
15284

15385
- [How to author and sign an attestation policy](author-sign-policy.md)

0 commit comments

Comments
 (0)