Skip to content

Commit 80f6384

Browse files
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into js-ts-combine
2 parents 5f09bbf + 8fe8305 commit 80f6384

File tree

362 files changed

+6206
-3103
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

362 files changed

+6206
-3103
lines changed

articles/api-management/api-management-subscriptions.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: dlepow
66

77
ms.service: azure-api-management
88
ms.topic: conceptual
9-
ms.date: 08/02/2023
9+
ms.date: 09/03/2024
1010
ms.author: danlep
1111
ms.custom: engagement-fy23
1212
---
@@ -133,7 +133,7 @@ After the subscription requirement is disabled, the selected API or APIs can be
133133

134134
When API Management receives an API request from a client with a subscription key, it handles the request according to these rules:
135135

136-
1. Check if it's a valid key associated with an active subscription, either:
136+
1. Check first if it's a valid key associated with an active subscription, either:
137137

138138
* A subscription scoped to the API
139139
* A subscription scoped to a product that's assigned to the API
@@ -142,13 +142,15 @@ When API Management receives an API request from a client with a subscription ke
142142

143143
If a valid key for an active subscription at an appropriate scope is provided, access is allowed. Policies are applied depending on the configuration of the policy definition at that scope.
144144

145+
1. If the key isn't valid but a product exists that includes the API but doesn't require a subscription (an *open* product), ignore the key and handle as an API request without a subscription key (see below).
146+
145147
1. Otherwise, access is denied (401 Access denied error).
146148

147149
### API request without a subscription key
148150

149151
When API Management receives an API request from a client without a subscription key, it handles the request according to these rules:
150152

151-
1. Check first for the existence of a product that includes the API but doesn't require a subscription (an *open* product). If the open product exists, handle the request in the context of the APIs, policies, and access rules configured for the product. An API can be associated with at most one open product.
153+
1. Check first for the existence of a product that includes the API but doesn't require a subscription (an *open* product). If the open product exists, handle the request in the context of the APIs, policies, and access rules configured for the open product. An API can be associated with at most one open product.
152154
1. If an open product including the API isn't found, check whether the API requires a subscription. If a subscription isn't required, handle the request in the context of that API and operation.
153155
1. If no configured product or API is found, then access is denied (401 Access denied error).
154156

@@ -160,16 +162,16 @@ The following table summarizes how the gateway handles API requests with or with
160162
|All products assigned to API require subscription |API requires subscription |API call with subscription key |API call without subscription key | Typical scenarios |
161163
|---------|---------|---------|---------|----|
162164
|✔️ | ✔️ | Access allowed:<br/><br/>• Product-scoped key<br/>• API-scoped key<br/>• All APIs-scoped key<br/>• Service-scoped key<br/><br/>Access denied:<br/><br/>• Other key not scoped to applicable product or API | Access denied | Protected API access using product-scoped or API-scoped subscription |
163-
|✔️ || Access allowed:<br/><br/>• Product-scoped key<br/>• API-scoped key<br/>• All APIs-scoped key<br/>• Service-scoped key<br/><br/>Access denied:<br/><br/>• Other key not scoped to applicable product or API | Access allowed (API context) | • Protected API access with product-scoped subscription<br/><br/>• Anonymous access to API. If anonymous access isn’t intended, configure API-level policies to enforce authentication and authorization. |
165+
|✔️ || Access allowed:<br/><br/>• Product-scoped key<br/>• API-scoped key<br/>• All APIs-scoped key<br/>• Service-scoped key<br/>• Other key not scoped to applicable product or API | Access allowed (API context) | • Protected API access with product-scoped subscription<br/><br/>• Anonymous access to API. If anonymous access isn’t intended, configure API-level policies to enforce authentication and authorization. |
164166
|❌<sup>1</sup> | ✔️ | Access allowed:<br/><br/>• Product-scoped key<br/>• API-scoped key<br/>• All APIs-scoped key<br/>• Service-scoped key<br/><br/>Access denied:<br/><br/>• Other key not scoped to applicable product or API | Access allowed (open product context) | • Protected API access with API-scoped subscription<br/><br/>• Anonymous access to API. If anonymous access isn’t intended, configure with product policies to enforce authentication and authorization |
165-
|❌<sup>1</sup> || Access allowed:<br/><br/>• Product-scoped key<br/>• API-scoped key<br/>• All APIs-scoped key<br/>• Service-scoped key<br/><br/>Access denied:<br/><br/>• Other key not scoped to applicable product or API | Access allowed (open product context) | Anonymous access to API. If anonymous access isn’t intended, configure with product policies to enforce authentication and authorization |
167+
|❌<sup>1</sup> || Access allowed:<br/><br/>• Product-scoped key<br/>• API-scoped key<br/>• All APIs-scoped key<br/>• Service-scoped key<br/>• Other key not scoped to applicable product or API | Access allowed (open product context) | Anonymous access to API. If anonymous access isn’t intended, configure with product policies to enforce authentication and authorization |
166168

