Skip to content

Commit 9164da9

Browse files
committed
ADR integration with X.509
1 parent 8812a6b commit 9164da9

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

articles/iot-operations/manage-mqtt-broker/howto-configure-authentication.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,92 @@ The matching for attributes always starts from the leaf client certificate and t
758758

759759
You can apply authorization rules to clients by using X.509 certificates with these attributes. To learn more, see [Authorize clients that use X.509 authentication](./howto-configure-authorization.md#authorize-clients-that-use-x509-authentication).
760760

761+
#### Optional: Azure Device Registry integration for X.509 authentication (preview)
762+
763+
> [!IMPORTANT]
764+
> Azure Device Registry integration for X.509 authentication is currently in preview. This feature is subject to certain limitations and is not recommended for production workloads. For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
765+
766+
You can enable Azure Device Registry integration with X.509 authentication to enforce device-level certificate validation and revocation. When enabled, this feature requires X.509 clients to have matching devices in the device registry and allows you to disable clients by disabling the corresponding device.
767+
768+
With Azure Device Registry integration enabled:
769+
770+
- Client certificates must have a Common Name (CN) that matches a device name in the Azure Device Registry.
771+
- Only enabled devices in the registry can authenticate successfully.
772+
- Device status is checked upon client authentication and every 10 minutes thereafter.
773+
- Disabled or removed devices are automatically denied access.
774+
775+
Before enabling this feature, you must create corresponding devices in the Azure Device Registry for each client certificate. The device name must match the certificate's Common Name (CN). To create and manage devices in the Azure Device Registry, see:
776+
- [Use the operations experience to manage resources such as assets, devices, and data flows](../discover-manage-assets/howto-manage-assets-devices.md)
777+
- [Understand assets and devices](../discover-manage-assets/concept-assets-devices.md)
778+
779+
To enable Azure Device Registry integration, set the `additionalValidation` field to `AzureDeviceRegistry` in your X.509 settings. The `additionalValidation` field performs additional validation of the client certificate using the specified method, with supported values of `AzureDeviceRegistry` or `None` (default):
780+
781+
# [Portal](#tab/portal)
782+
783+
In the Azure portal, when you configure the X.509 authentication method, add the Azure Device Registry validation in the **X.509 authentication details** pane in JSON format:
784+
785+
```json
786+
{
787+
"trustedClientCaCert": "<TRUSTED_CA_CONFIGMAP>",
788+
"additionalValidation": "AzureDeviceRegistry"
789+
}
790+
```
791+
792+
# [Azure CLI](#tab/cli)
793+
794+
Use the [az iot ops broker authn apply](/cli/azure/iot/ops/broker/authn#az-iot-ops-broker-authn-apply) command to create or change an MQTT broker authentication policy with Azure Device Registry validation.
795+
796+
Example configuration file with Azure Device Registry integration:
797+
798+
```json
799+
{
800+
"authenticationMethods": [
801+
{
802+
"method": "X509",
803+
"x509Settings": {
804+
"trustedClientCaCert": "<TRUSTED_CA_CONFIGMAP>",
805+
"additionalValidation": "AzureDeviceRegistry"
806+
}
807+
}
808+
]
809+
}
810+
```
811+
812+
# [Bicep](#tab/bicep)
813+
814+
```bicep
815+
x509Settings: {
816+
trustedClientCaCert: '<TRUSTED_CA_CONFIGMAP>'
817+
additionalValidation: 'AzureDeviceRegistry'
818+
// authorizationAttributes: {
819+
//// Optional authorization attributes can still be used
820+
// }
821+
}
822+
```
823+
824+
# [Kubernetes (preview)](#tab/kubernetes)
825+
826+
```yaml
827+
apiVersion: mqttbroker.iotoperations.azure.com/v1beta1
828+
kind: BrokerAuthentication
829+
metadata:
830+
name: aio-broker-authn
831+
namespace: azure-iot-operations
832+
spec:
833+
authenticationMethods:
834+
- method: X509
835+
x509Settings:
836+
trustedClientCaCert: <TRUSTED_CA_CONFIGMAP>
837+
additionalValidation: AzureDeviceRegistry
838+
```
839+
840+
> [!NOTE]
841+
> Note the API version `v1beta1` is required when using the `additionalValidation` field.
842+
843+
---
844+
845+
After enabling Azure Device Registry integration, you must create corresponding devices in the Azure Device Registry for each client certificate. The device name must match the certificate's Common Name (CN). If a client attempts to authenticate with a certificate that doesn't have a matching enabled device in the registry, authentication fails.
846+
761847
### Enable X.509 authentication for a listener port
762848

763849
After you import the trusted CA certificate and configure the BrokerAuthentication resource, link it to a TLS-enabled listener port. This step is important because X.509 authentication relies on TLS for client certificate validation.

0 commit comments

Comments
 (0)