Skip to content

Commit 5760353

Browse files
authored
Merge pull request #197245 from EldertGrootenboer/patch-3
Added smaple how to get minimum TLS version for namespace
2 parents e0d8b96 + 0ed314d commit 5760353

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

articles/event-hubs/transport-layer-security-configure-minimum-version.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,56 @@ To configure the minimum TLS version for an Event Hubs namespace with a template
5959

6060
Configuring the minimum TLS version requires api-version 2022-01-01-preview or later of the Azure Event Hubs resource provider.
6161

62+
## Check the minimum required TLS version for a namespace
63+
64+
To check the minimum required TLS version for your Event Hubs namespace, you can query the Azure Resource Manager API. You will need a Bearer token to query against the API, which you can retrieve using [ARMClient](https://github.com/projectkudu/ARMClient) by executing the following commands.
65+
66+
```powershell
67+
.\ARMClient.exe login
68+
.\ARMClient.exe token <your-subscription-id>
69+
```
70+
71+
Once you have your bearer token, you can use the script below in combination with something like [Rest Client](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) to query the API.
72+
73+
```http
74+
@token = Bearer <Token received from ARMClient>
75+
@subscription = <your-subscription-id>
76+
@resourceGroup = <your-resource-group-name>
77+
@namespaceName = <your-namespace-name>
78+
79+
###
80+
GET https://management.azure.com/subscriptions/{{subscription}}/resourceGroups/{{resourceGroup}}/providers/Microsoft.EventHub/namespaces/{{namespaceName}}?api-version=2022-01-01-preview
81+
content-type: application/json
82+
Authorization: {{token}}
83+
```
84+
85+
The response should look something like the below, with the minimumTlsVersion set under the properties.
86+
87+
```json
88+
{
89+
"sku": {
90+
"name": "Premium",
91+
"tier": "Premium",
92+
"capacity": 1
93+
},
94+
"id": "/subscriptions/<your-subscription-id>/resourceGroups/<your-resource-group-name>/providers/Microsoft.EventHub/namespaces/<your-namespace-name>",
95+
"name": "<your-namespace-name>",
96+
"type": "Microsoft.EventHub/Namespaces",
97+
"location": "West Europe",
98+
"properties": {
99+
"minimumTlsVersion": "1.2",
100+
"publicNetworkAccess": "Enabled",
101+
"disableLocalAuth": false,
102+
"zoneRedundant": true,
103+
"isAutoInflateEnabled": false,
104+
"maximumThroughputUnits": 0,
105+
"kafkaEnabled": true,
106+
"provisioningState": "Succeeded",
107+
"status": "Active"
108+
}
109+
}
110+
```
111+
62112
## Test the minimum TLS version from a client
63113

64114
To test that the minimum required TLS version for an Event Hubs namespace forbids calls made with an older version, you can configure a client to use an older version of TLS. For more information about configuring a client to use a specific version of TLS, see [Configure Transport Layer Security (TLS) for a client application](transport-layer-security-configure-client-version.md).

0 commit comments

Comments
 (0)