167169
<sup>1</sup> An open product exists that's associated with the API.
168170

169171
### Considerations
170172

171173
- API access in a product context is the same, whether the product is published or not. Unpublishing the product hides it from the developer portal, but it doesn’t invalidate new or existing subscription keys.
172-
- Even if a product or API doesn't require a subscription, a valid key from an active subscription that enables access to the product or API can still be used.
174+
- If an API doesn't require subscription authentication, any API request that includes a subscription key is treated the same as a request without a subscription key. The subscription key is ignored.
173175
- API access "context" means the policies and access controls that are applied at a particular scope (for example, API or product).
174176

175177
## Next steps

articles/api-management/quickstart-terraform.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ In this article, you learn how to:
8282

8383
[!INCLUDE [terraform-apply-plan.md](~/azure-dev-docs-pr/articles/terraform/includes/terraform-apply-plan.md)]
8484

85+
> [!NOTE]
86+
> It can take 30 to 40 minutes to create and activate an API Management service.
87+
8588
## Verify the results
8689

8790
#### [Azure CLI](#tab/azure-cli)
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Setting HTTPOnly or Secure flag for Session Affinity cookie
3+
titleSuffix: Azure Application Gateway
4+
description: Learn how to set HTTPOnly or Secure flag for Session Affinity cookie
5+
services: application-gateway
6+
author: jaesoni
7+
ms.service: azure-application-gateway
8+
ms.topic: how-to
9+
ms.date: 10/22/2024
10+
ms.author: jaysoni
11+
---
12+
13+
# Setting HTTPOnly or Secure flag for Session Affinity cookie
14+
In this guide you learn to create a Rewrite set for your Application Gateway and configure Secure and HttpOnly [ApplicationGatewayAffinity cookie](configuration-http-settings.md#cookie-based-affinity).
15+
16+
17+
## Prerequisites
18+
* You must have an Azure subscription. You can create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
19+
* An existing Application Gateway resource configured with at least one Listener, Rule, Backend Setting and Backend Pool configuration. If you don't have one, you can create one by following the [QuickStart guide](quick-create-portal.md).
20+
21+
## Creating a Rewrite set
22+
23+
1. Sign in to the Azure portal.
24+
1. Navigate to the required Application Gateway resource.
25+
1. Select Rewrites in the left pane.
26+
1. Select Rewrite set.
27+
1. Under the Name and Association tab
28+
1. Specify a name for this new rewrite set.
29+
1. Select the routing rules for which you wish to rewrite the ApplicationGatewayAffinity cookie's flag.
30+
1. Select Next.
31+
1. Select "Add rewrite rule"
32+
1. Enter a name for the rewrite rule.
33+
1. Enter a numeric value for Rule Sequence field.
34+
1. Select "Add condition"
35+
1. Now open the "If" condition box and use the following details.
36+
1. Type of variable to check - HTTP header
37+
1. Header type - Response header
38+
1. Header name - Common header
39+
1. Common header - Set-Cookie
40+
1. Case-sensitive - No
41+
1. Operator - equal (=)
42+
1. Pattern to match - (.*)
43+
1. To save these details, select **OK**.
44+
1. Go to the **Then** box to specify action details.
45+
1. Rewrite type - Response header
46+
1. Action type - Set
47+
1. Header name - Common header
48+
1. Common header - Set-Cookie
49+
1. Header value - {http_resp_Set-Cookie_1}; HttpOnly; Secure
50+
1. Select **OK**
51+
1. Select Update to save the rewrite set configurations.
52+
53+
54+
## Next steps
55+
[Visit other configurations of a Backend Setting](configuration-http-settings.md)
2.41 KB
Loading

0 commit comments

Comments
 (0)