El contenido del mensaje es un vector de ataque importante que usan los consumidores de API maliciosos. Los servicios de API proporcionan un conjunto de tipos de políticas para mitigar el potencial de que tus servicios de backend se vean vulnerados por atacantes o con cargas útiles de solicitud con formato incorrecto.
En el siguiente video, se proporciona una descripción general y se enfoca en la protección contra ataques de inyección de SQL.
Protección contra amenazas JSON
Los ataques JSON intentan usar estructuras que sobrecarguen los analizadores de JSON para hacer fallar un servicio y forzar ataques de denegación del servicio a nivel de aplicación.
Esos ataques se pueden mitigar mediante el tipo de política JSONThreatProtection.
Los ataques XML intentan usar estructuras que sobrecarguen los analizadores XML para bloquear un servicio y provocar ataques de denegación del servicio a nivel de la aplicación.
Esos ataques se pueden mitigar mediante el tipo de política XMLThreatProtection.
Algunos ataques basados en el contenido usan construcciones específicas en los encabezados HTTP, los parámetros de búsqueda o el contenido de la carga útil para intentar ejecutar código. Un ejemplo son los ataques de inyección de SQL. Esos ataques se pueden mitigar con el tipo de política de RegularExpressionProtection.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eThis content is relevant to both Apigee and Apigee hybrid users, detailing various security measures.\u003c/p\u003e\n"],["\u003cp\u003eMalicious API consumers often use message content as an attack vector, potentially compromising backend services.\u003c/p\u003e\n"],["\u003cp\u003eJSONThreatProtection and XMLThreatProtection policies can mitigate denial-of-service attacks by preventing the overwhelming of parsers with specific structures.\u003c/p\u003e\n"],["\u003cp\u003eThe RegularExpressionProtection policy can help safeguard against content-based attacks, including SQL-injection attempts within headers, parameters, or payload content.\u003c/p\u003e\n"]]],[],null,["# Content-based security\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\nMessage content is a significant attack vector used by malicious API consumers. API Services\nprovides a set of Policy types to mitigate the potential for your backend services to be\ncompromised by attackers or by malformed request payloads.\n| **Note:** This video was recorded with a previous version of the Apigee UI; however, the concepts are still valid.\n\nThe following video provides an overview and focuses on protecting against SQL injection\nattacks.\n\nJSON threat protection\n----------------------\n\nJSON attacks attempt to use structures that overwhelm JSON parsers to crash a service and\ninduce application-level denial-of-service attacks.\n\nSuch attacks can be mitigated using the JSONThreatProtection Policy type.\n\nSee [JSON Threat\nProtection policy](/apigee/docs/api-platform/reference/policies/json-threat-protection-policy).\n\nXML threat protection\n---------------------\n\nXML attacks attempt to use structures that overwhelm XML parsers to crash a service and induce\napplication-level denial-of-service attacks.\n\nSuch attacks can be mitigated using the XMLThreatProtection Policy type.\n\nSee [XML Threat\nProtection policy](/apigee/docs/api-platform/reference/policies/xml-threat-protection-policy).\n\nGeneral content protection\n--------------------------\n\nSome content-based attacks use specific constructs in HTTP headers, query parameters, or\npayload content to attempt to execute code. An example is SQL-injection attacks. Such attacks can\nbe mitigated using the RegularExpressionProtection Policy type.\n\nSee [Regular\nExpression Protection policy](/apigee/docs/api-platform/reference/policies/regular-expression-protection)."]]