Skip to content

Commit 7737fe3

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-security-docs-pr into wi-552241-batch-2-defender-for-containers
2 parents a0b2ae1 + 2c0a61a commit 7737fe3

132 files changed

Lines changed: 2491 additions & 968 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.openpublishing.redirection.defender-for-cloud.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,11 @@
574574
"source_path_from_root": "/articles/defender-for-cloud/monitor-connected-aws-resources.md",
575575
"redirect_url": "/azure/defender-for-cloud/quickstart-onboard-aws#validate-connector-health",
576576
"redirect_document_id": false
577+
},
578+
{
579+
"source_path_from_root": "/articles/defender-for-cloud/deploy-vulnerability-assessment-vm.md",
580+
"redirect_url": "/azure/defender-for-cloud/deploy-vulnerability-assessment-defender-vulnerability-management",
581+
"redirect_document_id": false
577582
}
578583
]
579584
}

articles/attestation/tpm-attestation-sample-policies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ c:[type=="srtmDrtmEventPcr", issuer=="AttestationPolicy"] => add(type="Bitlocker
7171
[type=="BitlockerStatus", issuer=="AttestationPolicy"] => issue(type="BitlockerStatus", value=true);
7272
![type=="BitlockerStatus", issuer=="AttestationPolicy"] => issue(type="BitlockerStatus", value=false);
7373
74-
// Elam Driver (windows defender) Loaded
74+
// Elam Driver (Microsoft Defender) Loaded
7575
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`")));
7676
[type=="elamDriverLoaded", issuer=="AttestationPolicy"] => issue(type="ELAMDriverLoaded", value=true);
7777
![type=="elamDriverLoaded", issuer=="AttestationPolicy"] => issue(type="ELAMDriverLoaded", value=false);

articles/cloud-hsm/authentication.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,17 @@ When you use an OpenSSL engine for Azure Cloud HSM, environmental variables supp
6868

6969
```sh
7070
export azcloudhsm_password="cu1:user1234"
71-
export azcloudhsm_openssl_conf=/usr/local/bin/AzureCloudHSM-ClientSDK-1.0.4.0/azcloudhsm_openssl_dynamic.conf
72-
export LD_LIBRARY_PATH=/usr/local/lib64/AzureCloudHSM-ClientSDK-1.0.4.0/:$LD_LIBRARY_PATH
71+
export azcloudhsm_openssl_conf=/opt/azurecloudhsm/bin/azcloudhsm_openssl_dynamic.conf
72+
export LD_LIBRARY_PATH=/opt/azurecloudhsm/lib64/:$LD_LIBRARY_PATH
7373
7474
sudo ./azcloudhsm_client azcloudhsm_client.cfg > /dev/null 2>&1 &
7575
openssl genpkey -algorithm RSA -out private_key.pem -engine azcloudhsm_openssl
7676
7777
```
7878

79+
> [!NOTE]
80+
> Update the paths to match your installed SDK version. The default installation path is `/opt/azurecloudhsm/`. For the latest SDK, see the [Azure Cloud HSM SDK releases](https://github.com/microsoft/MicrosoftAzureCloudHSM/releases).
81+
7982
For authentication details with OpenSSL, consult the [guide for integrating OpenSSL with Azure Cloud HSM](https://github.com/microsoft/MicrosoftAzureCloudHSM/blob/main/IntegrationGuides/Azure%20Cloud%20HSM%20OpenSSL%20Integration%20Guide.pdf).
8083

8184
## Multithreading techniques

articles/cloud-hsm/faq.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ sections:
1919
2020
Azure Cloud HSM supports various applications, including PKCS#11, offloading of Secure Sockets Layer (SSL) or Transport Layer Security (TLS) processing, certificate authority (CA) private key protection, and transparent data encryption (TDE). It also supports document and code signing.
2121
22-
Azure Cloud HSM provides high availability and redundancy by grouping multiple HSMs into a cluster and automatically synchronizing across three HSM instances. The HSM cluster supports load balancing of cryptographic operations. Periodic HSM backups help ensure secure and simple data recovery. For more information, see [What is Azure Cloud HSM?](overview.md).
22+
Azure Cloud HSM provides high availability and redundancy by grouping multiple HSMs into a cluster and automatically synchronizing across three HSM nodes. The HSM cluster supports load balancing of cryptographic operations. Periodic HSM backups help ensure secure and simple data recovery. For more information, see [What is Azure Cloud HSM?](overview.md).
2323
- question: |-
2424
What is an HSM?
2525
answer: |-

articles/cloud-hsm/key-management.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ To avoid exceeding Azure Cloud HSM service limits, consider using one or more of
2828
> [!NOTE]
2929
> Wait 24 hours after you create a key to ensure that synchronization and backups within your Azure Cloud HSM deployment are complete.
3030
31+
> [!CAUTION]
32+
> If a key exists on only one node and that node fails without a backup, you can be permanently locked out of your encrypted data with no recovery option. Always verify that keys are synchronized across all nodes and maintain regular backups.
33+
>
34+
> When creating users, it is the customer's responsibility to ensure users are present on all nodes of the Azure Cloud HSM cluster. For more information, see [Ensure your HSM users are available on all nodes of your cluster](user-management.md#ensure-your-hsm-users-are-available-on-all-nodes-of-your-cluster). For steps on synchronizing missing keys, see [Synchronize users and keys across Azure Cloud HSM nodes](synchronize-users-keys.md).
35+
3136
## Manage key wrapping
3237

3338
You use the `EXTRACTABLE` attribute in Azure Cloud HSM to mark keys as either extractable or nonextractable. By default, HSM keys are set as extractable. You can export extractable keys from the HSM through key wrapping, which encrypts the keys. The keys then require unwrapping via the same wrapping key before use.

articles/cloud-hsm/onboarding-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.author: keithp
1313

1414
# Azure Cloud HSM onboarding guide
1515

16-
Microsoft Azure Cloud HSM provides dedicated, FIPS 140-2 Level 3 validated hardware security modules (HSMs) for customers who require high levels of cryptographic key security. To help new users get started, Microsoft published a comprehensive onboarding guide that outlines the steps for provisioning, configuring, and using Azure Cloud HSM effectively.
16+
Microsoft Azure Cloud HSM provides dedicated, FIPS 140-3 Level 3 validated hardware security modules (HSMs) for customers who require high levels of cryptographic key security. To help new users get started, Microsoft published a comprehensive onboarding guide that outlines the steps for provisioning, configuring, and using Azure Cloud HSM effectively.
1717

1818
The onboarding guide is available as a PDF. It includes detailed instructions, best practices, and prerequisites for a smooth setup process. You can access the full guide here: [Microsoft Azure Cloud HSM Onboarding Guide](https://github.com/microsoft/MicrosoftAzureCloudHSM/blob/main/OnboardingGuides/Azure%20Cloud%20HSM%20Onboarding.pdf).
1919

articles/cloud-hsm/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ Azure Cloud HSM supports various applications, including PKCS#11, offloading of
2424

2525
### Fully managed solution
2626

27-
Many customers require administrative control of their HSM but don't want the overhead and ancillary costs that come with cluster management for high availability, patching, and maintenance. Azure Cloud HSM customers have secure, direct, end-to-end encrypted access to their HSM instances in their HSM cluster over a private, dedicated link from their virtual network.
27+
Many customers require administrative control of their HSM but don't want the overhead and ancillary costs that come with cluster management for high availability, patching, and maintenance. Azure Cloud HSM customers have secure, direct, end-to-end encrypted access to HSM nodes in their HSM cluster over a private, dedicated link from their virtual network.
2828

2929
After a customer provisions an Azure Cloud HSM cluster, the customer maintains administrative access to their HSMs. The Azure Cloud HSM service takes care of high availability, patching, and maintenance.
3030

3131
### Customer-owned, highly available, single-tenant HSM as a service
3232

33-
Azure Cloud HSM provides high availability and redundancy by grouping multiple HSMs into an HSM cluster. The service automatically synchronizes keys and policies across each HSM instance.
33+
Azure Cloud HSM provides high availability and redundancy by grouping multiple HSMs into an HSM cluster. The service automatically synchronizes keys and policies across each HSM node.
3434

35-
Each HSM cluster consists of three HSM partitions. If an HSM resource becomes unavailable, member partitions for your HSM cluster are automatically and securely migrated to healthy nodes.
35+
Each HSM cluster consists of three HSM nodes. If an HSM resource becomes unavailable, member nodes for your HSM cluster are automatically and securely migrated to healthy nodes.
3636

3737
The Azure Cloud HSM cluster supports load balancing of cryptographic operations. Periodic HSM backups help ensure secure and simple data recovery.
3838

articles/cloud-hsm/secure-cloud-hsm.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Authentication is a crucial aspect of securely accessing and operating within Az
8989

9090
## Business continuity and disaster recovery
9191

92-
- **Implement robust backup and disaster recovery**: Azure Cloud HSM provides high availability through clustered HSMs that synchronize keys and policies while automatically migrating partitions during failures. The service supports comprehensive backup and restore operations that preserve all keys, attributes, and role assignments. Backups are secured by HSM-derived keys that Microsoft can't access.
92+
- **Implement robust backup and disaster recovery**: Azure Cloud HSM provides high availability through clustered HSMs that synchronize keys and policies while automatically migrating workloads during failures. The service supports comprehensive backup and restore operations that preserve all keys, attributes, and role assignments. Backups are secured by HSM-derived keys that Microsoft can't access.
9393

9494
For business continuity and disaster recovery (BCDR):
9595

@@ -103,6 +103,8 @@ Authentication is a crucial aspect of securely accessing and operating within Az
103103
104104
For detailed implementation instructions and additional recovery options, see [Backup and restore in Azure Cloud HSM](backup-restore.md). Additional recovery options include using `extractMaskedObject` to extract keys as encrypted blobs, storing them securely, and importing them with `insertMaskedObject` as needed. A BCDR best practice is to deploy in two regions for failover capability.
105105

106+
- **Verify user and key synchronization across all nodes**: Azure Cloud HSM operates as a cluster of three nodes. During service events such as self-healing or upgrades, users or keys might not be replicated to all nodes. If you experience intermittent authentication or operation failures, verify that all users and keys exist on every node. For verification and remediation steps, see [Synchronize users and keys across Azure Cloud HSM nodes](synchronize-users-keys.md).
107+
106108
## Related content
107109

108110
- [Security best practices for IaaS workloads in Azure](/azure/security/fundamentals/iaas)
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
---
2+
title: Synchronize users and keys across Azure Cloud HSM nodes
3+
description: Learn how to identify and fix missing users or keys across Azure Cloud HSM cluster nodes.
4+
author: keithp
5+
manager: davinune
6+
ms.service: azure-cloud-hsm
7+
ms.topic: how-to
8+
ms.date: 03/20/2025
9+
ms.author: keithp
10+
---
11+
12+
# Synchronize users and keys across Azure Cloud HSM nodes
13+
14+
This article explains how to identify and resolve synchronization issues when users or keys are missing from one or more nodes in your Azure Cloud HSM cluster.
15+
16+
## Overview
17+
18+
In some cases, users or keys might not be replicated to all nodes in your Azure Cloud HSM cluster. This can occur during service events such as self-healing or upgrades, or if creation fails on one or more nodes. If you're experiencing intermittent authentication failures or cryptographic operation errors, you might have users or keys that need to be synchronized.
19+
20+
> [!IMPORTANT]
21+
> A user or key that exists on only one node is at risk of permanent, unrecoverable loss if that node fails. If you identify missing users or keys, synchronize them immediately and ensure you have current backups.
22+
23+
## Prerequisites
24+
25+
- Access to a VM with the Azure Cloud HSM SDK installed
26+
- The `azcloudhsm_mgmt_util` tool
27+
- Cryptography officer (CO) credentials for your Azure Cloud HSM deployment
28+
29+
## User synchronization
30+
31+
All users in Azure Cloud HSM are fully managed by the customer. The service doesn't perform backend user synchronization if user creation fails. If user creation fails on one or more nodes, you must manually synchronize the user to the missing nodes.
32+
33+
> [!IMPORTANT]
34+
> Ensure that all users are consistently created and present across every node in the cluster. If a user is missing or creation fails on any node, you must execute the required commands and perform validation steps to restore consistency.
35+
36+
### Identify missing users
37+
38+
1. Start the management utility:
39+
40+
```bash
41+
./azcloudhsm_mgmt_util ./azcloudhsm_resource.cfg
42+
```
43+
44+
1. Run the `listUsers` command to display the User ID, User Type, and Username under each node (server 0, 1, 2):
45+
46+
```bash
47+
listUsers
48+
```
49+
50+
1. Observe the number of users found for each node and corresponding usernames. Compare the lists across all three servers to identify any missing users.
51+
52+
### Synchronize missing users
53+
54+
1. Sign in as a cryptography officer (CO):
55+
56+
```bash
57+
loginHSM CO admin <adminPassword>
58+
```
59+
60+
Verify that you successfully signed in to all three nodes:
61+
62+
```output
63+
loginHSM success on server 0
64+
loginHSM success on server 1
65+
loginHSM success on server 2
66+
```
67+
68+
> [!NOTE]
69+
> If sign-in fails on any node, the sync operation might fail. Ensure successful sign-in to all nodes before proceeding.
70+
71+
1. Identify the source node that has the user. In this example, server 0 has a user that's not available on server 1 and server 2:
72+
73+
```bash
74+
server 0
75+
```
76+
77+
1. Run the `syncUser` command for each server where the user is missing. Replace `<UserID>` with the actual User ID:
78+
79+
```bash
80+
syncUser <UserID> 1
81+
syncUser <UserID> 2
82+
```
83+
84+
> [!NOTE]
85+
> If `syncUser` is executed against a node where the user already exists, the error message "user already created, unable to insert object" appears. If the user doesn't exist, the operation succeeds.
86+
87+
### Validate user synchronization
88+
89+
1. Exit the current server context:
90+
91+
```bash
92+
exit
93+
```
94+
95+
1. Run `listUsers` to confirm that all User IDs, User Types, and Usernames are now equal and available under each node (server 0, 1, 2):
96+
97+
```bash
98+
listUsers
99+
```
100+
101+
## Key synchronization
102+
103+
When you create keys, it's your responsibility to ensure keys are present on all nodes. Although Azure Cloud HSM supports service-side key synchronization and restore operations, you must verify that keys are available on any missing nodes before use.
104+
105+
> [!IMPORTANT]
106+
> If a key is missing or creation fails on any node, you must execute the appropriate commands and perform validation steps to restore consistency. A key that exists on only one node is at risk of permanent loss if that node fails.
107+
108+
### Identify missing keys
109+
110+
1. Start the management utility:
111+
112+
```bash
113+
./azcloudhsm_mgmt_util ./azcloudhsm_resource.cfg
114+
```
115+
116+
1. Sign in as a cryptography officer (CO):
117+
118+
```bash
119+
loginHSM CO admin <adminPassword>
120+
```
121+
122+
Verify that you successfully signed in to all three nodes:
123+
124+
```output
125+
loginHSM success on server 0
126+
loginHSM success on server 1
127+
loginHSM success on server 2
128+
```
129+
130+
1. Run the `findAllKeys` command to display the number of keys and key handle IDs under each node:
131+
132+
```bash
133+
findAllKeys 0 0
134+
```
135+
136+
1. Observe the number of keys found for each node and corresponding key handle IDs. Compare the results across all three servers to identify any missing keys.
137+
138+
### Synchronize missing keys
139+
140+
1. Identify the source node that has the key. In this example, server 0 has a key handle that's not available on server 1 and server 2:
141+
142+
```bash
143+
server 0
144+
```
145+
146+
1. Run the `syncKey` command for each server where the key is missing. Replace `<KeyHandle>` with the actual key handle ID:
147+
148+
```bash
149+
syncKey <KeyHandle> 1
150+
syncKey <KeyHandle> 2
151+
```
152+
153+
For example, to synchronize key handle 262150 to servers 1 and 2:
154+
155+
```bash
156+
syncKey 262150 1
157+
syncKey 262150 2
158+
```
159+
160+
### Validate key synchronization
161+
162+
1. Exit the current server context:
163+
164+
```bash
165+
exit
166+
```
167+
168+
1. Run `findAllKeys 0 0` to confirm that all key handles and the number of keys found are now equal and available under each node (server 0, 1, 2):
169+
170+
```bash
171+
findAllKeys 0 0
172+
```
173+
174+
## Best practices
175+
176+
To prevent synchronization issues and potential data loss:
177+
178+
- **Verify after creation**: After creating any user or key, immediately verify that it exists on all three nodes.
179+
- **Maintain regular backups**: Use the [backup and restore](backup-restore.md) functionality to protect against node failures.
180+
- **Monitor for discrepancies**: Periodically run `listUsers` and `findAllKeys 0 0` to check for inconsistencies across nodes.
181+
- **Act quickly on failures**: If you notice a user or key creation failure, synchronize it to the missing nodes before a node failure occurs.
182+
183+
## Related content
184+
185+
- [Troubleshoot Azure Cloud HSM](troubleshoot.md)
186+
- [User management in Azure Cloud HSM](user-management.md)
187+
- [Key management in Azure Cloud HSM](key-management.md)
188+
- [Backup and restore in Azure Cloud HSM](backup-restore.md)

articles/cloud-hsm/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ items:
2525
href: onboarding-guide.md
2626
- name: Azure Cloud HSM Integration Guides
2727
href: integration-guides.md
28+
- name: Synchronize users and keys across nodes
29+
href: synchronize-users-keys.md
2830
- name: Security and best practices
2931
items:
3032
- name: Secure your Cloud HSM

0 commit comments

Comments
 (0)