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
+39-2Lines changed: 39 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,10 +41,14 @@ The TLS Offload Library includes a key creation tool, mhsm_p11_create_key. Runni
41
41
42
42
The key creation tool requires a service principal, which is assigned to the "Managed HSM Crypto User" role at the "/keys" scope.
43
43
44
-
The key creation tool reads the service principal credentials from the environment variables MHSM_CLIENT_ID and MHSM_CLIENT_SECRET.
44
+
The key creation tool reads the service principal credentials from the environment variables MHSM_CLIENT_ID and MHSM_CLIENT_SECRET:
45
45
- MHSM_CLIENT_ID – must be set to the service principal's application (client) ID
46
46
- MHSM_CLIENT_SECRET – must be set to the service principal's password (client secret)
47
47
48
+
For Managed Identities, the environment variables above are not needed.
49
+
- Use the `--identity` argument to enable managed identity with the mhsm_p11_create_key tool.
50
+
- The `client_id` of user-assigned managed identity should be cited in the MHSM configuration file (mhsm-pkcs11.conf). If the `client_id` of a user-assigned managed identity is not provided, it will consider it as system-assigned managed identity.
51
+
48
52
The key creation tool randomly generates a name for the key at the time of creation. The full Azure Key Vault key ID and the key name are printed to the console for your convenience.
49
53
50
54
```azurepowershell
@@ -70,7 +74,7 @@ For more information on Azure Managed HSM local RBAC, see:
70
74
-[Azure Managed HSM local RBAC built-in roles](built-in-roles.md)
71
75
-[Azure Managed HSM role management](role-management.md)
72
76
73
-
The following section describes different approaches to implement access control for the TLS Offload Library service principal.
77
+
The following section describes different approaches to implement access control for the TLS Offload Library service principal and Managed Identity.
74
78
75
79
#### TLS Offload service principal
76
80
@@ -105,6 +109,15 @@ az keyvault role assignment create --hsm-name ContosoMHSM \
To improve the performance of Sign calls to the Managed HSM Service, TLS Offload Library caches its TLS connections to the Managed HSM service servers. By default, TLS Offload Library caches up to 20 TLS connections.
171
+
Connection Caching can be controlled through MHSM configuration file (mhsm-pkcs11.conf).
172
+
173
+
```json
174
+
"ConnectionCache": {
175
+
"Disable": false,
176
+
"MaxConnections": 20
177
+
}
178
+
```
179
+
180
+
**Disable**
181
+
182
+
If this value is true, Connection Caching will be disabled. It is enabled by default.
183
+
184
+
**MaxConnections**
185
+
186
+
Specifies maximum number of connections to cache. The maximum connection limit should be configured based on the number of concurrent PKCS11 sessions being used by the application. Applications typically create a pool of PKCS11 sessions and use them from a pool of threads to generate signing requests in parallel. The MaxConnections should match the number of concurrent signing requests generated by the applications.
187
+
188
+
The Signing Request Per Second (RPS) is dependent on the number of concurrent requests and the number of connections cached. Specifying a higher number or even the default limit will not improve the signing RPS if the number of concurrent PKCS11 Signing requests is lower than this limit.
189
+
The maximum number of concurrent connections to achieve burst mode of Standard B1 HSM pool is about 30 depending on the instance type. But you should try with different numbers to figure out the optimal number concurrent connections.
190
+
191
+
Refer to your application documentation or contact your application vendor to learn more about how the application uses the PKCS11 library.
0 commit comments