Skip to content

Commit ea41e9a

Browse files
authored
Merge pull request #248405 from terencefan/tefa/reformat-webpubsub-aad-docs
Reformat AAD related docs for further rebrand PRs
2 parents 80934f0 + 3ecabf6 commit ea41e9a

25 files changed

+1255
-1092
lines changed

articles/azure-web-pubsub/concept-azure-ad-authorization.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Authorize access with Azure Active Directory for Azure Web PubSub
3-
description: This article provides information on authorizing access to Azure Web PubSub Service resources using Azure Active Directory.
3+
description: This article provides information on authorizing access to Azure Web PubSub Service resources using Azure Active Directory.
44
author: terencefan
55

66
ms.author: tefa
@@ -18,7 +18,7 @@ By utilizing role-based access control (RBAC) within Azure AD, permissions can b
1818
Using Azure AD for authorization of Web PubSub requests offers improved security and ease of use compared to Access Key authorization. Microsoft recommends utilizing Azure AD authorization with Web PubSub resources when possible to ensure access with the minimum necessary privileges.
1919

2020
<a id="security-principal"></a>
21-
*[1] security principal: a user/resource group, an application, or a service principal such as system-assigned identities and user-assigned identities.*
21+
_[1] security principal: a user/resource group, an application, or a service principal such as system-assigned identities and user-assigned identities._
2222

2323
## Overview of Azure AD for Web PubSub
2424

@@ -49,49 +49,54 @@ Before assigning an Azure RBAC role to a security principal, it's important to i
4949

5050
You can scope access to Azure SignalR resources at the following levels, beginning with the narrowest scope:
5151

52-
- **An individual resource.**
52+
- **An individual resource.**
5353

5454
At this scope, a role assignment applies to only the target resource.
5555

56-
- **A resource group.**
56+
- **A resource group.**
5757

5858
At this scope, a role assignment applies to all of the resources in the resource group.
5959

6060
- **A subscription.**
6161

6262
At this scope, a role assignment applies to all of the resources in all of the resource groups in the subscription.
6363

64-
- **A management group.**
64+
- **A management group.**
6565

6666
At this scope, a role assignment applies to all of the resources in all of the resource groups in all of the subscriptions in the management group.
6767

6868
## Azure built-in roles for Web PubSub resources.
6969

7070
- `Web PubSub Service Owner`
7171

72-
Full access to data-plane permissions, including read/write REST APIs and Auth APIs.
72+
Full access to data-plane permissions, including read/write REST APIs and Auth APIs.
7373

74-
This role is the most common used for building an upstream server.
74+
This role is the most common used for building an upstream server.
7575

7676
- `Web PubSub Service Reader`
7777

78-
Use to grant read-only REST APIs permissions to Web PubSub resources.
78+
Use to grant read-only REST APIs permissions to Web PubSub resources.
7979

80-
It's used when you'd like to write a monitoring tool that calling **ONLY** Web PubSub data-plane **READONLY** REST APIs.
80+
It's used when you'd like to write a monitoring tool that calling **ONLY** Web PubSub data-plane **READONLY** REST APIs.
8181

8282
## Next steps
8383

8484
To learn how to create an Azure application and use Azure AD auth, see
85+
8586
- [Authorize request to Web PubSub resources with Azure AD from Azure applications](howto-authorize-from-application.md)
8687

8788
To learn how to configure a managed identity and use Azure AD auth, see
89+
8890
- [Authorize request to Web PubSub resources with Azure AD from managed identities](howto-authorize-from-managed-identity.md)
8991

90-
To learn more about roles and role assignments, see
92+
To learn more about roles and role assignments, see
93+
9194
- [What is Azure role-based access control](../role-based-access-control/overview.md)
9295

