Skip to content

Commit e947c3c

Browse files
authored
Merge pull request #54032 from spelluru/msi1002
Managed service identity is renamed to "managed identities for Azure resources"
2 parents 2396fbb + 6eb0e35 commit e947c3c

File tree

4 files changed

+42
-43
lines changed

4 files changed

+42
-43
lines changed

articles/event-hubs/TOC.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
- name: Integrate with Event Grid
5454
href: ../event-grid/event-grid-event-hubs-integration.md
5555
maintainContext: true
56-
- name: Managed Service Identity (preview)
56+
- name: Managed identity for Azure resources
5757
href: event-hubs-managed-service-identity.md
5858
- name: Role-Based Access Control (preview)
5959
href: event-hubs-role-based-access-control.md
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Managed Service Identity with Azure Event Hubs preview | Microsoft Docs
3-
description: Use Managed Service Identities with Azure Event Hubs
2+
title: Managed identities for Azure resources with Azure Event Hubs preview | Microsoft Docs
3+
description: Use Managed identities for Azure resources with Azure Event Hubs
44
services: event-hubs
55
documentationcenter: na
66
author: ShubhaVijayasarathy
@@ -14,29 +14,33 @@ ms.author: shvija
1414

1515
---
1616

17-
# Managed Service Identity (preview)
17+
# Managed identities for Azure resources with Event Hubs
1818

19-
A Managed Service Identity (MSI) is a cross-Azure feature that enables you to create a secure identity associated with the deployment under which your application code runs. You can then associate that identity with access-control roles that grant custom permissions for accessing specific Azure resources that your application needs.
19+
[Managed identities for Azure resources](../active-directory/managed-identities-azure-resources/overview.md) is a cross-Azure feature that enables you to create a secure identity associated with the deployment under which your application code runs. You can then associate that identity with access-control roles that grant custom permissions for accessing specific Azure resources that your application needs.
2020

21-
With MSI, 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. An Event Hubs client app running inside an Azure App Service application or in a virtual machine with enabled MSI 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 Event Hubs namespace. When the app connects, Event Hubs binds the MSI context to the client in an operation that is shown in an example later in this article.
21+
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. An Event Hubs client app running inside an Azure App Service application or in a virtual machine with managed identities for Azure resources support enabled does not need to handle SAS rules and keys, or any other access tokens. The client app only needs the endpoint address of the Event Hubs namespace. When the app connects, Event Hubs binds the managed identity's context to the client in an operation that is shown in an example later in this article.
2222

23-
Once it is associated with a managed service identity, an Event Hubs client can perform all authorized operations. Authorization is granted by associating an MSI with Event Hubs roles.
23+
Once it is associated with a managed identity, an Event Hubs client can do all authorized operations. Authorization is granted by associating a managed identity with Event Hubs roles.
2424

2525
## Event Hubs roles and permissions
2626

27-
For the initial public preview release, you can only add a managed service identity to the "Owner" or "Contributor" roles of an Event Hubs namespace, which grants the identity full control on all entities in the namespace. However, management operations that change the namespace topology are initially supported only though Azure Resource Manager and not through the native Event Hubs REST management interface. This support also means that you cannot use the .NET Framework client [NamespaceManager](/dotnet/api/microsoft.servicebus.namespacemanager) object within a managed service identity.
27+
You can only add a managed identity to the "Owner" or "Contributor" roles of an Event Hubs namespace, which grants the identity full control on all entities in the namespace. However, management operations that change the namespace topology are initially supported only though Azure Resource Manager. It's not through the native Event Hubs REST management interface. This support also means that you cannot use the .NET Framework client [NamespaceManager](/dotnet/api/microsoft.servicebus.namespacemanager) object within a managed identity.
2828

29-
## Use Event Hubs with a Managed Service Identity
29+
## Use Event Hubs with managed identities for Azure Resources
3030

31-
The following section describes the steps required to create and deploy a sample application that runs under a managed service identity, how to grant that identity access to an Event Hubs namespace, and how the application interacts with event hubs using that identity.
31+
The following section describes the following steps:
32+
33+
1. Create and deploy a sample application that runs under a managed identity.
34+
2. Grant that identity access to an Event Hubs namespace.
35+
3. How the application interacts with event hubs using that identity.
3236

