Skip to content

Commit 9df6dec

Browse files
Apply suggestions from review
Co-authored-by: Karl Erickson <[email protected]>
1 parent 9b40e37 commit 9df6dec

File tree

3 files changed

+32
-34
lines changed

3 files changed

+32
-34
lines changed

articles/spring-apps/includes/tutorial-authenticate-client-with-gateway/authenticate-client-with-gateway-consumption-plan.md

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ For clarity of structure, a separate markdown file is used to describe how to de
1515

1616
## 2. Prepare the Spring project
1717

18-
Use the following steps to clone and run the app locally.
18+
Use the following steps to clone and run the app locally:
1919

2020
1. Use the following command to clone the sample project from GitHub:
2121

@@ -54,16 +54,14 @@ Use the following steps to create a service instance:
5454

5555
:::image type="content" source="../../media/tutorial-authenticate-client-with-gateway/create-service-instance.png" alt-text="Screenshot of the Azure portal that shows the Create a resource page with Azure Spring Apps highlighted." lightbox="../../media/tutorial-authenticate-client-with-gateway/create-service-instance.png":::
5656

57-
1. Fill out the **Basics** form with the following information:
58-
59-
Use the following table as a guide for completing the form. The recommended **Plan** is `Standard consumption & dedicated (preview)`.
57+
1. Fill out the **Basics** form. Use the following table as a guide for completing the form. The recommended value for **Plan** is **Standard consumption & dedicated (preview)**.
6058

6159
| Setting | Suggested value | Description |
6260
|----------------------------|----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
6361
| Subscription | Your subscription name | The Azure subscription that you want to use for your server. If you have multiple subscriptions, choose the subscription in which you'd like to be billed for the resource. |
6462
| Resource group | *myresourcegroup* | A new resource group name or an existing one from your subscription. |
6563
| Name | *myasa* | A unique name that identifies your Azure Spring Apps service. The name must be between 4 and 32 characters long and can contain only lowercase letters, numbers, and hyphens. The first character of the service name must be a letter and the last character must be either a letter or a number. |
66-
| Plan | *Standard consumption & dedicated (preview)* | The pricing plan determines the resources and cost associated with your instance. |
64+
| Plan | **Standard consumption & dedicated (preview)** | The pricing plan determines the resources and cost associated with your instance. |
6765
| Region | The region closest to your users | The location that is closest to your users. |
6866
| Container Apps Environment | *myacaenv* | Select which Container Apps environment instance to share the same virtual network with other services and resources. |
6967

@@ -74,15 +72,15 @@ Use the following steps to create a service instance:
7472
| Setting | Suggested value | Description |
7573
|------------------|-----------------|------------------------------------------------------------------------------------------|
7674
| Environment name | *myacaenv* | A unique name that identifies your Azure Container Apps Environment service. |
77-
| Plan | *Consumption* | The pricing plan determines the resources and cost associated with your instance. |
78-
| Zone Redundant | *Disabled* | Whether to create your Container Apps Environment service in an Azure availability zone. |
75+
| Plan | **Consumption** | The pricing plan determines the resources and cost associated with your instance. |
76+
| Zone Redundant | **Disabled** | Whether to create your Container Apps Environment service in an Azure availability zone. |
7977

80-
:::image type="content" source="../../media/tutorial-authenticate-client-with-gateway/create-apps-container-env-basics.png" alt-text="Screenshot of the Azure portal that shows the Create Azure Container Apps page." lightbox="../../media/tutorial-authenticate-client-with-gateway/create-apps-container-env-basics.png":::
78+
:::image type="content" source="../../media/tutorial-authenticate-client-with-gateway/create-apps-container-environment-basics.png" alt-text="Screenshot of the Azure portal that shows the Create Azure Container Apps page." lightbox="../../media/tutorial-authenticate-client-with-gateway/create-apps-container-environment-basics.png":::
8179

