Skip to content

Commit d4e016d

Browse files
committed
disable local auth - Service Bus
1 parent a279c20 commit d4e016d

File tree

9 files changed

+98
-4
lines changed

9 files changed

+98
-4
lines changed

articles/service-bus-messaging/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@
269269
href: private-link-service.md
270270
- name: Encrypt data using customer-managed keys
271271
href: configure-customer-managed-key.md
272+
- name: Disable location or SAS authentication
273+
href: disable-local-authentication.md
272274
- name: Troubleshoot
273275
items:
274276
- name: Troubleshooting guide

articles/service-bus-messaging/authenticate-application.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
title: Authenticate an application to access Azure Service Bus entities
33
description: This article provides information about authenticating an application with Azure Active Directory to access Azure Service Bus entities (queues, topics, etc.)
44
ms.topic: conceptual
5-
ms.date: 06/14/2021
5+
ms.date: 01/06/2022
66
ms.custom: subject-rbac-steps
77
---
88

99
# Authenticate and authorize an application with Azure Active Directory to access Azure Service Bus entities
1010
Azure Service Bus supports using Azure Active Directory (Azure AD) to authorize requests to Service Bus entities (queues, topics, subscriptions, or filters). With Azure AD, you can use Azure role-based access control (Azure RBAC) to grant permissions to a security principal, which may be a user, group, or application service principal. To learn more about roles and role assignments, see [Understanding the different roles](../role-based-access-control/overview.md).
1111

