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/service-bus-messaging/service-bus-migrate-azure-credentials.md
+6-11Lines changed: 6 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,6 @@ ms.service: service-bus
10
10
ms.topic: how-to
11
11
ms.custom:
12
12
- devx-track-csharp
13
-
- passwordless-java
14
-
- passwordless-js
15
-
- passwordless-python
16
13
- passwordless-dotnet
17
14
ms.devlang: csharp
18
15
---
@@ -26,7 +23,9 @@ Application requests to Azure Service Bus must be authenticated using either acc
26
23
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.
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.
@@ -164,7 +163,7 @@ az containerapp identity assign \
You can assign a managed identity to a virtual machine with the [az vm identity assign](/cli/azure/vm/identity) command.
170
169
@@ -202,7 +201,7 @@ If you connected your services using the Service Connector you don't need to com
202
201
203
202
1. Navigate to your Service Bus overview page and select **Access Control (IAM)** from the left navigation.
204
203
205
-
1. Choose **Add role assignment**
204
+
1. Choose **Add role assignment**.
206
205
207
206
:::image type="content" source="../../includes/passwordless/media/migration-add-role-small.png" alt-text="Screenshot showing how to add a role to a managed identity." lightbox="../../includes/passwordless/media/migration-add-role.png":::
208
207
@@ -227,7 +226,7 @@ az servicebus show \
227
226
--query id
228
227
```
229
228
230
-
Copy the output ID from the preceding command. You can then assign roles using the az role command of the Azure CLI.
229
+
Copy the output ID from the preceding command. You can then assign roles using the `az role` command of the Azure CLI.
231
230
232
231
```azurecli
233
232
az role assignment create \
@@ -245,7 +244,3 @@ After making these code changes, browse to your hosted application in the browse
245
244
## Next steps
246
245
247
246
In this tutorial, you learned how to migrate an application to passwordless connections.
248
-
249
-
You can read the following resources to explore the concepts discussed in this article in more depth:
250
-
251
-
* To learn more about .NET Core, see [Get started with .NET in 10 minutes](https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/intro).
0 commit comments