8280
> [!IMPORTANT]
8381
> The Consumption workload profile has a pay-as-you-go billing model, with no starting cost. You're billed for the dedicated workload profile based on the provisioned resources. For more information, see [Workload profiles in Consumption + Dedicated plan structure environments in Azure Container Apps (preview)](../../../container-apps/workload-profiles-overview.md) and [Azure Spring Apps pricing](https://azure.microsoft.com/pricing/details/spring-apps/).
8482
85-
4. Select **Review and Create** to review your selections. Select **Create** to provision the Azure Spring Apps instance.
83+
1. Select **Review and Create** to review your selections. Select **Create** to provision the Azure Spring Apps instance.
8684

8785
1. On the toolbar, select the **Notifications** icon (a bell) to monitor the deployment process. After the deployment is done, you can select **Pin to dashboard**, which creates a tile for this service on your Azure portal dashboard as a shortcut to the service's **Overview** page. Select **Go to resource** to open the service's **Overview** page.
8886

@@ -98,17 +96,17 @@ Use the following steps to create a service instance:
9896

9997
### 3.3. Register the Books application
10098

101-
This section provides the steps to register an application to add app roles in Azure AD, which is used for protecting the RESTful APIs in Azure Spring Apps.
99+
This section provides the steps to register an application to add app roles in Microsoft Entra ID, which is used for protecting the RESTful APIs in Azure Spring Apps.
102100

103101
1. Go to the Azure portal homepage.
104102

105103
1. If you have access to multiple tenants, use the **Directory + subscription** filter (:::image type="icon" source="../../media/tutorial-authenticate-client-with-gateway/portal-directory-subscription-filter.png" border="false":::) to select the tenant in which you want to register an application.
106104

107-
1. Search for and Select **Azure Active Directory**.
105+
1. Search for and select **Azure Active Directory**.
108106

109107
1. Under **Manage**, select **App registrations** > **New registration**.
110108

111-
1. Enter a name for your application in the **Name** field, for example `Books`. Users of your app might see this name, and you can change it later.
109+
1. Enter a name for your application in the **Name** field, for example *Books*. Users of your app might see this name, and you can change it later.
112110

113111
1. For **Supported account types**, select **Accounts in this organizational directory only**.
114112

@@ -122,18 +120,18 @@ This section provides the steps to register an application to add app roles in A
122120

123121
1. Under **Manage**, select **App roles** > **Create app role**, and then enter the following information:
124122

125-
- For **Display name**, enter `Write`.
123+
- For **Display name**, enter *Write*.
126124
- For **Allowed member types**, select **Applications**.
127-
- For **Value**, enter `Books.Write`.
128-
- For **Description**, enter `Adding books`.
125+
- For **Value**, enter *Books.Write*.
126+
- For **Description**, enter *Adding books*.
129127

130128
1. Repeat the previous step to add another app role: `Books.Read`.
131129

132130
:::image type="content" source="../../media/tutorial-authenticate-client-with-gateway/app-roles.png" alt-text="Screenshot of the Books app registration page that shows the App roles." lightbox="../../media/tutorial-authenticate-client-with-gateway/app-roles.png":::
133131

134132
### 3.4. Register the SPA application
135133

136-
The Books RESTful API app acts as a resource server, which is protected by Azure AD. Before acquiring an access token, it's required to register another application in Azure AD and grant permissions to the client application, which is named `SPA`.
134+
The Books RESTful API app acts as a resource server, which is protected by Microsoft Entra ID. Before acquiring an access token, you're required to register another application in Microsoft Entra ID and grant permissions to the client application, which is named `SPA`.
137135

138136
1. Go back to your tenant in **Azure Active Directory**.
139137

@@ -147,21 +145,21 @@ The Books RESTful API app acts as a resource server, which is protected by Azure
147145

148146
1. On the app **Overview** page, look for the **Application (client) ID** value, and then record it for later use. You need it to acquire access token.
149147

150-
1. Select **API permissions** > **Add a permission** > **APIs my organization uses**. Select the `Books` application that you registered earlier, select the Permissions **Books.Read** and **Books.Write**, and then select **Add permissions**.
148+
1. Select **API permissions** > **Add a permission** > **APIs my organization uses**. Select the `Books` application that you registered earlier, select the permissions **Books.Read** and **Books.Write**, and then select **Add permissions**.
151149

152-
1. Select **Grant admin consent for {your-tenant-name}** to grant admin consent for the permissions you added.
150+
1. Select **Grant admin consent for \<your-tenant-name>** to grant admin consent for the permissions you added.
153151

