You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/key-vault/managed-hsm/tls-offload-library.md
+33-32Lines changed: 33 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ ms.author: mbaldwin
12
12
13
13
# Azure Managed HSM TLS Offload Library
14
14
15
-
Azure Managed HSM offers a TLS Offload library, which is compliant with PKCS#11 version 2.40. We do not support all possible functions listed in the PKCS#11 specification. Our TLS Offload library supports a limited set of mechanisms and interface functions for SSL/TLS Offload with F5 (BigIP) and Nginx only, primarily to generate TLS server certificate keys and generate digital signatures during TLS handshakes.
15
+
Azure Managed HSM offers a TLS Offload library, which is compliant with PKCS#11 version 2.40. We don't support all possible functions listed in the PKCS#11 specification. Our TLS Offload library supports a limited set of mechanisms and interface functions for SSL/TLS Offload with F5 (BigIP) and Nginx only, primarily to generate TLS server certificate keys and generate digital signatures during TLS handshakes.
16
16
17
17
For more information, [Azure Managed HSM TLS Offload Library GitHub](https://github.com/microsoft/AzureManagedHsmTLSOffload).
The --label argument to the key creation tool specifies the desired CKA_LABEL for the private and public keys generated. These attributes are typically required to configure supported TLS Offload solutions (for example, the nginx SSL configuration setting `ssl_certificate_key').
58
+
The `--label` argument to the key creation tool specifies the desired CKA_LABEL for the private and public keys generated. These attributes are typically required to configure supported TLS Offload solutions (for example, the nginx SSL configuration setting `ssl_certificate_key').
59
59
60
-
You'll need the key name for any role assignment changes via the Azure CLI.
60
+
You need the key name for any role assignment changes via the Azure CLI.
61
61
62
62
### Access Control
63
63
@@ -72,28 +72,28 @@ The following section describes different approaches to implement access control
72
72
73
73
#### TLS Offload Service Principal
74
74
75
-
Service Principal used by the application that uses TLS Offload Library to access keys. This Service Principal should have at minimum the following permission via role assignments:
75
+
The TLS Offload Service Principal is used by the application that uses TLS Offload Library to access keys. This Service Principal should have at minimum the following permission via role assignments:
76
76
- KeyRead permission to all the keys in the Managed HSM
77
77
- KeySign permission to the keys necessary for TLS offloading
78
78
79
79
#### Admin User
80
80
81
-
Admin User will create a custom role definition and role assignments. Hence, the Admin User should be assigned to one of the following Built-in roles at the "/" scope:
81
+
The Admin User will create a custom role definition and role assignments. Hence, the Admin User should be assigned to one of the following Built-in roles at the "/" scope:
82
82
- Managed HSM Crypto Officer
83
83
- Managed HSM Policy Administrator
84
84
- Managed HSM Administrator
85
85
86
-
#### Key Generation Service Principal
86
+
#### Key generation service principal
87
87
88
-
Service Principal that will be used with the key creation tool (mhsm_p11_create_key) to generate TLS offload keys. This Service Principal should be assigned to the "Managed HSM Crypto User" role at the "/keys" scope.
88
+
The key generation service principal is used with the key creation tool (mhsm_p11_create_key) to generate TLS offload keys. This Service Principal should be assigned to the "Managed HSM Crypto User" role at the "/keys" scope.
89
89
90
90
#### Azure CLI
91
91
92
92
Azure CLI can be used to perform tasks such as Role Assignment.
93
93
94
94
### Permissive Approach
95
95
96
-
This is a simpler approach and suitable when the Azure Managed HSM is exclusively used for TLS offloading.
96
+
The permissive approach is simpler, and suitable when the Azure Managed HSM is exclusively used for TLS offloading.
97
97
98
98
Assign the Crypto User role to TLS Offload Service Principal at the "/keys" scope. This gives the TLS Offload Service Principal the permission to generate keys and find them for TLS Offloading.
99
99
@@ -106,12 +106,13 @@ az keyvault role assignment create --hsm-name ContosoMHSM \
106
106
107
107
### Granular Approach
108
108
109
-
The granular approach implements fine grained access control and requires two Service Principals (TLS Offload Service Principal and Key Generation Service Principal), and an Admin User.
109
+
The granular approach implements fine grained access control. It requires two Service Principals (TLS Offload Service Principal and Key Generation Service Principal) and an Admin User.
110
110
111
-
The objective is to restrict the TLS Offload Service Principal's permissions to support the minimum required for TLS offload. Concretely this requires the user to have the Read permission for other keys to support the library's C_FindObject* function.
111
+
The objective is to restrict the TLS Offload Service Principal's permissions to support the minimum required for TLS offload. The user must have the Read permission for other keys to support the library's C_FindObject* function.
112
112
113
113
#### TLS Offload Library User Read Role
114
-
The first step in implementing the granular approach requires creating a custom role. This is a one-time operation.
114
+
115
+
The first step in implementing the granular approach is to create a custom role. This is a one-time operation.
115
116
116
117
The Admin User (with Managed HSM Crypto Officer or Managed HSM Administrator or Managed HSM Policy Administrator role) creates a custom "TLS Library User Read Role" role definition:
The --label argument to the key creation tool specifies the desired CKA_LABEL for the private and public keys generated. These attributes are typically required to configure supported TLS Offload solutions (for example, the nginx SSL configuration setting `ssl_certificate_key').
178
+
The `--label` argument to the key creation tool specifies the desired CKA_LABEL for the private and public keys generated. These attributes are typically required to configure supported TLS Offload solutions (for example, the nginx SSL configuration setting `ssl_certificate_key').
178
179
179
-
The key name is required if you are planning to implement granular access to keys.
180
+
The key name is required if you're planning to implement granular access to keys.
180
181
181
-
### How to implement Key Less TLS
182
+
### How to implement keyless TLS
182
183
183
-
There are two approaches to generating a key and using the key for the Key Less TLS. The approaches differ in implementation effort and security enforcement.
184
-
- Simpler, more permissive approach
185
-
- Granular which offers better security
184
+
There are two approaches to generating a key and using the key for the Key Less TLS: a simpler, more permissive approach, and a granular approach, which offers better security. The approaches differ in implementation effort and security enforcement.
186
185
187
-
#### Simpler Permissive Approach
186
+
#### Simpler approach
188
187
189
188
1. Create a Service Principal for the TLS Offload Library (for example, TLSOffload ServicePrincipal)
190
189
2. Assign "Managed HSM Crypto User" role to the TLS Offload Service Principal at the "/keys" scope.
@@ -196,15 +195,15 @@ There are two approaches to generating a key and using the key for the Key Less
196
195
```
197
196
3. Generate key with required label following the steps in [How to generate keys using the TLS Offload Library](#how-to-generate-keys-using-the-tls-offload-library).
198
197
4. Configure the TLS server to use the Managed HSM TLS Offload Library as the PKCS#11 interface library
199
-
5. Configure the TLS server (e.g., the nginx SSL configuration setting `ssl_certificate_key') with the key label and the TLS Offload Service Principal credentials
198
+
5. Configure the TLS server (for example, the nginx SSL configuration setting `ssl_certificate_key') with the key label and the TLS Offload Service Principal credentials
200
199
201
-
#### Granular Approach
200
+
#### Granular approach
202
201
203
-
1. Create an Admin User (e.g., TLSOffloadAdminUser) with the following role:
204
-
a. "Managed HSM Crypto Officer" role at the "/" scope
205
-
1. Create a Key Generation Service Principal (e.g., TLSOffloadKeyGenServicePrincipal) for the TLS Offload Key generation and assign the following role:
206
-
a. "Managed HSM Crypto User" role at the "/keys" scope.
207
-
1. Create a Service Principal for the TLS Offloading (e.g., TLSOffload ServicePrincipal)
202
+
1. Create an Admin User (for example, TLSOffloadAdminUser) with the following role:
203
+
- "Managed HSM Crypto Officer" role at the "/" scope
204
+
1. Create a Key Generation Service Principal (for example, TLSOffloadKeyGenServicePrincipal) for the TLS Offload Key generation and assign the following role:
205
+
- "Managed HSM Crypto User" role at the "/keys" scope.
206
+
1. Create a Service Principal for the TLS Offloading (for example, TLSOffload ServicePrincipal)
208
207
1. The Admin User creates the following custom role definition:
209
208
```azurecli
210
209
az keyvault role definition create --hsm-name ContosoMHSM --role-definition '{ \
@@ -216,12 +215,12 @@ There are two approaches to generating a key and using the key for the Key Less
216
215
"notDataActions": []
217
216
}'
218
217
```
219
-
1. Generate key with required label following "How to generate keys using the TLS Offload Library". Use the Key Generation Service Principal (e.g., TLSOffloadKeyGenServicePrincipal) created above while generating keys. Note down the Key Label and Key Name. E.g.,
220
-
a. Key Label: tlsKey
221
-
b. Key Name: p11-6a2155dc40c94367a0f97ab452dc216f
218
+
1. Generate a key with required label following "How to generate keys using the TLS Offload Library". Use the Key Generation Service Principal (for example, TLSOffloadKeyGenServicePrincipal) while generating keys. Note down the Key Label and Key Name. For example:
219
+
- Key Label: tlsKey
220
+
- Key Name: p11-6a2155dc40c94367a0f97ab452dc216f
222
221
1. Admin User assigns the following roles to the TLS Offload Service Principal
223
-
a. "TLS Library User Read Role" role at the "/keys" scope
224
-
b. "Managed HSM Crypto User" role at the "/keys/{key name}" scope
222
+
- "TLS Library User Read Role" role at the "/keys" scope
223
+
- "Managed HSM Crypto User" role at the "/keys/{key name}" scope
225
224
```azurecli
226
225
az keyvault role assignment create --hsm-name ContosoMHSM \
227
226
--role " TLS Library User Read Role" \
@@ -234,8 +233,10 @@ There are two approaches to generating a key and using the key for the Key Less
1. Configure the TLS server to use the Managed HSM TLS Offload Library as the PKCS#11 interface library
237
-
1. Configure the TLS server (e.g., the nginx SSL configuration setting `ssl_certificate_key') with the key label and the TLS Offload Service Principal credentials
236
+
1. Configure the TLS server (for example, the nginx SSL configuration setting `ssl_certificate_key') with the key label and the TLS Offload Service Principal credentials
238
237
239
238
## Next steps
240
239
241
-
240
+
- [Azure Managed HSM overview](overview.md)
241
+
- [Azure Managed HSM local RBAC built-in roles](built-in-roles.md)
242
+
- [Azure Managed HSM role management](role-management.md)
0 commit comments