Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
This security baseline applies guidance from the Microsoft cloud security benchmark to Azure API Management. The Microsoft cloud security benchmark provides recommendations on how you can secure your cloud solutions on Azure. The content is grouped by the security controls defined by the Microsoft cloud security benchmark and the related guidance applicable to API Management.
You can monitor this security baseline and its recommendations by using Microsoft Defender for Cloud. Azure Policy definitions are listed in the Regulatory Compliance section of the Microsoft Defender for Cloud portal page.
When a feature has relevant Azure Policy definitions, they're listed in this baseline to help you measure compliance with the Microsoft cloud security benchmark controls and recommendations. Some recommendations might require a paid Microsoft Defender plan to enable certain security scenarios.
Note
Features not applicable to API Management are excluded. To see how API Management completely maps to the Microsoft cloud security benchmark, see the full API Management security baseline mapping file.
Security profile
The security profile summarizes high-impact behaviors of API Management, which might result in increased security considerations.
| Service behavior attribute | Value |
|---|---|
| Product category | Web |
| Customer can access HOST / OS | No Access |
| Service can be deployed into customer's virtual network | True |
| Stores customer data at rest | False |
Network security
For more information, see Microsoft cloud security benchmark: Network security.
NS-1: Establish network segmentation boundaries
Features
Virtual network integration
Description: Service supports deployment into customer's private virtual network. To learn more, see Services that can be deployed into a virtual network.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Deploy API Management inside an Azure Virtual Network, so it can access backend services within the network. The developer portal and API Management gateway can be configured to be accessible either from the internet (external) or only within the virtual network (internal).
- External: the API Management gateway and developer portal are accessible from the public internet via an external load balancer. The gateway can access resources within the virtual network.
- Internal: the API Management gateway and developer portal are accessible only from within the virtual network via an internal load balancer. The gateway can access resources within the virtual network.
Reference: Use a virtual network with Azure API Management
Network security group support
Description: Service network traffic respects network security group (NSG) rule assignment on its subnets. To learn more, see Azure network security groups overview.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Deploy network security groups to your API Management subnets to restrict or monitor traffic by port, protocol, source IP address, or destination IP address. Create NSG rules to restrict your service's open ports (such as preventing management ports from being accessed from untrusted networks). Be default, NSGs deny all inbound traffic but allow traffic from virtual network and Azure Load Balancers.
Caution: When configuring an NSG on the API Management subnet, a set of ports are required to be open. If any of these ports are unavailable, API Management might not operate properly and might become inaccessible.
Note: Configure NSG rules for API Management
Reference: Virtual network configuration reference: API Management
NS-2: Secure cloud services with network controls
Features
Azure Private Link
Description: Service native IP filtering capability for filtering network traffic (not to be confused with NSG or Azure Firewall). To learn more, see What is Azure Private Link?
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: In instances where you're unable to deploy API Management instances into a virtual network, you should instead deploy a private endpoint to establish a private access point for those resources.
Note: To enable private endpoints, the API Management instance can't already be configured with an external or internal virtual network. A private endpoint connection supports only incoming traffic to the API Management instance.
Reference: Connect privately to API Management using a private endpoint
Disable public network access
Description: Service supports disabling public network access either through using service-level IP ACL filtering rule (not NSG or Azure Firewall) or using a Disable Public Network Access toggle switch. To learn more, see NS-2: Secure cloud services with network controls.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Disable public network access either using the IP ACL filtering rule on the NSGs assigned to the service's subnets or a toggling switch for public network access.
Note: API Management supports deployments into a virtual network, as well as locking down non-network-based deployments with a private endpoint and disabling public network access.
Reference: Disable public network access
Microsoft Defender for Cloud monitoring
Azure Policy built-in definitions - Microsoft.ApiManagement:
| Name (Azure portal) |
Description | Effect(s) | Version (GitHub) |
|---|---|---|---|
| API Management services should use a virtual network | Azure Virtual Network deployment provides enhanced security, isolation and allows you to place your API Management service in a non-internet routable network that you control access to. These networks can then be connected to your on-premises networks using various VPN technologies, which enables access to your backend services within the network and/or on-premises. The developer portal and API gateway, can be configured to be accessible either from the Internet or only within the virtual network. | Audit, Deny, Disabled | 1.0.2 |
NS-6: Deploy web application firewall
Other guidance for NS-6
To protect critical Web/HTTP APIs, configure API Management within a virtual network in internal mode and configure an Azure Application Gateway. Application Gateway is a PaaS service. It acts as a reverse-proxy and provides L7 load balancing, routing, web application firewall (WAF), and other services. To learn more, see Integrate API Management in an internal virtual network with Application Gateway.
Combining API Management provisioned in an internal virtual network with the Application Gateway frontend enables the following scenarios:
- Use a single API Management resource to expose all APIs to both internal consumers and external consumers.
- Use a single API Management resource for exposing a subset of APIs to external consumers.
- Provide a way of switching access to API Management from the public internet on and off.
Identity management
For more information, see Microsoft cloud security benchmark: Identity management.
IM-1: Use centralized identity and authentication system
Features
Microsoft Entra authentication required for data plane access
Description: Service supports using Microsoft Entra authentication for data plane access. To learn more, see What is Microsoft Entra authentication?
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Use Microsoft Entra ID as the default authentication method for API Management where possible.
- Configure your API Management developer portal to authenticate developer accounts by using Microsoft Entra ID.
- Configure your API Management instance to protect your APIs by using the OAuth 2.0 protocol with Microsoft Entra ID.
Reference: Protect an API in Azure API Management using OAuth 2.0 authorization with Microsoft Entra ID
Local authentication methods for data plane access
Description: Local authentications methods supported for data plane access, such as a local username and password. To learn more, see Authentication and authorization.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Feature notes: Avoid the usage of local authentication methods or accounts, these should be disabled wherever possible. Instead, use Microsoft Entra ID to authenticate where possible.
Configuration guidance: Restrict the use of local authentication methods for data plane access. Maintain inventory of API Management user accounts and reconcile access as needed. In API Management, developers are the consumers of the APIs that are exposed with API Management. By default, newly created developer accounts are active, and associated with the Developers group. Developer accounts that are in an active state can be used to access all of the APIs for which they have subscriptions.
Also, API Management subscriptions are one means of securing access to APIs and come with a pair of generated subscription keys, which support rotation.
Instead of using other authentication methods, where possible use Microsoft Entra ID as the default authentication method to control your data plane access.
Reference: API Management policy reference
IM-3: Manage application identities securely and automatically
Features
Managed identities
Description: Data plane actions support authentication using managed identities. To learn more, see What is managed identities for Azure resources?
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Use a Managed Service Identity generated by Microsoft Entra ID to allow your API Management instance to easily and securely access other Microsoft Entra-protected resources, such as Azure Key Vault instead of using service principals. Managed identity credentials are fully managed, rotated, and protected by the platform, avoiding hard-coded credentials in source code or configuration files.
Reference: API Management policy reference
Service principals
Description: Data plane supports authentication using service principals. To learn more, see Create an Azure service principal with Azure PowerShell.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: There's no current Microsoft guidance for this feature configuration. Review and determine if your organization wants to configure this security feature.
IM-5: Use single sign-on (SSO) for application access
Other guidance for IM-5
Azure API Management can be configured to use Microsoft Entra ID as an identity provider for authenticating users on the developer portal in order to benefit from the SSO capabilities offered by Microsoft Entra. Once configured, new developer portal users can choose to follow the out-of-the-box sign-up process by first authenticating through Microsoft Entra and then completing the sign-up process on the portal once authenticated.
Alternatively, the sign-in/sign-up process can be further customized through delegation. Delegation allows you to use your existing website for handling developer sign in/sign up and subscription to products, as opposed to using the built-in functionality in the developer portal. It enables your website to own the user data and perform the validation of these steps in a custom way.
IM-7: Restrict resource access based on conditions
Features
Conditional access for data plane
Description: Data plane access can be controlled using Microsoft Entra Conditional Access Policies. To learn more, see What is Conditional Access?
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| False | Not applicable | Not applicable |
Configuration guidance: This feature isn't supported to secure this service.
IM-8: Restrict the exposure of credential and secrets
Features
Service credential and secrets support integration and storage in Azure Key Vault
Description: Data plane supports native use of Azure Key Vault for credential and secrets store. To learn more, see About Azure Key Vault secrets.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Set up integration of API Management with Azure Key Vault. Ensure that secrets for API Management (named values) are stored in an Azure Key Vault so they can be securely accessed and updated.
Reference: Use named values in Azure API Management policies with Key Vault Integration
Microsoft Defender for Cloud monitoring
Azure Policy built-in definitions - Microsoft.ApiManagement:
| Name (Azure portal) |
Description | Effect(s) | Version (GitHub) |
|---|---|---|---|
| API Management minimum API version should be set to 2019-12-01 or higher | To prevent service secrets from being shared with read-only users, the minimum API version should be set to 2019-12-01 or higher. | Audit, Deny, Disabled | 1.0.1 |
Privileged access
For more information, see the Microsoft cloud security benchmark: Privileged access.
PA-1: Separate and limit highly privileged/administrative users
Features
Local admin accounts
Description: Service has the concept of a local administrative account. To learn more, see Separate and limit highly privileged/administrative users.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Feature notes: Avoid the usage of local authentication methods or accounts, these should be disabled wherever possible. Instead use Microsoft Entra ID to authenticate where possible.
Configuration guidance: If not required for routine administrative operations, disable or restrict any local admin accounts for only emergency use.
Note: API Management allows creation of local user account. Instead of creating these local accounts, enable Microsoft Entra authentication only, and assign permissions to these Microsoft Entra ID accounts.
Reference: How to manage user accounts in Azure API Management
PA-7: Follow just enough administration (least privilege) principle
Features
Azure RBAC for data plane
Description: Azure role-based access control (Azure RBAC) can be used to managed access to service's data plane actions. To learn more, see What is Azure role-based access control?
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Use Azure RBAC to control access to API Management. API Management relies on Azure RBAC to enable fine-grained access management for API Management services and entities (for example, APIs and policies).
Reference: How to use role-based access control in Azure API Management
Microsoft Defender for Cloud monitoring
Azure Policy built-in definitions - Microsoft.ApiManagement:
| Name (Azure portal) |
Description | Effect(s) | Version (GitHub) |
|---|---|---|---|
| API Management subscriptions should not be scoped to all APIs | API Management subscriptions should be scoped to a product or an individual API instead of all APIs, which could result in an excessive data exposure. | Audit, Disabled, Deny | 1.1.0 |
PA-8: Determine access process for cloud provider support
Features
Customer Lockbox
Description: Customer Lockbox can be used for Microsoft support access. To learn more, see Customer Lockbox for Microsoft Azure.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Shared |
Configuration guidance: In support scenarios where Microsoft needs to access your data, use Customer Lockbox to review, then approve or reject each of Microsoft's data access requests.
Data protection
For more information, see the Microsoft cloud security benchmark: Data protection.
DP-1: Discover, classify, and label sensitive data
Features
Sensitive data discovery and classification
Description: Tools (such as Azure Purview or Azure Information Protection) can be used for data discovery and classification in the service. To learn more, see Discover, classify, and label sensitive data.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| False | Not applicable | Not applicable |
Configuration guidance: This feature isn't supported to secure this service.
DP-2: Monitor anomalies and threats targeting sensitive data
Features
Data leakage/loss prevention
Description: Service supports DLP solution to monitor sensitive data movement (in customer's content). To learn more, see Monitor anomalies and threats targeting sensitive data.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| False | Not applicable | Not applicable |
Configuration guidance: This feature isn't supported to secure this service.
DP-3: Encrypt sensitive data in transit
Features
Data in transit encryption
Description: Service supports data in-transit encryption for data plane. To learn more, see Data in transit.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | True | Microsoft |
Configuration guidance: No other configurations are required as this is enabled on a default deployment.
Reference: Manage protocols and ciphers in Azure API Management
Other guidance for DP-3
Management plane calls are made through Azure Resource Manager over TLS. A valid JSON web token (JWT) is required. Data plane calls can be secured with TLS and one of supported authentication mechanisms (for example, client certificate or JWT).
Microsoft Defender for Cloud monitoring
Azure Policy built-in definitions - Microsoft.ApiManagement:
| Name (Azure portal) |
Description | Effect(s) | Version (GitHub) |
|---|---|---|---|
| API Management APIs should use only encrypted protocols | To ensure security of data in transit, APIs should be available only through encrypted protocols, like HTTPS or WSS. Avoid using unsecured protocols, such as HTTP or WS. | Audit, Disabled, Deny | 2.0.2 |
DP-4: Enable data-at-rest encryption by default
Features
Data-at-rest encryption using platform keys
Description: Data at-rest encryption using platform keys is supported. Any customer data at rest is encrypted with these Microsoft managed keys. To learn more, see Encryption at rest in Microsoft cloud services.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | True | Microsoft |
Feature notes: Customer data in an API Management instance, including API settings, products, subscriptions, users, groups, and custom developer portal content, is stored in a SQL Azure database and in Azure Storage, which automatically encrypts the content at rest.
Configuration guidance: No other configurations are required as this is enabled on a default deployment.
DP-6: Use a secure key management process
Features
Key management in Azure Key Vault
Description: The service supports Azure Key Vault integration for any customer keys, secrets, or certificates. To learn more, see About Azure Key Vault.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Set up integration of API Management with Azure Key Vault. Ensure that keys used by API Management are stored in an Azure Key Vault so they can be securely accessed and updated.
Reference: Prerequisites for key vault integration
Microsoft Defender for Cloud monitoring
Azure Policy built-in definitions - Microsoft.ApiManagement:
| Name (Azure portal) |
Description | Effect(s) | Version (GitHub) |
|---|---|---|---|
| API Management secret named values should be stored in Azure Key Vault | Named values are a collection of name and value pairs in each API Management service. Secret values can be stored either as encrypted text in API Management (custom secrets) or by referencing secrets in Azure Key Vault. To improve security of API Management and secrets, reference secret named values from Azure Key Vault. Azure Key Vault supports granular access management and secret rotation policies. | Audit, Disabled, Deny | 1.0.2 |
DP-7: Use a secure certificate management process
Features
Certificate management in Azure Key Vault
Description: The service supports Azure Key Vault integration for any customer certificates. To learn more, see Get started with Key Vault certificates.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Set up integration of API Management with Azure Key Vault. Ensure that secrets for API Management (named values) are stored in an Azure Key Vault so they can be securely accessed and updated.
Use Azure Key Vault to create and control the certificate lifecycle, including creation, importing, rotation, revocation, storage, and purging of the certificate. Ensure the certificate generation follows defined standards without using any insecure properties, such as: insufficient key size, overly long validity period, insecure cryptography. Setup automatic rotation of the certificate in Azure Key Vault and the Azure service (if supported) based on a defined schedule or when there's a certificate expiration. If automatic rotation isn't supported in the application, ensure they're still rotated using manual methods in Azure Key Vault and the application.
Reference: Secure backend services using client certificate authentication in Azure API Management
Asset management
For more information, see Microsoft cloud security benchmark: Asset management.
AM-2: Use only approved services
Features
Azure Policy support
Description: Service configurations can be monitored and enforced via Azure Policy. To learn more, see Create and manage policies to enforce compliance.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Use built-in Azure Policy to monitor and enforce secure configuration across API Management resources. Use Azure Policy aliases in the Microsoft.ApiManagement namespace to create custom Azure Policy definitions where required.
Reference: Azure Policy built-in policy definitions for Azure API Management
Logging and threat detection
For more information, see Microsoft cloud security benchmark: Logging and threat detection.
LT-1: Enable threat detection capabilities
Features
Microsoft Defender for Service / product offering
Description: Service has an offering-specific Microsoft Defender solution to monitor and alert on security issues. To learn more, see What is Microsoft Defender for Cloud?
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Microsoft Defender for APIs, a capability of Microsoft Defender for Cloud, offers full lifecycle protection, detection, and response coverage for APIs that are managed in Azure API Management.
Onboarding APIs to Defender for APIs is a two-step process: enabling the Defender for APIs plan for the subscription, and onboarding unprotected APIs in your API Management instances.
View a summary of all security recommendations and alerts for onboarded APIs by selecting Microsoft Defender for Cloud in the menu for your API Management instance.
Reference: Enable advanced API security features using Microsoft Defender for Cloud
LT-4: Enable logging for security investigation
Features
Azure resource logs
Description: Service produces resource logs that can provide enhanced service-specific metrics and logging. The customer can configure these resource logs and send them to their own data sink like a storage account or log analytics workspace. To learn more, see Azure Monitor data sources and data collection methods.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Customer |
Configuration guidance: Enable resource logs for API Management, resource logs provide rich information about operations and errors that are important for auditing and troubleshooting purposes. Categories of resource logs for API Management include:
- GatewayLogs
- WebSocketConnectionLogs
Reference: Resource logs
Backup and recovery
For more information, see Microsoft cloud security benchmark: Backup and recovery.
BR-1: Ensure regular automated backups
Features
Azure Backup
Description: The service can be backed up by the Azure Backup service. To learn more, see What is the Azure Backup service?
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| False | Not applicable | Not applicable |
Configuration guidance: This feature isn't supported to secure this service.
Service-native backup capability
Description: Service supports its own native backup capability (if not using Azure Backup). To learn more, see Ensure regular automated backups.
| Supported | Enabled by default | Configuration responsibility |
|---|---|---|
| True | False | Shared |
Additional guidance: Use the backup and restore capabilities in API Management service. When using backup capabilities, API Management writes backups to customer-owned Azure Storage accounts. Backup and restore operations are provided by API Management to perform full system backup and restore.
Reference: How to implement disaster recovery using service backup and restore in Azure API Management
Related content
- See the Microsoft cloud security benchmark overview
- Learn more about Azure security baselines