Skip to content

Commit d3d0f68

Browse files
Merge pull request #267134 from spelluru/sbusfreshness0222
Freshness review
2 parents 2df1348 + d3c1f53 commit d3d0f68

File tree

4 files changed

+28
-30
lines changed

4 files changed

+28
-30
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
title: Authenticate an application to access Azure Service Bus entities
33
description: This article provides information about authenticating an application with Microsoft Entra ID to access Azure Service Bus entities (queues, topics, etc.)
44
ms.topic: conceptual
5-
ms.date: 02/24/2023
5+
ms.date: 02/23/2024
66
ms.custom: subject-rbac-steps
77
---
88

99
# Authenticate and authorize an application with Microsoft Entra ID to access Azure Service Bus entities
10-
Azure Service Bus supports using Microsoft Entra ID to authorize requests to Service Bus entities (queues, topics, subscriptions, or filters). With Microsoft Entra ID, 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. A key advantage of using Microsoft Entra ID with Azure Service Bus is that you don't need to store your credentials in the code anymore. Instead, you can request an OAuth 2.0 access token from the Microsoft identity platform. If the authentication succeeds, Microsoft Entra ID returns an access token to the application, and the application can then use the access token to authorize request to Service Bus resources.
10+
Azure Service Bus supports using Microsoft Entra ID to authorize requests to Service Bus entities (queues, topics, subscriptions, or filters). With Microsoft Entra ID, you can use Azure role-based access control (Azure RBAC) to grant permissions to a security principal, which can be a user, group, application service principal, or a [managed identity for Azure resources](../active-directory/managed-identities-azure-resources/overview.md). A key advantage of using Microsoft Entra ID with Azure Service Bus is that you don't need to store your credentials in the code anymore. Instead, you can request an OAuth 2.0 access token from the Microsoft identity platform. If the authentication succeeds, Microsoft Entra ID returns an access token to the application, and the application can then use the access token to authorize request to Service Bus resources.
1111

1212
> [!IMPORTANT]
1313
> You can disable local or SAS key authentication for a Service Bus namespace and allow only Microsoft Entra authentication. For step-by-step instructions, see [Disable local authentication](disable-local-authentication.md).
@@ -29,11 +29,11 @@ Native applications and web applications that make requests to Service Bus can a
2929

3030
Microsoft Entra authorizes access rights to secured resources through [Azure RBAC](../role-based-access-control/overview.md). Azure Service Bus defines a set of Azure built-in roles that encompass common sets of permissions used to access Service Bus entities and you can also define custom roles for accessing the data.
3131

32-
When an Azure role is assigned to a Microsoft Entra security principal, Azure grants access to those resources for that security principal. Access can be scoped to the level of subscription, the resource group, or the Service Bus namespace. A Microsoft Entra security principal may be a user, a group, an application service principal, or a [managed identity for Azure resources](../active-directory/managed-identities-azure-resources/overview.md).
32+
When an Azure role is assigned to a Microsoft Entra security principal, Azure grants access to those resources for that security principal. Access can be scoped to the level of subscription, the resource group, or the Service Bus namespace. A Microsoft Entra security principal can be a user, a group, an application service principal, or a [managed identity for Azure resources](../active-directory/managed-identities-azure-resources/overview.md).
3333

3434
For Azure Service Bus, the management of namespaces and all related resources through the Azure portal and the Azure resource management API is already protected using the Azure RBAC model. Azure provides the following built-in roles for authorizing access to a Service Bus namespace:
3535