93-
To learn how to create custom roles, see
96+
To learn how to create custom roles, see
97+
9498
- [Steps to create a custom role](../role-based-access-control/custom-roles.md#steps-to-create-a-custom-role)
9599

96100
To learn how to use only Azure AD authentication, see
97-
- [Disable local authentication](./howto-disable-local-auth.md)
101+
102+
- [Disable local authentication](./howto-disable-local-auth.md)

articles/azure-web-pubsub/concept-service-internals.md

Lines changed: 112 additions & 86 deletions
Large diffs are not rendered by default.

articles/azure-web-pubsub/howto-authorize-from-application.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.topic: conceptual
1111

1212
# Authorize request to Web PubSub resources with Azure AD from Azure applications
1313

14-
Azure Web PubSub Service supports Azure Active Directory (Azure AD) authorizing requests from [Azure applications](../active-directory/develop/app-objects-and-service-principals.md).
14+
Azure Web PubSub Service supports Azure Active Directory (Azure AD) authorizing requests from [Azure applications](../active-directory/develop/app-objects-and-service-principals.md).
1515

1616
This article shows how to configure your Web PubSub resource and codes to authorize the request to a Web PubSub resource from an Azure application.
1717

@@ -23,7 +23,7 @@ The first step is to register an Azure application.
2323
2. Under **Manage** section, select **App registrations**.
2424
3. Click **New registration**.
2525

26-
![Screenshot of registering an application.](./media/howto-authorize-from-application/register-an-application.png)
26+
![Screenshot of registering an application.](./media/howto-authorize-from-application/register-an-application.png)
2727

2828
4. Enter a display **Name** for your application.
2929
5. Click **Register** to confirm the register.
@@ -33,6 +33,7 @@ Once you have your application registered, you can find the **Application (clien
3333
![Screenshot of an application.](./media/howto-authorize-from-application/application-overview.png)
3434

3535
To learn more about registering an application, see
36+
3637
- [Quickstart: Register an application with the Microsoft identity platform](../active-directory/develop/quickstart-register-app.md).
3738

3839
## Add credentials
@@ -45,11 +46,12 @@ The application requires a client secret to prove its identity when requesting a
4546

4647
1. Under **Manage** section, select **Certificates & secrets**
4748
1. On the **Client secrets** tab, click **New client secret**.
48-
![Screenshot of creating a client secret.](./media/howto-authorize-from-application/new-client-secret.png)
49+
![Screenshot of creating a client secret.](./media/howto-authorize-from-application/new-client-secret.png)
4950
1. Enter a **description** for the client secret, and choose a **expire time**.
50-
1. Copy the value of the **client secret** and then paste it to a secure location.
51-
> [!NOTE]
52-
> The secret will display only once.
51+
1. Copy the value of the **client secret** and then paste it to a secure location.
52+
> [!NOTE]
53+
> The secret will display only once.
54+
5355
### Certificate
5456

5557
You can also upload a certification instead of creating a client secret.
@@ -62,10 +64,11 @@ To learn more about adding credentials, see
6264

6365
## Add role assignments on Azure portal
6466

65-
This sample shows how to assign a `Web PubSub Service Owner` role to a service principal (application) over a Web PubSub resource.
67+
This sample shows how to assign a `Web PubSub Service Owner` role to a service principal (application) over a Web PubSub resource.
6668

6769
> [!Note]
6870
> A role can be assigned to any scope, including management group, subscription, resource group or a single resource. To learn more about scope, see [Understand scope for Azure RBAC](../role-based-access-control/scope-overview.md)
71+
6972
1. On the [Azure portal](https://portal.azure.com/), navigate to your Web PubSub resource.
7073

7174
1. Click **Access Control (IAM)** to display access control settings for the Azure Web PubSub.
@@ -88,26 +91,28 @@ This sample shows how to assign a `Web PubSub Service Owner` role to a service p
8891

8992
1. Click **Select Members**
9093

91-
3. Search for and select the application that you would like to assign the role to.
94+
1. Search for and select the application that you would like to assign the role to.
9295

9396
1. Click **Select** to confirm the selection.
9497

95-
4. Click **Next**.
98+
1. Click **Next**.
9699

97100
![Screenshot of assigning role to service principals.](./media/howto-authorize-from-application/assign-role-to-service-principals.png)
98101

99-
5. Click **Review + assign** to confirm the change.
102+
1. Click **Review + assign** to confirm the change.
100103

101104
> [!IMPORTANT]
102105
> Azure role assignments may take up to 30 minutes to propagate.
103-
To learn more about how to assign and manage Azure role assignments, see these articles:
106+
> To learn more about how to assign and manage Azure role assignments, see these articles:
107+
104108
- [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md)
105109
- [Assign Azure roles using the REST API](../role-based-access-control/role-assignments-rest.md)
106110
- [Assign Azure roles using Azure PowerShell](../role-based-access-control/role-assignments-powershell.md)
107111
- [Assign Azure roles using Azure CLI](../role-based-access-control/role-assignments-cli.md)
108112
- [Assign Azure roles using Azure Resource Manager templates](../role-based-access-control/role-assignments-template.md)
109113

110114
## Use Postman to get the Azure AD token
115+
111116
1. Launch Postman
112117

113118
2. For the method, select **GET**.
@@ -119,15 +124,15 @@ To learn more about how to assign and manage Azure role assignments, see these a
119124
![Screenshot of the basic info using postman to get the token.](./media/howto-authorize-from-application/get-azure-ad-token-using-postman.png)
120125

121126
5. Switch to the **Body** tab, and add the following keys and values.
122-
1. Select **x-www-form-urlencoded**.
123-
2. Add `grant_type` key, and type `client_credentials` for the value.
124-
3. Add `client_id` key, and paste the value of **Application (client) ID** in the **Overview** tab of the application you created earlier.
125-
4. Add `client_secret` key, and paste the value of client secret you noted down earlier.
126-
5. Add `resource` key, and type `https://webpubsub.azure.com` for the value.
127+
1. Select **x-www-form-urlencoded**.
128+
2. Add `grant_type` key, and type `client_credentials` for the value.
129+
3. Add `client_id` key, and paste the value of **Application (client) ID** in the **Overview** tab of the application you created earlier.
130+
4. Add `client_secret` key, and paste the value of client secret you noted down earlier.
131+
5. Add `resource` key, and type `https://webpubsub.azure.com` for the value.
127132

128133
![Screenshot of the body parameters when using postman to get the token.](./media/howto-authorize-from-application/get-azure-ad-token-using-postman-body.png)
129134

130-
6. Select **Send** to send the request to get the token. You see the token in the `access_token` field.
135+
6. Select **Send** to send the request to get the token. You see the token in the `access_token` field.
131136

132137
![Screenshot of the response token when using postman to get the token.](./media/howto-authorize-from-application/get-azure-ad-token-using-postman-response.png)
133138

@@ -146,4 +151,4 @@ See the following related articles:
146151

147152
- [Overview of Azure AD for Web PubSub](concept-azure-ad-authorization.md)
148153
- [Authorize request to Web PubSub resources with Azure AD from managed identities](howto-authorize-from-managed-identity.md)
149-
- [Disable local authentication](./howto-disable-local-auth.md)
154+
- [Disable local authentication](./howto-disable-local-auth.md)

articles/azure-web-pubsub/howto-authorize-from-managed-identity.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ ms.topic: conceptual
1010
---
1111

1212
# Authorize request to Web PubSub resources with Azure AD from managed identities
13-
Azure Web PubSub Service supports Azure Active Directory (Azure AD) authorizing requests from [Managed identities for Azure resources](../active-directory/managed-identities-azure-resources/overview.md).
13+
14+
Azure Web PubSub Service supports Azure Active Directory (Azure AD) authorizing requests from [Managed identities for Azure resources](../active-directory/managed-identities-azure-resources/overview.md).
1415

1516
This article shows how to configure your Web PubSub resource and codes to authorize the request to a Web PubSub resource from a managed identity.
1617

@@ -27,6 +28,7 @@ This is an example for configuring `System-assigned managed identity` on a `Virt
2728
1. Click the **Save** button to confirm the change.
2829

2930
### How to create user-assigned managed identities
31+
3032
- [Create a user-assigned managed identity](../active-directory/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md#create-a-user-assigned-managed-identity)
3133

3234
### How to configure managed identities on other platforms
@@ -41,12 +43,13 @@ This is an example for configuring `System-assigned managed identity` on a `Virt
4143

4244
- [How to use managed identities for App Service and Azure Functions](../app-service/overview-managed-identity.md).
4345

44-
## Add role assignments on Azure portal
46+
## Add role assignments on Azure portal
4547

46-
This sample shows how to assign a `Web PubSub Service Owner` role to a system-assigned identity over a Web PubSub resource.
48+
This sample shows how to assign a `Web PubSub Service Owner` role to a system-assigned identity over a Web PubSub resource.
4749

4850
> [!Note]
4951
> A role can be assigned to any scope, including management group, subscription, resource group or a single resource. To learn more about scope, see [Understand scope for Azure RBAC](../role-based-access-control/scope-overview.md)
52+
5053
1. Open [Azure portal](https://portal.azure.com/), navigate to your Web PubSub resource.
5154

5255
1. Click **Access Control (IAM)** to display access control settings for the Azure Web PubSub.
@@ -77,15 +80,16 @@ This sample shows how to assign a `Web PubSub Service Owner` role to a system-as
7780

7881
1. Click **Select** to confirm the selection.
7982

80-
2. Click **Next**.
83+
1. Click **Next**.
8184

8285
![Screenshot of assigning role to managed identities.](./media/howto-authorize-from-managed-identity/assign-role-to-managed-identities.png)
8386

84-
3. Click **Review + assign** to confirm the change.
87+
1. Click **Review + assign** to confirm the change.
8588

8689
> [!IMPORTANT]
8790
> Azure role assignments may take up to 30 minutes to propagate.
88-
To learn more about how to assign and manage Azure role assignments, see these articles:
91+
> To learn more about how to assign and manage Azure role assignments, see these articles:
92+
8993
- [Assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md)
9094
- [Assign Azure roles using the REST API](../role-based-access-control/role-assignments-rest.md)
9195
- [Assign Azure roles using Azure PowerShell](../role-based-access-control/role-assignments-powershell.md)
@@ -107,4 +111,4 @@ See the following related articles:
107111

108112
- [Overview of Azure AD for Web PubSub](concept-azure-ad-authorization.md)
109113
- [Authorize request to Web PubSub resources with Azure AD from Azure applications](howto-authorize-from-application.md)
110-
- [Disable local authentication](./howto-disable-local-auth.md)
114+
- [Disable local authentication](./howto-disable-local-auth.md)

articles/azure-web-pubsub/howto-create-serviceclient-with-java-and-azure-identity.md

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -48,58 +48,58 @@ This how-to guide shows you how to create a `WebPubSubServiceClient` with Java a
4848

4949
1. Create a `TokenCredential` with Azure Identity SDK.
5050

51-
```java
52-
package com.webpubsub.tutorial;
51+
```java
52+
package com.webpubsub.tutorial;
5353

54-
import com.azure.core.credential.TokenCredential;
55-
import com.azure.identity.DefaultAzureCredentialBuilder;
54+
import com.azure.core.credential.TokenCredential;
55+
import com.azure.identity.DefaultAzureCredentialBuilder;
5656

57-
public class App {
57+
public class App {
5858

59-
public static void main(String[] args) {
60-
TokenCredential credential = new DefaultAzureCredentialBuilder().build();
61-
}
62-
}
63-
```
59+
public static void main(String[] args) {
60+
TokenCredential credential = new DefaultAzureCredentialBuilder().build();
61+
}
62+
}
63+
```
6464

65-
`credential` can be any class that inherits from `TokenCredential` class.
65+
`credential` can be any class that inherits from `TokenCredential` class.
6666

67-
- EnvironmentCredential
68-
- ClientSecretCredential
69-
- ClientCertificateCredential
70-
- ManagedIdentityCredential
71-
- VisualStudioCredential
72-
- VisualStudioCodeCredential
73-
- AzureCliCredential
67+
- EnvironmentCredential
68+
- ClientSecretCredential
69+
- ClientCertificateCredential
70+
- ManagedIdentityCredential
71+
- VisualStudioCredential
72+
- VisualStudioCodeCredential
73+
- AzureCliCredential
7474

75-
To learn more, see [Azure Identity client library for Java](/java/api/overview/azure/identity-readme)
75+
To learn more, see [Azure Identity client library for Java](/java/api/overview/azure/identity-readme)
7676

77-
2. Then create a `client` with `endpoint`, `hub`, and `credential`.
77+
2. Then create a `client` with `endpoint`, `hub`, and `credential`.
7878

79-
```Java
80-
package com.webpubsub.tutorial;
79+
```Java
80+
package com.webpubsub.tutorial;
8181

82-
import com.azure.core.credential.TokenCredential;
83-
import com.azure.identity.DefaultAzureCredentialBuilder;
84-
import com.azure.messaging.webpubsub.WebPubSubServiceClient;
85-
import com.azure.messaging.webpubsub.WebPubSubServiceClientBuilder;
82+
import com.azure.core.credential.TokenCredential;
83+
import com.azure.identity.DefaultAzureCredentialBuilder;
84+
import com.azure.messaging.webpubsub.WebPubSubServiceClient;
85+
import com.azure.messaging.webpubsub.WebPubSubServiceClientBuilder;
8686

87-
public class App {
88-
public static void main(String[] args) {
87+
public class App {
88+
public static void main(String[] args) {
8989

90-
TokenCredential credential = new DefaultAzureCredentialBuilder().build();
90+
TokenCredential credential = new DefaultAzureCredentialBuilder().build();
9191

92-
// create the service client
93-
WebPubSubServiceClient client = new WebPubSubServiceClientBuilder()
94-
.endpoint("<endpoint>")
95-
.credential(credential)
96-
.hub("<hub>")
97-
.buildClient();
98-
}
99-
}
100-
```
92+
// create the service client
93+
WebPubSubServiceClient client = new WebPubSubServiceClientBuilder()
94+
.endpoint("<endpoint>")
95+
.credential(credential)
96+
.hub("<hub>")
97+
.buildClient();
98+
}
99+
}
100+
```
101101

102-
Learn how to use this client, see [Azure Web PubSub service client library for Java](/java/api/overview/azure/messaging-webpubsub-readme)
102+
Learn how to use this client, see [Azure Web PubSub service client library for Java](/java/api/overview/azure/messaging-webpubsub-readme)
103103

104104
## Complete sample
105105

0 commit comments

Comments
 (0)