More best practices covered in API Security Best Practices blog series.
Refer Rate limit API calls blog to create an API Proxy to an OData API from SAP Gateway and applying an API Rate limit using Quota policy. In this blog we would be extending the same to add the support for data masking for OData APIs.
<JSONThreatProtection async="false" continueOnError="false" enabled="true" xmlns="http://www.sap.com/apimgmt">
<ArrayElementCount>2</ArrayElementCount>
<ContainerDepth>5</ContainerDepth>
<ObjectEntryCount>50</ObjectEntryCount>
<ObjectEntryNameLength>50</ObjectEntryNameLength>
<Source>request</Source>
<StringValueLength>500</StringValueLength>
</JSONThreatProtection>
Note that the values of JSON threat protection limit used in this blog is just a sample and a lower value has been set for ease of testing.
request.verb = "PUT" or request.verb = "POST"
{
"Note": "EPM DG: SO ID 0500000000 Deliver as fast as possible",
"NoteLanguage": "EN",
"CustomerID": "0100000000",
"CustomerName": "SAP",
"CurrencyCode": "EUR",
"GrossAmount": "28142.31",
"NetAmount": "23649.00",
"TaxAmount": "4493.31",
"LifecycleStatus": "N",
"LifecycleStatusDescription": "New",
"BillingStatus": "",
"BillingStatusDescription": "Initial",
"DeliveryStatus": "",
"DeliveryStatusDescription": "Initial",
"ToLineItems": [
{
"ProductID": "HT-1000",
"ItemPosition" : "0000000010",
"Note": "EPM DG: SO ID 0500000000 Item 0000000010",
"NoteLanguage": "EN",
"CurrencyCode": "EUR",
"GrossAmount": "3412.92",
"NetAmount": "2868.00",
"TaxAmount": "544.92",
"DeliveryDate": "/Date(1503532800000)/",
"Quantity": "3",
"QuantityUnit": "EA"
},
{
"ProductID": "HT-1001",
"ItemPosition" : "0000000020",
"Note": "EPM DG: SO ID 0500000000 Item 0000000020",
"NoteLanguage": "EN",
"CurrencyCode": "EUR",
"GrossAmount": "2972.62",
"NetAmount": "2498.00",
"TaxAmount": "474.62",
"DeliveryDate": "/Date(1503547200000)/",
"Quantity": "2",
"QuantityUnit": "EA"
}
]
}
{
"Note": "EPM DG: SO ID 0500000000 Deliver as fast as possible",
"NoteLanguage": "EN",
"CustomerID": "0100000000",
"CustomerName": "SAP",
"CurrencyCode": "EUR",
"GrossAmount": "28142.31",
"NetAmount": "23649.00",
"TaxAmount": "4493.31",
"LifecycleStatus": "N",
"LifecycleStatusDescription": "New",
"BillingStatus": "",
"BillingStatusDescription": "Initial",
"DeliveryStatus": "",
"DeliveryStatusDescription": "Initial",
"ToLineItems": [
{
"ProductID": "HT-1000",
"ItemPosition" : "0000000010",
"Note": "EPM DG: SO ID 0500000000 Item 0000000010",
"NoteLanguage": "EN",
"CurrencyCode": "EUR",
"GrossAmount": "3412.92",
"NetAmount": "2868.00",
"TaxAmount": "544.92",
"DeliveryDate": "/Date(1503532800000)/",
"Quantity": "3",
"QuantityUnit": "EA"
},
{
"ProductID": "HT-1001",
"ItemPosition" : "0000000020",
"Note": "EPM DG: SO ID 0500000000 Item 0000000020",
"NoteLanguage": "EN",
"CurrencyCode": "EUR",
"GrossAmount": "2972.62",
"NetAmount": "2498.00",
"TaxAmount": "474.62",
"DeliveryDate": "/Date(1503547200000)/",
"Quantity": "2",
"QuantityUnit": "EA"
},
{
"ProductID": "HT-1001",
"ItemPosition" : "0000000030",
"Note": "EPM DG: SO ID 0500000000 Item 0000000020",
"NoteLanguage": "EN",
"CurrencyCode": "EUR",
"GrossAmount": "2972.62",
"NetAmount": "2498.00",
"TaxAmount": "474.62",
"DeliveryDate": "/Date(1503547200000)/",
"Quantity": "2",
"QuantityUnit": "EA"
}
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
18 | |
11 | |
10 | |
9 | |
9 | |
7 | |
7 | |
5 | |
5 |