You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/api-management-subscriptions.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: dlepow
6
6
7
7
ms.service: azure-api-management
8
8
ms.topic: conceptual
9
-
ms.date: 09/03/2024
9
+
ms.date: 08/02/2023
10
10
ms.author: danlep
11
11
ms.custom: engagement-fy23
12
12
---
@@ -133,7 +133,7 @@ After the subscription requirement is disabled, the selected API or APIs can be
133
133
134
134
When API Management receives an API request from a client with a subscription key, it handles the request according to these rules:
135
135
136
-
1. Check first if it's a valid key associated with an active subscription, either:
136
+
1. Check if it's a valid key associated with an active subscription, either:
137
137
138
138
* A subscription scoped to the API
139
139
* A subscription scoped to a product that's assigned to the API
@@ -142,15 +142,13 @@ When API Management receives an API request from a client with a subscription ke
142
142
143
143
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.
144
144
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
-
147
145
1. Otherwise, access is denied (401 Access denied error).
148
146
149
147
### API request without a subscription key
150
148
151
149
When API Management receives an API request from a client without a subscription key, it handles the request according to these rules:
152
150
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.
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.
154
152
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.
155
153
1. If no configured product or API is found, then access is denied (401 Access denied error).
156
154
@@ -164,14 +162,14 @@ The following table summarizes how the gateway handles API requests with or with
164
162
|✔️ | ✔️ | 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 |
165
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. |
166
164
|❌<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 |
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 |
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 |
168
166
169
167
<sup>1</sup> An open product exists that's associated with the API.
170
168
171
169
### Considerations
172
170
173
171
- 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.
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.
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.
175
173
- API access "context" means the policies and access controls that are applied at a particular scope (for example, API or product).
0 commit comments