12+
> [!IMPORTANT]
13+
> You can disable local or SAS key authentication for a Service Bus namespace and allow only Azure Active Directory authentication. For step-by-step instructions, see [Disable local authentication](disable-local-authentication.md).
14+
1215
## Overview
1316
When a security principal (a user, group, or application) attempts to access a Service Bus entity, the request must be authorized. With Azure AD, access to a resource is a two-step process.
1417

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: Disable local authentication with Azure Service Bus
3+
description: This article explains how to disable local or Shared Access Signature key authentication for a Service Bus namespace.
4+
ms.topic: how-to
5+
ms.date: 02/01/2022
6+
---
7+
8+
# Disable local or shared access key authentication with Azure Service Bus
9+
There are two ways to authenticate to Azure Service Bus resources: Azure Active Directory (Azure AD) and Shared Access Signatures (SAS). Azure AD provides superior security and ease of use over shared access signatures (SAS). With Azure AD, there’s no need to store the tokens in your code and risk potential security vulnerabilities. We recommend that you use Azure AD with your Azure Service Bus applications when possible.
10+
11+
This article explains how to disable SAS key authentication and use only Azure AD for authentication.
12+
13+
## Use portal to disable local auth
14+
In this section, you learn how to use the Azure portal to disable local authentication.
15+
16+
1. Navigate to your Service Bus namespace in the [Azure portal](https://portal.azure.com).
17+
1. In the **Essentials** section of the **Overview** page, select **Enabled**, for **Local Authentication**.
18+
19+
:::image type="content" source="./media/disable-local-authentication/portal-overview-enabled.png" alt-text="Image showing the Overview page of a Service Bus namespace with Local Authentication set to Enabled.":::
20+
1. On the **Local Authentication** page, select **Disabled**, and select **OK**.
21+
22+
:::image type="content" source="./media/disable-local-authentication/select-disabled.png" alt-text="Disable location.":::
23+
24+
## Use Resource Manager template to disable local auth
25+
You can disable local authentication for a Service Bus namespace by setting `disableLocalAuth` property to `true` as shown in the following Azure Resource Manager template.
26+
27+
```json
28+
{
29+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
30+
"contentVersion": "1.0.0.0",
31+
"parameters": {
32+
"namespace_name": {
33+
"defaultValue": "spcontososbusns",
34+
"type": "String"
35+
}
36+
},
37+
"variables": {},
38+
"resources": [
39+
{
40+
"type": "Microsoft.ServiceBus/namespaces",
41+
"apiVersion": "2021-06-01-preview",
42+
"name": "[parameters('namespace_name')]",
43+
"location": "East US",
44+
"sku": {
45+
"name": "Standard",
46+
"tier": "Standard"
47+
},
48+
"properties": {
49+
"disableLocalAuth": true,
50+
"zoneRedundant": false
51+
}
52+
}
53+
]
54+
}
55+
```
56+
57+
### Parameters.json
58+
59+
```json
60+
{
61+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
62+
"contentVersion": "1.0.0.0",
63+
"parameters": {
64+
"namespace_name": {
65+
"value": null
66+
}
67+
}
68+
}
69+
```
70+
71+
## Azure policy
72+
You can assign the [disable local auth](https://portal.azure.com/#blade/Microsoft_Azure_Policy/PolicyDetailBlade/definitionId/%2Fproviders%2FMicrosoft.Authorization%2FpolicyDefinitions%2Fcfb11c26-f069-4c14-8e36-56c394dae5af) Azure policy to an Azure subscription or a resource group to enforce disabling of local authentication for all Service Bus namespaces in the subscription or the resource group.
73+
74+
:::image type="content" source="./media/disable-local-authentication/azure-policy.png" alt-text="Azure policy to disable location authentication.":::
75+
76+
## Next steps
77+
See the following to learn about Azure AD and SAS authentication.
78+
79+
- [Authentication with SAS](service-bus-sas.md)
80+
- Authentication with Azure AD
81+
- [Authenticate with managed identities](service-bus-managed-service-identity.md)
82+
- [Authenticate from an application](authenticate-application.md)
101 KB
Loading
40.9 KB
Loading
10.6 KB
Loading

articles/service-bus-messaging/service-bus-authentication-and-authorization.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Azure Service Bus authentication and authorization | Microsoft Docs
33
description: Authenticate apps to Service Bus with Shared Access Signature (SAS) authentication.
44
ms.topic: article
5-
ms.date: 09/15/2021
5+
ms.date: 02/01/2022
66
---
77

88
# Service Bus authentication and authorization
@@ -21,6 +21,8 @@ For more information about authenticating with Azure AD, see the following artic
2121
2222
> [!IMPORTANT]
2323
> Authorizing users or applications using OAuth 2.0 token returned by Azure AD provides superior security and ease of use over shared access signatures (SAS). With Azure AD, there is no need to store the tokens in your code and risk potential security vulnerabilities. We recommend that you use Azure AD with your Azure Service Bus applications when possible.
24+
>
25+
> You can disable local or SAS key authentication for a Service Bus namespace and allow only Azure AD authentication. For step-by-step instructions, see [Disable local authentication](disable-local-authentication.md).
2426
2527
## Shared access signature
2628
[SAS authentication](service-bus-sas.md) enables you to grant a user access to Service Bus resources, with specific rights. SAS authentication in Service Bus involves the configuration of a cryptographic key with associated rights on a Service Bus resource. Clients can then gain access to that resource by presenting a SAS token, which consists of the resource URI being accessed and an expiry signed with the configured key.

articles/service-bus-messaging/service-bus-managed-service-identity.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Managed identities for Azure resources with Service Bus
33
description: This article describes how to use managed identities to access with Azure Service Bus entities (queues, topics, and subscriptions).
44
ms.topic: article
5-
ms.date: 06/14/2021
5+
ms.date: 01/06/2022
66
ms.custom: subject-rbac-steps
77
---
88

@@ -11,6 +11,9 @@ ms.custom: subject-rbac-steps
1111

1212
With managed identities, the Azure platform manages this runtime identity. You do not need to store and protect access keys in your application code or configuration, either for the identity itself, or for the resources you need to access. A Service Bus client app running inside an Azure App Service application or in a virtual machine with enabled managed entities for Azure resources support does not need to handle SAS rules and keys, or any other access tokens. The client app only needs the endpoint address of the Service Bus Messaging namespace. When the app connects, Service Bus binds the managed entity's context to the client in an operation that is shown in an example later in this article. Once it is associated with a managed identity, your Service Bus client can do all authorized operations. Authorization is granted by associating a managed entity with Service Bus roles.
1313

14+
> [!IMPORTANT]
15+
> You can disable local or SAS key authentication for a Service Bus namespace and allow only Azure Active Directory authentication. For step-by-step instructions, see [Disable local authentication](disable-local-authentication.md).
16+
1417
## Overview
1518
When a security principal (a user, group, or application) attempts to access a Service Bus entity, the request must be authorized. With Azure AD, access to a resource is a two-step process.
1619

articles/service-bus-messaging/service-bus-sas.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Azure Service Bus access control with Shared Access Signatures
33
description: Overview of Service Bus access control using Shared Access Signatures overview, details about SAS authorization with Azure Service Bus.
44
ms.topic: article
5-
ms.date: 10/18/2021
5+
ms.date: 01/06/2022
66
ms.devlang: csharp
77
ms.custom: devx-track-csharp
88
---
@@ -19,6 +19,8 @@ SAS guards access to Service Bus based on authorization rules. Those are configu
1919
> Microsoft recommends using Azure AD with your Azure Service Bus applications when possible. For more information, see the following articles:
2020
> - [Authenticate and authorize an application with Azure Active Directory to access Azure Service Bus entities](authenticate-application.md).
2121
> - [Authenticate a managed identity with Azure Active Directory to access Azure Service Bus resources](service-bus-managed-service-identity.md)
22+
>
23+
> You can disable local or SAS key authentication for a Service Bus namespace and allow only Azure AD authentication. For step-by-step instructions, see [Disable local authentication](disable-local-authentication.md).
2224
2325
## Overview of SAS
2426

0 commit comments

Comments
 (0)