3337
This introduction describes a web application hosted in [Azure App Service](https://azure.microsoft.com/services/app-service/). The steps required for a VM-hosted application are similar.
3438

3539
### Create an App Service web application
3640

3741
The first step is to create an App Service ASP.NET application. If you're not familiar with how to do this in Azure, follow [this how-to guide](../app-service/app-service-web-get-started-dotnet-framework.md). However, instead of creating an MVC application as shown in the tutorial, create a Web Forms application.
3842

39-
### Set up the managed service identity
43+
### Set up the managed identity
4044

4145
Once you create the application, navigate to the newly created web app in the Azure portal (also shown in the how-to), then navigate to the **Managed Service Identity** page, and enable the feature:
4246

@@ -46,32 +50,29 @@ Once you've enabled the feature, a new service identity is created in your Azure
4650

4751
### Create a new Event Hubs namespace
4852

49-
Next, [create an Event Hubs namespace](event-hubs-create.md) in one of the Azure regions that has preview support for MSI: **US East**, **US East 2**, or **West Europe**.
53+
Next, [create an Event Hubs namespace](event-hubs-create.md) in one of the Azure regions that has preview support for managed identities for Azure resources: **US East**, **US East 2**, or **West Europe**.
5054

51-
Navigate to the namespace **Access Control (IAM)** page on the portal, and then click **Add** to add the managed service identity to the **Owner** role. To do so, search for the name of the web application in the **Add permissions** panel **Select** field, and then click the entry. Then click **Save**.
55+
Navigate to the namespace **Access Control (IAM)** page on the portal, and then click **Add** to add the managed identity to the **Owner** role. To do so, search for the name of the web application in the **Add permissions** panel **Select** field, and then click the entry. Then click **Save**.
5256

5357
![](./media/event-hubs-managed-service-identity/msi2.png)
5458

55-
The managed service identity for the web application now has access to the Event Hubs namespace, and to the event hub you previously created.
59+
The managed identity for the web application now has access to the Event Hubs namespace, and to the event hub you previously created.
5660

5761
### Run the app
5862

5963
Now modify the default page of the ASP.NET application you created. You can also use the web application code from [this GitHub repository](https://github.com/Azure/azure-event-hubs/tree/master/samples/DotNet/MSI/EventHubsMSIDemoWebApp).
6064

61-
>[!NOTE]
62-
> While the MSI feature is in preview, be sure to use the [preview version of the Service Bus library](https://www.nuget.org/packages/WindowsAzure.ServiceBus/4.2.2-preview) in order to access the new APIs.
63-
64-
Once you start the app, point your browser to EventHubsMSIDemo.aspx. Alternatively, set it as your start page. The code can be found in the EventHubsMSIDemo.aspx.cs file. The result is a minimal web application with a few entry fields, and with **send** and **receive** buttons that connect to Event Hubs to either send or receive events.
65+
Once you start the app, point your browser to EventHubsMSIDemo.aspx. You can also set it as your start page. The code can be found in the EventHubsMSIDemo.aspx.cs file. The result is a minimal web application with a few entry fields, and with **send** and **receive** buttons that connect to Event Hubs to either send or receive events.
6566

66-
Note how the [MessagingFactory](/dotnet/api/microsoft.servicebus.messaging.messagingfactory) object is initialized. Instead of using the Shared Access Token (SAS) token provider, the code creates a token provider for the managed service identity with the `TokenProvider.CreateManagedServiceIdentityTokenProvider(ServiceAudience.EventHubAudience)` call. As such, there are no secrets to retain and use. The flow of the managed service identity context to Event Hubs and the authorization handshake are automatically handled by the token provider, which is a simpler model than using SAS.
67+
Note how the [MessagingFactory](/dotnet/api/microsoft.servicebus.messaging.messagingfactory) object is initialized. Instead of using the Shared Access Token (SAS) token provider, the code creates a token provider for the managed identity with the `TokenProvider.CreateManagedServiceIdentityTokenProvider(ServiceAudience.EventHubAudience)` call. As such, there are no secrets to save and use. The flow of the managed identity context to Event Hubs and the authorization handshake are automatically handled by the token provider, which is a simpler model than using SAS.
6768

68-
Once you have made these changes, publish and run the application. An easy way to obtain the correct publishing data is to download and then import a publishing profile in Visual Studio:
69+
After you make these changes, publish and run the application. You can get the correct publishing data by downloading and then importing a publishing profile in Visual Studio:
6970

7071
![](./media/event-hubs-managed-service-identity/msi3.png)
7172

7273
To send or receive messages, enter the name of the namespace and the name of the entity you created, then click either **send** or **receive**.
7374

74-
Note that the managed service identity only works inside the Azure environment, and only in the App Service deployment in which you configured it. Also note that managed service identities do not work with App Service deployment slots at this time.
75+
The managed identity works only inside the Azure environment, and only in the App Service deployment in which you configured it. Managed identities do not work with App Service deployment slots at this time.
7576

7677
## Next steps
7778

@@ -80,4 +81,4 @@ For more information about Event Hubs, visit the following links:
8081
* Get started with an [Event Hubs tutorial](event-hubs-dotnet-standard-getstarted-send.md)
8182
* [Event Hubs FAQ](event-hubs-faq.md)
8283
* [Event Hubs pricing details](https://azure.microsoft.com/pricing/details/event-hubs/)
83-
* [Sample applications that use Event Hubs](https://github.com/Azure/azure-event-hubs/tree/master/samples)
84+
* [Sample applications that use Event Hubs](https://github.com/Azure/azure-event-hubs/tree/master/samples)

articles/service-bus-messaging/TOC.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
href: service-bus-samples.md
6161
- name: Concepts
6262
items:
63-
- name: Managed Service Identity (preview)
63+
- name: Managed identities for Azure resources
6464
href: service-bus-managed-service-identity.md
6565
- name: Role-Based Access Control (preview)
6666
href: service-bus-role-based-access-control.md

0 commit comments

Comments
 (0)