154152
:::image type="content" source="../../media/tutorial-authenticate-client-with-gateway/api-permissions.png" alt-text="Screenshot of the SPA API permissions page that shows the API permissions of a web application." lightbox="../../media/tutorial-authenticate-client-with-gateway/api-permissions.png":::
155153

156-
1. Navigate to **Certificates & secrets**, and then select **New client secret**.
154+
1. Navigate to **Certificates & secrets** and then select **New client secret**.
157155

158156
1. On the **Add a client secret** page, enter a description for the secret, select an expiration date, and then select **Add**.
159157

160-
1. Look for the **Value** of the secret, and then record it for later use. You need it to acquire access token.
158+
1. Look for the **Value** of the secret and then record it for later use. You need it to acquire an access token.
161159

162160
### 3.5. Update the configuration of Books Service app
163161

164-
Update the configuration of `spring.cloud.azure.active-directory` in the `books-service` application configuration file. Be sure to replace the placeholders with your own values you created in the previous step.
162+
Update the configuration of `spring.cloud.azure.active-directory` in the `books-service` application configuration file to match the following example. Be sure to replace the placeholders with your own values you created in the previous step.
165163

166164
```yaml
167165
spring:
@@ -185,21 +183,21 @@ The following steps show you how to deploy the apps to Azure.
185183

186184
### 4.1. Deploy the microservice apps to Azure Spring Apps
187185

188-
Use the [Maven plugin for Azure Spring Apps](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Spring-Apps) to deploy the apps to Azure Spring Apps.
186+
Use the following steps to deploy the apps to Azure Spring Apps using the [Maven plugin for Azure Spring Apps](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Spring-Apps):
189187

190-
1. Navigate to the sample project directory and execute the following command to config the app in Azure Spring Apps:
188+
1. Navigate to the sample project directory and then use the following command to configure the app in Azure Spring Apps:
191189

192190
```bash
193191
./mvnw com.microsoft.azure:azure-spring-apps-maven-plugin:1.18.0:config
194192
```
195193

196194
The following list describes the command interactions:
197195

198-
- **Select child modules to configure(input numbers separated by comma, eg: [1-2,4,6], ENTER to select ALL)**: Press <kbd>Enter</kbd> to select all.
196+
- **Select child modules to configure (input numbers separated by comma, eg: [1-2,4,6], ENTER to select ALL)**: Press <kbd>Enter</kbd> to select all.
199197
- **OAuth2 login**: Authorize the login to Azure based on the OAuth2 protocol.
200198
- **Select subscription**: Select the subscription list number of the Azure Spring Apps instance you created, which defaults to the first subscription in the list. If you use the default number, press <kbd>Enter</kbd> directly.
201199
- **Select Azure Spring Apps for deployment**: Select the list number of the Azure Spring Apps instance you created. If you use the default number, press <kbd>Enter</kbd> directly.
202-
- **Select apps to expose public access:(input numbers separated by comma, eg: [1-2,4,6], ENTER to select NONE)**: Enter *1* for `gateway-service`.
200+
- **Select apps to expose public access: (input numbers separated by comma, eg: [1-2,4,6], ENTER to select NONE)**: Enter *1* for `gateway-service`.
203201
- **Confirm to save all the above configurations (Y/n)**: Enter <kbd>y</kbd>. If you enter <kbd>n</kbd>, the configuration isn't saved in the POM files.
204202

205203
1. Use the following command to deploy the app:
@@ -208,11 +206,11 @@ Use the [Maven plugin for Azure Spring Apps](https://github.com/microsoft/azure-
208206
./mvnw azure-spring-apps:deploy
209207
```
210208

211-
The following list describes the command interactions:
209+
The following list describes the command interaction:
212210

213211
- **OAuth2 login**: You need to authorize the login to Azure based on the OAuth2 protocol.
214212

215-
After the command is executed, you can see the following log signs that the deployment was successful.
213+
After the command is executed, you can see the following log messages, which indicate that the deployment was successful.
216214

