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
@@ -180,9 +180,9 @@ The `tls` field enables TLS encryption for the connection and optionally specifi
180
180
| Field | Description | Required |
181
181
| ----- | ----------- | -------- |
182
182
| tlsEnabled | A boolean value that indicates whether TLS encryption is enabled or not. It must be set to true for Event Hubs communication. | Yes |
183
-
| caConfigMap | The name of the config map that contains the CA certificate for verifying the server's identity. This field isn't required for Event Hubs communication, as Event Hubs uses well-known CAs that are trusted by default. However, you can use this field if you want to use a custom CA certificate. | No |
183
+
| trustedCaCertificateConfigMap | The name of the config map that contains the CA certificate for verifying the server's identity. This field isn't required for Event Hubs communication, as Event Hubs uses well-known CAs that are trusted by default. However, you can use this field if you want to use a custom CA certificate. | No |
184
184
185
-
When specifying a trusted CA is required, create a ConfigMap containing the public potion of the CA in PEM format, and specify the name in the `caConfigMap` property.
185
+
When specifying a trusted CA is required, create a ConfigMap containing the public potion of the CA in PEM format, and specify the name in the `trustedCaCertificateConfigMap` property.
@@ -201,36 +201,114 @@ The authentication field supports different types of authentication methods, suc
201
201
202
202
| Field | Description | Required |
203
203
| ----- | ----------- | -------- |
204
-
| sasl | The configuration for SASL authentication. Specify the `saslType`, which can be *plain*, *scram-sha-256*, or *scram-sha-512*, and the `secretName` to reference the Kubernetes secret containing the username and password. | Yes, if using SASL authentication |
205
-
| x509 | The configuration for X509 authentication. Specify the `secretName` field. The `secretName` field is the name of the secret that contains the client certificate and the client key in PEM format, stored as a TLS secret. | Yes, if using X509 authentication |
204
+
| sasl | The configuration for SASL authentication. Specify the `saslType`, which can be *plain*, *scramSha256*, or *scramSha512*, and `token` to reference the Kubernetes `secretName` or Azure Key Vault `keyVault` secret containing the password. | Yes, if using SASL authentication |
206
205
| systemAssignedManagedIdentity | The configuration for managed identity authentication. Specify the audience for the token request, which must match the Event Hubs namespace (`https://<NAMESPACE>.servicebus.windows.net`) [because the connector is a Kafka client](/azure/event-hubs/authenticate-application). A system-assigned managed identity is automatically created and assigned to the connector when it's enabled. | Yes, if using managed identity authentication |
206
+
| x509 | The configuration for X509 authentication. Specify the `secretName` or `keyVault` field. The `secretName` field is the name of the secret that contains the client certificate and the client key in PEM format, stored as a TLS secret. | Yes, if using X509 authentication |
207
207
208
-
You can use Azure Key Vault to manage secrets for Azure IoT MQ instead of Kubernetes secrets. To learn more, see [Manage secrets using Azure Key Vault or Kubernetes secrets](../manage-mqtt-connectivity/howto-manage-secrets.md).
208
+
To learn how to use Azure Key Vault and the `keyVault` to manage secrets for Azure IoT MQ instead of Kubernetes secrets, see [Manage secrets using Azure Key Vault or Kubernetes secrets](../manage-mqtt-connectivity/howto-manage-secrets.md).
209
209
210
-
For Event Hubs, use plain SASL and `$ConnectionString` as the username and the full connection string as the password.
210
+
##### Authenticate to Event Hubs
211
+
212
+
To connect to Event Hubs using a connection string and Kubernetes secret, use `plain` SASL type and `$ConnectionString` as the username and the full connection string as the password. First create the Kubernetes secret:
To use Azure Key Vault instead of Kubernetes secrets, create an Azure Key Vault secret with the connection string `Endpoint=sb://..`, reference it with `vaultSecret`, and specify the username as `"$ConnectionString"` in the configuration.
233
+
234
+
```yaml
235
+
authentication:
236
+
enabled: true
237
+
authType:
238
+
sasl:
239
+
saslType: plain
240
+
token:
241
+
keyVault:
242
+
username: "$ConnectionString"
243
+
vault:
244
+
name: my-key-vault
245
+
directoryId: <AKV directory ID>
246
+
credentials:
247
+
servicePrincipalLocalSecretName: aio-akv-sp
248
+
vaultSecret:
249
+
name: my-cs # Endpoint=sb://..
250
+
# version: 939ecc2...
251
+
```
252
+
253
+
To use managed identity, specify it as the only method under authentication. You also need to assign a role to the managed identity that grants permission to send and receive messages from Event Hubs, such as Azure Event Hubs Data Owner or Azure Event Hubs Data Sender/Receiver. To learn more, see [Authenticate an application with Microsoft Entra ID to access Event Hubs resources](/azure/event-hubs/authenticate-application#built-in-roles-for-azure-event-hubs).
To use managed identity, specify it as the only method under authentication. You also need to assign a role to the managed identity that grants permission to send and receive messages from Event Hubs, such as Azure Event Hubs Data Owner or Azure Event Hubs Data Sender/Receiver. To learn more, see [Authenticate an application with Microsoft Entra ID to access Event Hubs resources](/azure/event-hubs/authenticate-application#built-in-roles-for-azure-event-hubs).
To use Azure Key Vault instead, make sure the [certificate and private key are properly imported](../../key-vault/certificates/tutorial-import-certificate.md) and then specify the reference with `vaultCert`.
284
+
285
+
```yaml
286
+
authentication:
287
+
enabled: true
288
+
authType:
289
+
x509:
290
+
keyVault:
291
+
vault:
292
+
name: my-key-vault
293
+
directoryId: <AKV directory ID>
294
+
credentials:
295
+
servicePrincipalLocalSecretName: aio-akv-sp
296
+
vaultCert:
297
+
name: my-cert
298
+
# version: 939ecc2...
299
+
## If presenting full chain also
300
+
# vaultCaChainSecret:
301
+
# name: my-chain
302
+
```
303
+
304
+
Or, if presenting the full chain is required, upload the full chain cert and key to AKV as a PFX file and use the `vaultCaChainSecret` field instead.
Copy file name to clipboardExpand all lines: articles/iot-operations/manage-mqtt-connectivity/howto-manage-secrets.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.subservice: mq
8
8
ms.topic: how-to
9
9
ms.custom:
10
10
- ignite-2023
11
-
ms.date: 11/15/2023
11
+
ms.date: 01/16/2024
12
12
13
13
#CustomerIntent: As an operator, I want to configure IoT MQ to use Azure Key Vault or Kubernetes secrets so that I can securely manage secrets.
14
14
---
@@ -55,15 +55,16 @@ The `keyVault` field is available wherever Kubernetes secrets (`secretName`) are
55
55
| vaultCert | Yes, when using Key Vault certificates | Specifies the certificate in the Azure Key Vault. |
56
56
| vaultCert.name | Yes | Specifies the name of the certificate secret. |
57
57
| vaultCert.version | No | Specifies the version of the certificate secret. |
58
-
| vaultCaChainCert | Yes, when using certificate chain | Specifies the certificate chain in the Azure Key Vault. |
59
-
| vaultCaChainCert.name | Yes | Specifies the name of the certificate chain. |
60
-
| vaultCaChainCert.version | No | Specifies the version of the certificate chain. |
58
+
| vaultCaChainSecret | Yes, when using certificate chain | Specifies the certificate chain in the Azure Key Vault. |
59
+
| vaultCaChainSecret.name | Yes | Specifies the name of the certificate chain. |
60
+
| vaultCaChainSecret.version | No | Specifies the version of the certificate chain. |
61
+
| username | No | Used only for Event Hubs Kafka connector, see [Send and receive messages between Azure IoT MQ and Event Hubs or Kafka](../connect-to-cloud/howto-configure-kafka.md). |
61
62
62
63
The type of secret you're using determines which of the following fields you can use:
63
64
64
65
- `vaultSecret`: Use this field when you're using a regular secret. For example, you can use this field for configuring a *BrokerAuthentication* resource with the `usernamePassword` field.
65
66
- `vaultCert`: Use this field when you're using the certificate type secret with client certificate and key. For example, you can use this field for enabling TLS on a *BrokerListener*.
66
-
- `vaultCaChainCert`: Use this field when you're using a regular Key Vault secret that contains the CA chain of the client certificate. This field is for when you need IoT MQ to present the CA chain of the client certificate to a remote connection. For example, you can use this field for configuring a *MqttBridgeConnector* resource with the `remoteBrokerConnection` field.
67
+
- `vaultCaChainSecret`: Use this field when you need to present a full certificate chain, with all extra intermediate or root certificates, to the remote server. For example, you can use this field for configuring a *MqttBridgeConnector* resource with the `remoteBrokerConnection` field. To use this field, import X.509 certificates without private keys in PEM format as a multi-line regular secret (not certificate-type) to Key Vault. This field should be used in addition to `vaultCert` that has the client certificate and private key.
67
68
68
69
## Examples
69
70
@@ -89,7 +90,7 @@ spec:
89
90
servicePrincipalLocalSecretName: aio-akv-sp
90
91
vaultCert:
91
92
name: my-server-certificate
92
-
version: latest
93
+
# version: 939ecc2...
93
94
```
94
95
95
96
This next example shows how to use Azure Key Vault for the `usernamePassword` field in a BrokerAuthentication resource:
@@ -113,7 +114,7 @@ spec:
113
114
servicePrincipalLocalSecretName: aio-akv-sp
114
115
vaultSecret:
115
116
name: my-username-password-db
116
-
version: latest
117
+
# version: 939ecc2...
117
118
```
118
119
119
120
This example shows how to use Azure Key Vault for MQTT bridge remote broker credentials:
0 commit comments