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-center/authorize-api-access.md
+23-22Lines changed: 23 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,40 +14,42 @@ ms.custom:
14
14
15
15
<!-- Is this a governance or inventory feature -->
16
16
17
-
You can configure settings to authorize users to access APIs in your API center inventory.
17
+
You can configure settings to authorize access to APIs in your API center inventory. These settings:
18
18
19
-
*Add settings to the API center for authentication using API keys or OAuth 2.0 authorization.
20
-
* Associate specific authentication settings with specific API versions in your inventory.
21
-
*Restrict use of API authentication methods to designated users or groups using access policies.
22
-
* Enable authorized users to test APIs directly in the API Center portal.
19
+
*Enable API authentication using API keys or OAuth 2.0 authorization
20
+
* Associate specific authentication methods with specific API versions in your inventory
21
+
*Can limit use of API authentication methods to designated users or groups through access policies
22
+
* Enable authorized users to test APIs directly in the API Center portal
23
23
24
24
> [!NOTE]
25
25
> This feature is currently in preview.
26
26
27
-
* An API center in your Azure subscription. If you haven't created one already, see [Quickstart: Create your API center](../set-up-api-center.md).
27
+
## Prerequisites
28
+
29
+
* An API center in your Azure subscription. If you haven't created one already, see [Quickstart: Create your API center](set-up-api-center.md).
28
30
29
31
* Register at least API in your API center. For more information, see [Tutorial: Register APIs in your API inventory](register-apis.md).
30
32
31
33
* Configure an environment and a deployment for the API. For more information, see [Tutorial: Add environments and deployments for APIs](configure-environments-deployments.md).
32
34
33
35
* Set up the API Center portal. For more information, see [Set up API Center portal](set-up-api-center-portal.md).
34
36
35
-
* (To configure settings for OAuth 2.0 authorization using Microsoft Entra ID) Permissions to create an app registration in a Microsoft Entra tenant associated with your Azure subscription.
37
+
* (For OAuth 2.0 authorization using Microsoft Entra ID) Permissions to create an app registration in a Microsoft Entra tenant associated with your Azure subscription.
36
38
37
39
38
40
## Configure settings for API key authentication
39
41
40
-
Follow these steps to configure settings for API key authentication. The API key is stored in Azure Key Vault, and the API center uses a managed identity to access the key vault.
42
+
Follow these steps to configure settings for API key authentication. The API key must be stored in Azure Key Vault, and access to the key vault is through your API center's managed identity.
41
43
42
44
### Store secret in Azure Key Vault
43
45
44
46
To store the API key securely, use Azure Key Vault. You can create a new key vault or use an existing one, using the Azure portal, Azure tools, or Azure SDKs. Your key vault should use the Azure role-based access control (RBAC) permission model.
45
47
46
-
* For steps to create a Key Vault, see [Create a Key Vault](/azure/key-vault/general/quick-create-portal).
48
+
* For steps to create a key vault, see [Create a Key Vault](/azure/key-vault/general/quick-create-portal).
47
49
48
-
* To store a secret in the Key Vault, see [Set and retrieve secret in Key Vault](/azure/key-vault/secrets/quick-create-portal).
50
+
* To store the API key as a secret in the Key Vault, see [Set and retrieve secret in Key Vault](/azure/key-vault/secrets/quick-create-portal).
49
51
50
-
Note the *secret identifier* of the secret. This is a URI of the form `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<version>`. You will need this value when you configure the API key authorization in your API center.
52
+
Note the *secret identifier* of the secret. This is a URI of the form `https://<key-vault-name>.vault.azure.net/secrets/<secret-name>/<version>`. You need this value when you add the API key configuration in your API center.
51
53
52
54
<!-- Should we use the version of the secret in the URI? -->
53
55
@@ -66,14 +68,14 @@ The following examples show how to enable a system-assigned managed identity by
66
68
67
69
### Assign the Key Vault Secrets User role to the managed identity
68
70
69
-
Assign your API center's managed identity the **Key Vault Secrets User** role in your key vault. The following steps use the [portal](../role-based-access-control/role-assignments-portal-managed-identity.yml).
71
+
Assign your API center's managed identity the **Key Vault Secrets User** role in your key vault. The following steps use the Azure portal.
70
72
71
73
1. In the [portal](https://azure.microsoft.com), navigate to your key vault.
72
74
1. In the left menu, select **Access control (IAM)**.
73
75
1. Select **+ Add role assignment**.
74
76
1. On the **Add role assignment** page, set the values as follows:
75
77
1. On the **Role** tab, select **Key Vault Secrets User**.
76
-
1. On the **Members** tab, in **Assign access to** - Select**Managed identity** > **+ Select members**.
78
+
1. On the **Members** tab, in **Assign access to**, select**Managed identity** > **+ Select members**.
77
79
1. On the **Select managed identities** page, select the system-assigned managed identity of your API center that you added in the previous section. Click **Select**.
78
80
1. Select **Review + assign**.
79
81
@@ -96,16 +98,15 @@ Assign your API center's managed identity the **Key Vault Secrets User** role in
96
98
<!-- Which identity providers are supported? Just Entra? -->
97
99
98
100
99
-
You can configure one or both of the following OAuth 2.0 authorization flows:
101
+
Follow these steps to configure settings for OAuth 2.0 authorization to APIs. You can configure settings for one or both of the following OAuth 2.0 authorization flows:
100
102
101
-
* Authorization code flow with PKCE (Proof Key for Code Exchange) - This flow is recommended for public clients, such as mobile apps or single-page applications (SPAs).
102
-
* Client credentials flow - This flow is recommended for confidential clients, such as web apps or web APIs.
103
+
***Authorization code flow with PKCE (Proof Key for Code Exchange)** - This flow is recommended for authenticating users in mobile and web applications such as the API Center portal.
104
+
***Client credentials flow** - This flow is recommended for machine-to-machine applications that don't require a specific user's permissions to access data, such as background services or daemons.
103
105
104
106
105
107
### Create an OAuth 2.0 app
106
108
107
-
For OAuth 2.0 authorization, create an app registration in an identity provider, such as the Microsoft Entra tenant associated with your Azure subscription. This app registration is used to authenticate users and authorize access to your APIs. The exact steps depend on the identity provider you use. The following example shows how to create an app registration in the Microsoft Entra tenant associated with your Azure subscription.
108
-
109
+
For OAuth 2.0 authorization, create an app registration in an identity provider, such as the Microsoft Entra tenant associated with your Azure subscription. The exact steps depend on the identity provider you use. The following example shows how to create an app registration in the Microsoft Entra tenant associated with your Azure subscription.
109
110
110
111
111
112
Minimally you need to configure:
@@ -120,7 +121,7 @@ Minimally you need to configure:
120
121
1. On the **Register an application** page, enter your application registration settings:
121
122
1. In **Name**, enter a meaningful name for the app.
122
123
1. In **Supported account types**, select an option that suits your scenario, for example, **Accounts in this organizational directory only (Single tenant)**.
123
-
1. Set the **Redirect URI** to **SPA**, and set the URI. Enter the URI of your API Center portal deployment, in the following form: https://<service-name>.portal.<location>.azure-api-center.ms.
124
+
1. Set the **Redirect URI** to **SPA**, and set the URI. Enter the URI of your API Center portal deployment, in the following form: `https://<service-name>.portal.<location>.azure-api-center.ms`
124
125
1. Select **Register**.
125
126
1. On the left menu, under **Manage**, select **Certificates & secrets**, and then select **+ New client secret**.
126
127
1. Enter a **Description**.
@@ -144,8 +145,8 @@ In the following section, you will need the following values:
144
145
1. In **Security scheme**, select **OAuth2**.
145
146
1. In **Client ID**, enter the client ID of the app that you created in the previous section.
146
147
1. In **Client secret**, enter the client secret of the app that you created in the previous section.
147
-
1. In **Authorization URL**, enter the OAuth 2.0 authorization endpoint configured in the app in the previous section.
148
-
1. In **Token URL**, enter the OAuth 2.0 token endpoint configured in the app in the previous section.
148
+
1. In **Authorization URL**, enter the OAuth 2.0 authorization endpoint used by the identity provider.
149
+
1. In **Token URL**, enter the OAuth 2.0 token endpoint used by the identity provider.
149
150
1. In **OAuth2 flow**, select one or both of the OAuth 2.0 flows that you want to use. Available values are **Authorization code (PKCE)** and **Client credentials**.
150
151
1. In **Scopes**, optionally enter one or more API scopes that your API supports. Example: `User.Read`
151
152
1. Select **Create**.
@@ -185,7 +186,7 @@ You can limit access to the authentication settings associated with an API to sp
185
186
## Test API in API Center portal
186
187
187
188
188
-
You can test an API with the authorization in the API Center portal.
189
+
You can test an API with the authentication and access settings in the API Center portal.
189
190
190
191
1. In the [portal](https://azure.microsoft.com), navigate to your API center.
191
192
1. In the left menu, under **API Center Portal**, select **Portal settings**.
0 commit comments