217215
```output
218216
[INFO] Getting public url of app(gateway-service)...
@@ -227,9 +225,9 @@ Use the [Maven plugin for Azure Spring Apps](https://github.com/microsoft/azure-
227225

228226
The output **Application url** is the base endpoint to access the ToDo RESTful API application.
229227

230-
### 4.2. Deploy the SPA app locally
228+
### 4.2. Run the SPA app locally
231229

232-
Update the configuration in the `SPA` application script file `spa/server.js`. Be sure to replace the placeholders with your own values you created in the previous step.
230+
Update the configuration in the `SPA` application script file *spa/server.js* to match the following example. Be sure to replace the placeholders with your own values you created in the previous step.
233231

234232
```javascript
235233
const SpringCloudGatewayURL = "<URL exposed by app gateway-service>"

articles/spring-apps/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ items:
8585
items:
8686
- name: Custom DNS name
8787
href: how-to-custom-domain.md
88-
- name: Authenticate client with gateway on Azure Spring Apps
88+
- name: Authenticate client with Spring Cloud Gateway
8989
href: tutorial-authenticate-client-with-gateway.md
9090
- name: Concepts
9191
items:

articles/spring-apps/tutorial-authenticate-client-with-gateway.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ms.custom: devx-track-java, devx-track-extended-java, devx-track-azurecli, mode-
2121

2222
This quickstart shows you how to secure communication between a client application and a microservice application that is hosted on Azure Spring Apps and shielded with a Spring Cloud Gateway app. The client application is verified as a security principal to initiate contact with the microservice deployed on Azure Spring Apps, using the app built with [Spring Cloud Gateway](https://docs.spring.io/spring-cloud-gateway/docs/current/reference/html/). This method employs Spring Cloud Gateway's Token Relay and Spring Security's Resource Server features for the processes of authentication and authorization, realized through the execution of the [OAuth 2.0 client credentials flow](../active-directory/develop/v2-oauth2-client-creds-grant-flow.md).
2323

24-
The following list shows the composition of a sample project:
24+
The following list shows the composition of the sample project:
2525

2626
- Books SPA: This Single Page Application (SPA), hosted locally, interacts with the Books microservice for adding or searching for books.
2727
- Books microservice:
@@ -33,7 +33,7 @@ The following list shows the composition of a sample project:
3333
- An Azure subscription. If you don't have a subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
3434
- [Git](https://git-scm.com/downloads).
3535
- [Java Development Kit (JDK)](/java/azure/jdk/), version 17.
36-
- An Azure AD tenant. For more information on how to create an Azure AD tenant, see [Quickstart: Create a new tenant in Azure AD](../active-directory/fundamentals/create-new-tenant.md).
36+
- A Microsoft Entra ID tenant. For more information on how to create a Microsoft Entra ID tenant, see [Quickstart: Create a new tenant in Azure AD](../active-directory/fundamentals/create-new-tenant.md).
3737
- [Azure CLI](/cli/azure/install-azure-cli) version 2.45.0 or higher.
3838
- Install [Node.js](https://nodejs.org).
3939

@@ -45,7 +45,7 @@ You can access the Books SPA app that communicates with the Books RESTful APIs t
4545

4646
1. Go to `http://localhost:3000` in your browser to access the application.
4747

48-
1. Enter an **Author** and a **Title**, and then select **Add Book**. You'll see a response similar to the following example:
48+
1. Enter values for **Author** and **Title**, and then select **Add Book**. You see a response similar to the following example:
4949

5050
```output
5151
Book added successfully: {"id":1,"author":"Jeff Black","title":"Spring In Action"}
@@ -71,7 +71,7 @@ You can access the Books SPA app that communicates with the Books RESTful APIs t
7171
> [Use managed identities for applications in Azure Spring Apps](./how-to-use-managed-identities.md)
7272
7373
> [!div class="nextstepaction"]
74-
> [Run microservice apps(Pet Clinic)](./quickstart-sample-app-introduction.md)
74+
> [Run microservice apps (Pet Clinic)](./quickstart-sample-app-introduction.md)
7575
7676
> [!div class="nextstepaction"]
7777
> [Run polyglot apps on Enterprise plan (ACME Fitness Store)](./quickstart-sample-app-acme-fitness-store-introduction.md)

0 commit comments

Comments
 (0)