36-
- [Azure Service Bus Data Owner](../role-based-access-control/built-in-roles.md#azure-service-bus-data-owner): Enables data access to Service Bus namespace and its entities (queues, topics, subscriptions, and filters)
36+
- [Azure Service Bus Data Owner](../role-based-access-control/built-in-roles.md#azure-service-bus-data-owner): Use this role to give full access to the Service Bus resources.
3737
- [Azure Service Bus Data Sender](../role-based-access-control/built-in-roles.md#azure-service-bus-data-sender): Use this role to give the send access to Service Bus namespace and its entities.
3838
- [Azure Service Bus Data Receiver](../role-based-access-control/built-in-roles.md#azure-service-bus-data-receiver): Use this role to give receiving access to Service Bus namespace and its entities.
3939

@@ -54,14 +54,12 @@ For more information about how built-in roles are defined, see [Understand role
5454

5555

5656
## Authenticate from an application
57-
A key advantage of using Microsoft Entra ID with Service Bus is that your credentials no longer need to be stored in your code. Instead, you can request an OAuth 2.0 access token from Microsoft identity platform. Microsoft Entra authenticates the security principal (a user, a group, or service principal) running the application. If authentication succeeds, Microsoft Entra ID returns the access token to the application, and the application can then use the access token to authorize requests to Azure Service Bus.
57+
A key advantage of using Microsoft Entra ID with Service Bus is that your credentials no longer need to be stored in your code. Instead, you can request an OAuth 2.0 access token from Microsoft identity platform. Microsoft Entra authenticates the security principal (a user, a group, a service principal, or a [managed identity for Azure resources](../active-directory/managed-identities-azure-resources/overview.md)) running the application. If authentication succeeds, Microsoft Entra ID returns the access token to the application, and the application can then use the access token to authorize requests to Azure Service Bus.
5858

5959
Following sections shows you how to configure your native application or web application for authentication with Microsoft identity platform 2.0. For more information about Microsoft identity platform 2.0, see [Microsoft identity platform (v2.0) overview](../active-directory/develop/v2-overview.md).
6060

6161
For an overview of the OAuth 2.0 code grant flow, see [Authorize access to Microsoft Entra web applications using the OAuth 2.0 code grant flow](../active-directory/develop/v2-oauth2-auth-code-flow.md).
6262

63-
<a name='register-your-application-with-an-azure-ad-tenant'></a>
64-
6563
### Register your application with a Microsoft Entra tenant
6664
The first step in using Microsoft Entra ID to authorize Service Bus entities is registering your client application with a Microsoft Entra tenant from the [Azure portal](https://portal.azure.com/). When you register your client application, you supply information about the application to AD. Microsoft Entra ID then provides a client ID (also called an application ID) that you can use to associate your application with Microsoft Entra runtime. To learn more about the client ID, see [Application and service principal objects in Microsoft Entra ID](../active-directory/develop/app-objects-and-service-principals.md).
6765

articles/service-bus-messaging/jms-developer-guide.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ ms.date: 05/02/2023
1010

1111
This guide contains detailed information to help you succeed in communicating with Azure Service Bus using the Java Message Service (JMS) 2.0 API.
1212

13-
As a Java developer, if you're new to Azure Service Bus, please consider reading the below articles.
13+
As a Java developer, if you're new to Azure Service Bus, consider reading the following articles.
1414

1515
| Getting started | Concepts |
1616
|----------------|-------|
17-
| <ul> <li> [What is Azure Service Bus](service-bus-messaging-overview.md) </li> <li> [Queues, Topics and Subscriptions](service-bus-queues-topics-subscriptions.md) </li> </ul> | <ul> <li> [Azure Service Bus - Premium tier](service-bus-premium-messaging.md) </li> </ul> |
17+
| <ul> <li> [What is Azure Service Bus](service-bus-messaging-overview.md) </li> <li> [Queues, Topics, and Subscriptions](service-bus-queues-topics-subscriptions.md) </li> </ul> | <ul> <li> [Azure Service Bus - Premium tier](service-bus-premium-messaging.md) </li> </ul> |
1818

1919
## Java Message Service (JMS) Programming model
2020

21-
The Java Message Service API programming model is as shown below -
21+
The Java Message Service API programming model is as shown in the following sections:
2222

2323
> [!NOTE]
2424
>
@@ -50,9 +50,9 @@ The below building blocks are available to communicate with the JMS application.
5050
### Connection factory
5151
The connection factory object is used by the client to connect with the JMS provider. The connection factory encapsulates a set of connection configuration parameters that are defined by the administrator.
5252

53-
Each connection factory is an instance of `ConnectionFactory`, `QueueConnectionFactory` or `TopicConnectionFactory` interface.
53+
Each connection factory is an instance of `ConnectionFactory`, `QueueConnectionFactory`, or `TopicConnectionFactory` interface.
5454

55-
To simplify connecting with Azure Service Bus, these interfaces are implemented through `ServiceBusJmsConnectionFactory`, `ServiceBusJmsQueueConnectionFactory` and `ServiceBusJmsTopicConnectionFactory` respectively.
55+
To simplify connecting with Azure Service Bus, these interfaces are implemented through `ServiceBusJmsConnectionFactory`, `ServiceBusJmsQueueConnectionFactory`, or `ServiceBusJmsTopicConnectionFactory` respectively.
5656

5757
> [!IMPORTANT]
5858
> Java applications leveraging JMS 2.0 API can connect to Azure Service Bus using the connection string, or using a `TokenCredential` for leveraging Microsoft Entra backed authentication. When using Microsoft Entra backed authentication, ensure to [assign roles and permissions](service-bus-managed-service-identity.md#azure-built-in-roles-for-azure-service-bus) to the identity as needed.
@@ -107,7 +107,7 @@ ConnectionFactory factory = new ServiceBusJmsConnectionFactory(tokenCredential,
107107

108108
# [Service Principal](#tab/service-principal-backed-authentication)
109109

110-
Create a [service principal](authenticate-application.md#register-your-application-with-an-azure-ad-tenant) on Azure, and use this identity to create a `TokenCredential`.
110+
Create a [service principal](authenticate-application.md#register-your-application-with-a-microsoft-entra-tenant) on Azure, and use this identity to create a `TokenCredential`.
111111

112112
```java
113113
TokenCredential tokenCredential = new ClientSecretCredentialBuilder()
@@ -157,9 +157,9 @@ Destinations map to entities in Azure Service Bus - queues (in point to point sc
157157

158158
### Connections
159159

160-
A connection encapsulates a virtual connection with a JMS provider. With Azure Service Bus, this represents a stateful connection between the application and Azure Service Bus over AMQP.
160+
A connection encapsulates a virtual connection with a JMS provider. With Azure Service Bus, it represents a stateful connection between the application and Azure Service Bus over AMQP.
161161

162-
A connection is created from the connection factory as shown below.
162+
A connection is created from the connection factory as shown in the following example:
163163

164164
```java
165165
Connection connection = factory.createConnection();
@@ -169,7 +169,7 @@ Connection connection = factory.createConnection();
169169

170170
A session is a single-threaded context for producing and consuming messages. It can be utilized to create messages, message producers and consumers, but it also provides a transactional context to allow grouping of sends and receives into an atomic unit of work.
171171

172-
A session can be created from the connection object as shown below.
172+
A session can be created from the connection object as shown in the following example:
173173

174174
```java
175175
Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
@@ -217,21 +217,21 @@ When the mode isn't specified, the **JMSContext.AUTO_ACKNOWLEDGE** is picked by
217217

218218
A message producer is an object that is created using a JMSContext or a Session and used for sending messages to a destination.
219219

220-
It can be created either as a stand-alone object as below -
220+
It can be created either as a stand-alone object as shown in the following example:
221221

222222
```java
223223
JMSProducer producer = context.createProducer();
224224
```
225225

226-
or created at runtime when a message is needed to be sent.
226+
Or created at runtime when a message is needed to be sent.
227227

228228
```java
229229
context.createProducer().send(destination, message);
230230
```
231231

232232
### JMS message consumers
233233

234-
A message consumer is an object that is created by a JMSContext or a Session and used for receiving messages sent to a destination. It can be created as shown below -
234+
A message consumer is an object that is created by a JMSContext or a Session and used for receiving messages sent to a destination. It can be created as shown in this example:
235235

236236
```java
237237
JMSConsumer consumer = context.createConsumer(dest);
@@ -256,7 +256,7 @@ Message m = consumer.receive(1000); // time out after one second.
256256

257257
#### Asynchronous receives with JMS message listeners
258258

259-
A message listener is an object that is used for asynchronous handling of messages on a destination. It implements the `MessageListener` interface which contains the `onMessage` method where the specific business logic must live.
259+
A message listener is an object that is used for asynchronous handling of messages on a destination. It implements the `MessageListener` interface, which contains the `onMessage` method where the specific business logic must live.
260260

261261
A message listener object must be instantiated and registered against a specific message consumer using the `setMessageListener` method.
262262

@@ -267,15 +267,15 @@ consumer.setMessageListener(myListener);
267267

268268
### Consuming from topics
269269

270-
[JMS Message Consumers](#jms-message-consumers) are created against a [destination](#jms-destination) which may be a queue or a topic.
270+
[JMS Message Consumers](#jms-message-consumers) are created against a [destination](#jms-destination), which can be a queue or a topic.
271271

272272
Consumers on queues are simply client side objects that live in the context of the Session (and Connection) between the client application and Azure Service Bus.
273273

274274
Consumers on topics, however, have 2 parts -
275275
* A **client side object** that lives in the context of the Session(or JMSContext), and,
276276
* A **subscription** that is an entity on Azure Service Bus.
277277

278-
The subscriptions are documented [here](java-message-service-20-entities.md#java-message-service-jms-subscriptions) and can be one of the below -
278+
The subscriptions are documented [here](java-message-service-20-entities.md#java-message-service-jms-subscriptions) and can be one of the following ones:
279279
* Shared durable subscriptions
280280
* Shared non-durable subscriptions
281281
* Unshared durable subscriptions
@@ -285,7 +285,7 @@ The subscriptions are documented [here](java-message-service-20-entities.md#java
285285

286286
The JMS API provides a `QueueBrowser` object that allows the application to browse the messages in the queue and display the header values for each message.
287287

288-
A Queue Browser can be created using the JMSContext as below.
288+
A Queue Browser can be created using the JMSContext as in the following example:
289289

290290
```java
291291
QueueBrowser browser = context.createBrowser(queue);
@@ -326,7 +326,7 @@ This developer guide showcased how Java client applications using Java Message S
326326

327327
## Next steps
328328

329-
For more information on Azure Service Bus and details about Java Message Service (JMS) entities, check out the links below -
329+
For more information on Azure Service Bus and details about Java Message Service (JMS) entities, check out the following articles:
330330
* [Service Bus - Queues, Topics, and Subscriptions](service-bus-queues-topics-subscriptions.md)
331331
* [Service Bus - Java Message Service entities](service-bus-queues-topics-subscriptions.md#java-message-service-jms-20-entities)
332332
* [AMQP 1.0 support in Azure Service Bus](service-bus-amqp-overview.md)

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

Lines changed: 2 additions & 2 deletions
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: 02/17/2023
5+
ms.date: 02/23/2024
66
---
77

88
# Service Bus authentication and authorization
@@ -16,7 +16,7 @@ This article gives you details on using these two types of security mechanisms.
1616
<a name='azure-active-directory'></a>
1717

1818
## Microsoft Entra ID
19-
Microsoft Entra integration with Service Bus provides role-based access control (RBAC) to Service Bus resources. You can use Azure RBAC to grant permissions to a security principal, which may be a user, a group, or an application service principal. Microsoft Entra authenticates the security principal and returns an OAuth 2.0 token. This token can be used to authorize a request to access a Service Bus resource (queue, topic, and so on).
19+
Microsoft Entra integration with Service Bus provides role-based access control (RBAC) to Service Bus resources. You can use Azure RBAC to grant permissions to a security principal, which can be a user, a group, an application service principal, or a managed identity. Microsoft Entra authenticates the security principal and returns an OAuth 2.0 token. This token can be used to authorize a request to access a Service Bus resource (queue, topic, and so on).
2020

2121
For more information about authenticating with Microsoft Entra ID, see the following articles:
2222

articles/service-bus-messaging/service-bus-filter-examples.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Set subscriptions filters in Azure Service Bus | Microsoft Docs
33
description: This article provides examples for defining filters and actions on Azure Service Bus topic subscriptions.
44
ms.topic: how-to
5-
ms.date: 02/28/2023
5+
ms.date: 02/23/2024
66
ms.devlang: csharp
77
ms.custom: devx-track-dotnet
88
---
@@ -21,11 +21,11 @@ sys.correlationid like 'abc-%'
2121

2222
> [!NOTE]
2323
> - For a list of system properties, see [Messages, payloads, and serialization](service-bus-messages-payloads.md).
24-
> - Use system property names from [Microsoft.Azure.ServiceBus.Message](/dotnet/api/microsoft.azure.servicebus.message#properties) in your filters even when you use [ServiceBusMessage](/dotnet/api/azure.messaging.servicebus.servicebusmessage) from the new [Azure.Messaging.ServiceBus](/dotnet/api/azure.messaging.servicebus) namespace to send and receive messages.
25-
> - `Subject` from [Azure.Messaging.ServiceBus.ServiceBusMessage](/dotnet/api/azure.messaging.servicebus.servicebusmessage) maps to `Label` in [Microsoft.Azure.ServiceBus.Message](/dotnet/api/microsoft.azure.servicebus.message#properties).
24+
> - Use system property names from [Azure.Messaging.ServiceBus.ServiceBusMessage](/dotnet/api/azure.messaging.servicebus.servicebusmessage) in your filters.
25+
> - `Subject` from [Azure.Messaging.ServiceBus.ServiceBusMessage](/dotnet/api/azure.messaging.servicebus.servicebusmessage) maps to `Label` in the deprecated [Microsoft.Azure.ServiceBus.Message](/dotnet/api/microsoft.azure.servicebus.message#properties).
2626

2727
## Filter on message properties
28-
Here are the examples of using application or user properties in a filter. You can access application properties set by using [Azure.Messaging.ServiceBus.ServiceBusMessage.ApplicationProperties](/dotnet/api/azure.messaging.servicebus.servicebusmessage.applicationproperties)) (latest) or user properties set by [Microsoft.Azure.ServiceBus.Message.UserProperty](/dotnet/api/microsoft.azure.servicebus.message.userproperties) (deprecated) using the syntax: `user.property-name` or just `property-name`.
28+
Here are the examples of using application or user properties in a filter. You can access application properties set by using [Azure.Messaging.ServiceBus.ServiceBusMessage.ApplicationProperties](/dotnet/api/azure.messaging.servicebus.servicebusmessage.applicationproperties)) (latest) or user properties set by [Microsoft.Azure.ServiceBus.ServiceBusMessage](/dotnet/api/azure.messaging.servicebus.servicebusmessage) (deprecated) using the syntax: `user.property-name` or just `property-name`.
2929

3030
```csharp
3131
MessageProperty = 'A'

0 commit comments

Comments
 (0)