You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/event-hubs/passwordless-migration-event-hubs.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@
2
2
title: Migrate applications to use passwordless authentication with Azure Event Hubs
3
3
titleSuffix: Azure Event Hubs
4
4
description: Learn to migrate existing applications away from Shared Key authorization with the account key to instead use Microsoft Entra ID and Azure role-based access control (RBAC) for enhanced security with Azure Event Hubs.
Copy file name to clipboardExpand all lines: articles/service-bus-messaging/service-bus-migrate-azure-credentials.md
+8-10Lines changed: 8 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,9 @@
1
1
---
2
2
title: Migrate applications to use passwordless authentication with Azure Service Bus
3
3
titleSuffix: Azure Service Bus
4
-
description: Learn to migrate existing Service Bus applications away from connection strings to use Microsoft Entra ID and Azure RBAC for enhanced security.
5
-
author: alexwolfmsft
6
-
ms.author: alexwolf
4
+
description: Learn to migrate existing Service Bus applications away from connection strings and use Microsoft Entra ID and Azure Role Based Access Control (RBAC) for enhanced security.
7
5
ms.reviewer: randolphwest
8
-
ms.date: 06/12/2023
6
+
ms.date: 07/25/2025
9
7
ms.topic: how-to
10
8
ms.custom:
11
9
- devx-track-csharp
@@ -24,7 +22,7 @@ Application requests to Azure Service Bus must be authenticated using either acc
24
22
25
23
## Security risks associated with access keys
26
24
27
-
The following code example demonstrates how to connect to Azure Service Bus using a connection string that includes an access key. When you create a Service Bus, Azure generates these keys and connection strings automatically. Many developers gravitate towards this solution because it feels familiar to options they've worked with in the past. If your application currently uses connection strings, consider migrating to passwordless connections using the steps described in this document.
25
+
The following code example demonstrates how to connect to Azure Service Bus using a connection string that includes an access key. When you create a Service Bus, Azure generates these keys and connection strings automatically. Many developers gravitate towards this solution because it feels familiar to options they worked with in the past. If your application currently uses connection strings, consider migrating to passwordless connections using the steps described in this document.
28
26
29
27
## [.NET](#tab/dotnet)
30
28
@@ -91,15 +89,15 @@ client = ServiceBusClient(
91
89
92
90
---
93
91
94
-
Connection strings should be used with caution. Developers must be diligent to never expose the keys in an unsecure location. Anyone who gains access to the key is able to authenticate. For example, if an account key is accidentally checked into source control, sent through an unsecure email, pasted into the wrong chat, or viewed by someone who shouldn't have permission, there's risk of a malicious user accessing the application. Instead, consider updating your application to use passwordless connections.
92
+
Connection strings should be used with caution. Developers must be diligent to never expose the keys in an unsecure location. Anyone who gains access to the key is able to authenticate. For example, if an account key is accidentally checked into source control, sent through an unsecure email, or viewed by someone who shouldn't have permission, there's risk of a malicious user accessing the application. Instead, consider updating your application to use passwordless connections.
## Steps to migrate an app to use passwordless authentication
101
99
102
-
The following steps explain how to migrate an existing application to use passwordless connections instead of a key-based solution. You'll first configure a local development environment, and then apply those concepts to an Azure app hosting environment. These same migration steps should apply whether you're using access keys directly, or through connection strings.
100
+
The following steps explain how to migrate an existing application to use passwordless connections instead of a key-based solution. You first configure a local development environment, and then apply those concepts to an Azure app hosting environment. These same migration steps should apply whether you're using access keys directly, or through connection strings.
103
101
104
102
### Configure roles and users for local development authentication
105
103
@@ -298,11 +296,11 @@ Next, update your code to use passwordless connections.
298
296
299
297
#### Run the app locally
300
298
301
-
After making these code changes, run your application locally. The new configuration should pick up your local credentials, such as the Azure CLI, Visual Studio, or IntelliJ. The roles you assigned to your local dev user in Azure will allow your app to connect to the Azure service locally.
299
+
After making these code changes, run your application locally. The new configuration should pick up your local credentials, such as the Azure CLI, Visual Studio, or IntelliJ. The roles you assigned to your local dev user in Azure allows your app to connect to the Azure service locally.
302
300
303
301
### Configure the Azure hosting environment
304
302
305
-
Once your application is configured to use passwordless connections and runs locally, the same code can authenticate to Azure services after it's deployed to Azure. For example, an application deployed to an Azure App Service instance that has a managed identity enabled can connect to Azure Service Bus.
303
+
Once your application is configured to use passwordless connections and runs locally, the same code can authenticate to Azure services when deployed to Azure. For example, an application deployed to an Azure App Service instance that has a managed identity enabled can connect to Azure Service Bus.
306
304
307
305
#### Create the managed identity using the Azure portal
308
306
@@ -405,7 +403,7 @@ az aks update \
405
403
406
404
#### Assign roles to the managed identity
407
405
408
-
Next, you need to grant permissions to the managed identity you created to access your Service Bus. You can do this by assigning a role to the managed identity, just like you did with your local development user.
406
+
Next, you need to grant permissions to the managed identity you created to access your Service Bus. Assign a role to the managed identity, just like you did with your local development user.
0 commit comments