Skip to content

Commit 3b83e9f

Browse files
Merge pull request #291313 from PatAltimore/patricka-add-auth-tabs
Add custom authentication tabs
2 parents 18e492e + 5f21a62 commit 3b83e9f

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

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

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.subservice: azure-mqtt-broker
88
ms.topic: how-to
99
ms.custom:
1010
- ignite-2023
11-
ms.date: 11/11/2024
11+
ms.date: 12/09/2024
1212

1313
#CustomerIntent: As an operator, I want to configure authentication so that I have secure MQTT broker communications.
1414
---
@@ -827,6 +827,68 @@ The custom authentication server must present a server certificate, and MQTT bro
827827

828828
Modify the `authenticationMethods` setting in a *BrokerAuthentication* resource to specify `Custom` as a valid authentication method. Then, specify the parameters required to communicate with a custom authentication server.
829829

830+
# [Portal](#tab/portal)
831+
832+
1. In the Azure portal, navigate to your IoT Operations instance.
833+
1. Under **Components**, select **MQTT Broker**.
834+
1. Select the **Authentication** tab.
835+
1. Choose an existing authentication policy or create a new one.
836+
1. Add a new method by selecting **Add method**.
837+
1. Choose the method type **Custom** from the dropdown list then select **Add details** to configure the method.
838+
839+
:::image type="content" source="media/howto-configure-authentication/custom-method.png" alt-text="Screenshot using the Azure portal to set MQTT broker custom authentication method.":::
840+
841+
# [Bicep](#tab/bicep)
842+
843+
```bicep
844+
param aioInstanceName string = '<AIO_INSTANCE_NAME>'
845+
param customLocationName string = '<CUSTOM_LOCATION_NAME>'
846+
param policyName string = '<POLICY_NAME>'
847+
848+
resource aioInstance 'Microsoft.IoTOperations/instances@2024-11-01' existing = {
849+
name: aioInstanceName
850+
}
851+
852+
resource customLocation 'Microsoft.ExtendedLocation/customLocations@2021-08-31-preview' existing = {
853+
name: customLocationName
854+
}
855+
856+
resource defaultBroker 'Microsoft.IoTOperations/instances/brokers@2024-11-01' existing = {
857+
parent: aioInstance
858+
name: 'default'
859+
}
860+
861+
resource myBrokerAuthentication 'Microsoft.IoTOperations/instances/brokers/authentications@2024-11-01' = {
862+
parent: defaultBroker
863+
name: policyName
864+
extendedLocation: {
865+
name: customLocation.id
866+
type: 'CustomLocation'
867+
}
868+
properties: {
869+
authenticationMethods: [
870+
{
871+
method: 'Custom'
872+
serviceAccountTokenSettings: {
873+
audiences: [
874+
'aio-internal'
875+
'my-audience'
876+
]
877+
}
878+
}
879+
]
880+
}
881+
}
882+
```
883+
884+
Deploy the Bicep file using Azure CLI.
885+
886+
```azurecli
887+
az deployment group create --resource-group <RESOURCE_GROUP> --template-file <FILE>.bicep
888+
```
889+
890+
# [Kubernetes (preview)](#tab/kubernetes)
891+
830892
This example shows all possible parameters. The exact parameters required depend on each custom server's requirements.
831893

832894
```yaml
@@ -850,6 +912,8 @@ spec:
850912
header_key: header_value
851913
```
852914

915+
---
916+
853917
## Disable authentication
854918

855919
For testing, you can disable authentication for a broker listener port. Disabling authentication isn't recommended for production environments.
117 KB
Loading

0 commit comments

Comments
 (0)