Apigee Edge belgelerini görüntülüyorsunuz.
.
Git:
Apigee X belgeleri. bilgi

Ne?
Çeşitli kontroller için sınırlar belirlemenizi sağlayarak içerik düzeyinde saldırıların ortaya çıkardığı riski en aza indirir. Diziler ve dizeler gibi JSON yapıları.
Video: JSONThreatProtection politikası, içerik düzeyinde saldırılara karşı API'leri güvenli hale getirmenizi sağlar.
Video: Apigee bulutlar arası API platformuyla ilgili bu kısa videoya göz atın.
Öğe referansı
Öğe referansı, JSONThreatProtection öğelerini ve özelliklerini açıklar politikası.
<JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1"> <DisplayName>JSONThreatProtection 1</DisplayName> <ArrayElementCount>20</ArrayElementCount> <ContainerDepth>10</ContainerDepth> <ObjectEntryCount>15</ObjectEntryCount> <ObjectEntryNameLength>50</ObjectEntryNameLength> <Source>request</Source> <StringValueLength>500</StringValueLength> </JSONThreatProtection>
<JSONThreatProtection> özellikler
<JSONThreatProtection async="false" continueOnError="false" enabled="true" name="JSON-Threat-Protection-1">
Aşağıdaki tabloda tüm politika üst öğelerinde ortak olan özellikler açıklanmaktadır:
Özellik | Açıklama | Varsayılan | Varlık |
---|---|---|---|
name |
Politikanın dahili adı. İsteğe bağlı olarak, politikayı |
Yok | Zorunlu |
continueOnError |
Bir politika başarısız olduğunda hata döndürmesi için Akış yürütmenin bir politikadan sonra bile devam etmesi için |
false | İsteğe bağlı |
enabled |
Politikayı uygulamak için Politikayı devre dışı bırakmak için |
true | İsteğe bağlı |
async |
Bu özelliğin desteği sonlandırıldı. |
false | Kullanımdan kaldırıldı |
<DisplayName> öğe
Politikayı name
özelliğine ek olarak
farklı bir doğal dil adına sahip yönetim arayüzü proxy düzenleyicisi.
<DisplayName>Policy Display Name</DisplayName>
Varsayılan |
Yok Bu öğeyi çıkarırsanız politikanın |
---|---|
Varlık | İsteğe bağlı |
Tür | Dize |
<ArrayElementCount> öğe
Bir dizide izin verilen maksimum öğe sayısını belirtir.
<ArrayElementCount>20</ArrayElementCount>
Varsayılan: | Bu öğeyi belirtmezseniz veya negatif bir tam sayı belirtirseniz sistem bir sınır uygulamaz. |
Bulunma: | İsteğe bağlı |
Tür: | Tamsayı |
<ContainerDepth> öğe
İzin verilen maksimum kapsama derinliğini belirtir. Burada kapsayıcılar, nesne veya dizidir. Örneğin, nesne içeren bir nesne içeren bir dizi, derinliği 3'tür.
<ContainerDepth>10</ContainerDepth>
Varsayılan: | Bu öğeyi belirtmezseniz veya negatif bir tam sayı belirtirseniz sistem herhangi bir sınır uygulamaz. |
Bulunma: | İsteğe bağlı |
Tür: | Tamsayı |
<ObjectEntryCount> öğe
Bir nesnede izin verilen maksimum giriş sayısını belirtir.
<ObjectEntryCount>15</ObjectEntryCount>
Varsayılan: | Bu öğeyi belirtmezseniz veya negatif bir tam sayı belirtirseniz sistem herhangi bir sınır uygulamaz. |
Bulunma: | İsteğe bağlı |
Tür: | Tamsayı |
<ObjectEntryNameLength> öğe
Bir nesne içindeki özellik adı için izin verilen maksimum dize uzunluğunu belirtir.
<ObjectEntryNameLength>50</ObjectEntryNameLength>
Varsayılan: | Bu öğeyi belirtmezseniz veya negatif bir tam sayı belirtirseniz sistem bir sınır uygulamaz. |
Bulunma: | İsteğe bağlı |
Tür: | Tamsayı |
<Source> öğe
JSON yük saldırılarına karşı denetlenecek mesaj. Bu ayar genellikle şu şekilde ayarlanır:
request
.
Bu öğe, message
olarak ayarlandığında istek mesajını otomatik olarak değerlendirir
istek akışına eklendiğinde ve yanıta eklendiğinde yanıt mesajına eklendiğinde
akışı sağlar.
<Source>request</Source>
Varsayılan: | istek |
Bulunma: | İsteğe bağlı |
Tür: |
Dize. Geçerli değerler: istek, yanıt veya mesaj. |
<StringValueLength> öğe
Bir dize değeri için izin verilen maksimum uzunluğu belirtir.
<StringValueLength>500</StringValueLength>
Varsayılan: | Bu öğeyi belirtmezseniz veya negatif bir tam sayı belirtirseniz sistem bir sınır uygulamaz. |
Bulunma: | İsteğe bağlı |
Tür: | Tamsayı |
Hata referansı
This section describes the fault codes and error messages that are returned and fault variables that are set by Edge when this policy triggers an error. This information is important to know if you are developing fault rules to handle faults. To learn more, see What you need to know about policy errors and Handling faults.
Runtime errors
These errors can occur when the policy executes.
Fault code | HTTP status | Cause | Fix |
---|---|---|---|
steps.jsonthreatprotection.ExecutionFailed |
500 | The JSONThreatProtection policy can throw many different types of ExecutionFailed errors. Most of these errors occur when a specific threshold set in the policy is exceeded. These types of errors include: object entry name length, object entry count, array element count, container depth, string string value length. This error also occurs when the payload contains an invalid JSON object. | build |
steps.jsonthreatprotection.SourceUnavailable |
500 |
This error occurs if the message
variable specified in the <Source> element is either:
|
build |
steps.jsonthreatprotection.NonMessageVariable |
500 |
This error occurs if the <Source> element is set to a variable which
is not of type
message.
|
build |
Deployment errors
None.
Fault variables
These variables are set when this policy triggers an error. For more information, see What you need to know about policy errors.
Variables | Where | Example |
---|---|---|
fault.name="fault_name" |
fault_name is the name of the fault, as listed in the Runtime errors table above. The fault name is the last part of the fault code. | fault.name Matches "SourceUnavailable" |
jsonattack.policy_name.failed |
policy_name is the user-specified name of the policy that threw the fault. | jsonattack.JTP-SecureRequest.failed = true |
Example error response
{ "fault": { "faultstring": "JSONThreatProtection[JPT-SecureRequest]: Execution failed. reason: JSONThreatProtection[JTP-SecureRequest]: Exceeded object entry name length at line 2", "detail": { "errorcode": "steps.jsonthreatprotection.ExecutionFailed" } } }
Example fault rule
<FaultRule name="JSONThreatProtection Policy Faults">
<Step>
<Name>AM-CustomErrorResponse</Name>
<Condition>(fault.name Matches "ExecutionFailed") </Condition>
</Step>
<Condition>(jsonattack.JPT-SecureRequest.failed = true) </Condition>
</FaultRule>
Şemalar
Kullanım notları
XML tabanlı hizmetler gibi, JavaScript nesne notasyonunu (JSON) destekleyen API'ler de tespit edebiliyorlar. Basit JSON saldırıları, JSON ayrıştırıcıları aşırı derecede zorlayan yapıları kullanmaya çalışır. bir hizmeti çökerterek uygulama düzeyinde hizmet reddi saldırılarına neden olabilir. Tüm ayarlar isteğe bağlıdır ve hizmet gereksinimlerinizi potansiyel risklere karşı optimize edecek şekilde güvenlik açıkları.