Skip to content

Commit c738b22

Browse files
Merge pull request #288054 from dlepow/revert-286049-subopen
Revert "[APIM] Subscription key with open-product APIs"
2 parents d002555 + 98aaf92 commit c738b22

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 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: 09/03/2024
9+
ms.date: 08/02/2023
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 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:
137137

138138
* A subscription scoped to the API
139139
* 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
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-
147145
1. Otherwise, access is denied (401 Access denied error).
148146

149147
### API request without a subscription key
150148

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

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.
154152
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.
155153
1. If no configured product or API is found, then access is denied (401 Access denied error).
156154

@@ -164,14 +162,14 @@ The following table summarizes how the gateway handles API requests with or with
164162
|✔️ | ✔️ | 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 |
165163
|✔️ || 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. |
166164
|❌<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 |
168166

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

171169
### Considerations
172170

173171
- 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.
175173
- API access "context" means the policies and access controls that are applied at a particular scope (for example, API or product).
176174

177175
## Next steps

0 commit comments

Comments
 (0)