Skip to content

Commit 8507d98

Browse files
Merge pull request #177163 from kasun04/master
Adding disabling SAS authentication feature
2 parents f2df362 + 7f7996b commit 8507d98

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

articles/event-hubs/authenticate-shared-access-signature.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,66 @@ For example, to define authorization rules scoped down to only sending/publishin
212212
## Authenticating Event Hubs consumers with SAS
213213
To authenticate back-end applications that consume from the data generated by Event Hubs producers, Event Hubs token authentication requires its clients to either have the **manage** rights or the **listen** privileges assigned to its Event Hubs namespace or event hub instance or topic. Data is consumed from Event Hubs using consumer groups. While SAS policy gives you granular scope, this scope is defined only at the entity level and not at the consumer level. It means that the privileges defined at the namespace level or the event hub instance or topic level will be applied to the consumer groups of that entity.
214214
215+
## Disabling Local/SAS Key authentication
216+
For certain organizational security requirements, you may have to disable local/SAS key authentication completely and rely on the Azure Active Directory (Azure AD) based authentication which is the recommended way to connect with Azure Event Hubs. You can disable local/SAS key authentication at the Event Hubs namespace level using Azure portal or Azure Resource Manager template.
217+
218+
### Disabling Local/SAS Key authentication via the portal
219+
You can disable local/SAS key authentication for a given Event Hubs namespace using the Azure portal.
220+
221+
As shown in the following image, in the namespace overview section, click on the *Local Authentication*.
222+
223+
![Namespace overview for disabling local auth](./media/authenticate-shared-access-signature/disable-local-auth-overview.png)
224+
225+
And then select *Disabled* option and click *Ok* as shown below.
226+
![Disabling local auth](./media/authenticate-shared-access-signature/disabling-local-auth.png)
227+
228+
### Disabling Local/SAS Key authentication using a template
229+
You can disable local authentication for a given Event Hubs namespace by setting `disableLocalAuth` property to `true` as shown in the following Azure Resource Manager template(ARM Template).
230+
231+
```json
232+
"resources":[
233+
{
234+
"apiVersion":"[variables('ehVersion')]",
235+
"name":"[parameters('eventHubNamespaceName')]",
236+
"type":"Microsoft.EventHub/Namespaces",
237+
"location":"[variables('location')]",
238+
"sku":{
239+
"name":"Standard",
240+
"tier":"Standard"
241+
},
242+
"resources": [
243+
{
244+
"apiVersion": "2017-04-01",
245+
"name": "[parameters('eventHubNamespaceName')]",
246+
"type": "Microsoft.EventHub/Namespaces",
247+
"location": "[resourceGroup().location]",
248+
"sku": {
249+
"name": "Standard"
250+
},
251+
"properties": {
252+
"isAutoInflateEnabled": "true",
253+
"maximumThroughputUnits": "7",
254+
"disableLocalAuth": false
255+
},
256+
"resources": [
257+
{
258+
"apiVersion": "2017-04-01",
259+
"name": "[parameters('eventHubName')]",
260+
"type": "EventHubs",
261+
"dependsOn": [
262+
"[concat('Microsoft.EventHub/namespaces/', parameters('eventHubNamespaceName'))]"
263+
],
264+
"properties": {
265+
"messageRetentionInDays": "[parameters('messageRetentionInDays')]",
266+
"partitionCount": "[parameters('partitionCount')]"
267+
}
268+
269+
}
270+
]
271+
}
272+
]
273+
```
274+
215275
## Next steps
216276
See the following articles:
217277
133 KB
Loading
10.5 KB
Loading

0 commit comments

Comments
 (0)