Skip to content

Commit bece071

Browse files
authored
Merge pull request #400 from SalesforceCommerceCloud/release/20240328
@W-15247878 - Release 2.15.0
2 parents ce25717 + 3f12751 commit bece071

File tree

228 files changed

+6655
-1311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+6655
-1311
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,23 @@ only use JavaScript, or if you use TypeScript but only import the client classes
1010
then your usage **will not change**. You will likely only need to make changes if
1111
you import the type definitions directly.
1212

13+
## v2.15.0
14+
15+
#### API Changes
16+
17+
- Update APIs for [Shopper Search](https://developer.salesforce.com/docs/commerce/commerce-api/references/about-commerce-api/about.html#282024)
18+
19+
* New Endpoints
20+
21+
| **Endpoint Name** | **Description** |
22+
| ------------- |-----------------------------------|
23+
| getWafManagedRulesets | Retrieves WAFv2 managed rulesets. |
24+
| updateWafManagedRuleset | Updates WAFv2 managed ruleset. |
1325

1426
## v2.14.0
1527

1628
* Shopper SEO API*
17-
*
29+
1830
* New Endpoints
1931

2032
| **Endpoint Name** | **Description** |

apis/cdn/cdn-api-process-apis/.metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/cdn-api-process-apis/1.0.27",
2+
"id": "893f605e-10e2-423a-bdb4-f952f56eb6d8/cdn-api-process-apis/1.0.29",
33
"name": "CDN Zones",
44
"description": "Extend your eCDN beyond Business Manager configuration.",
55
"groupId": "893f605e-10e2-423a-bdb4-f952f56eb6d8",
66
"assetId": "cdn-api-process-apis",
7-
"version": "1.0.27",
7+
"version": "1.0.29",
88
"categories": {
99
"API layer": [
1010
"Process"

apis/cdn/cdn-api-process-apis/cdn-zones-description.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ Use the API to:
99
- Customize how users interact with resources and how requests are processed, including custom pages and routing rules.
1010
- Provide proactive and complete application protection against new and existing exploits from bad actors.
1111

12-
## Access
12+
## Authentication & Authorization
1313

1414
For resource access, you must use a client ID and client secret from Account Manager to request an access token. The access token is used as a bearer token and added to the `Authorization` header of your API request.
1515

1616
The API client must also have at least one of the following OAuth scopes: `sfcc.cdn-zones` or `sfcc.cdn-zones.rw`.
1717

1818
For detailed setup instructions, see the [Authorization for Admin APIs](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html) guide.
19+
20+
## Use Cases
21+
22+
For detailed usage information, refer to the [CDN Zones Guides.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/cdn-zones.html)

apis/cdn/cdn-api-process-apis/cdnapi-process-api.raml

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ types:
6363
RateLimitingRule: !include dataTypes/RateLimitingRule.raml
6464
RateLimitingRulesPostRequest: !include dataTypes/RateLimitingRulesPostRequest.raml
6565
RateLimitingRulesPatchRequest: !include dataTypes/RateLimitingRulesPatchRequest.raml
66+
WAFManagedRuleset: !include dataTypes/WAFManagedRuleset.raml
67+
WAFManagedRulesetRequest: !include dataTypes/WAFManagedRulesetRequest.raml
6668

6769
ZonesEnvelope:
6870
type: CollectionResponseEnvelope
@@ -174,6 +176,16 @@ types:
174176
properties:
175177
data:
176178
type: RateLimitingRule[]
179+
WAFManagedRulesetsEnvelope:
180+
type: CollectionResponseEnvelope
181+
properties:
182+
data:
183+
type: WAFManagedRuleset[]
184+
WAFManagedRulesetEnvelope:
185+
type: ItemResponseEnvelope
186+
properties:
187+
data:
188+
type: WAFManagedRuleset
177189

178190
traits:
179191
hasUnauthorizedResponse: !include traits/HasUnauthorizedResponse.raml
@@ -226,7 +238,7 @@ traits:
226238
get:
227239
is: [hasResourceNotFoundResponse]
228240
displayName: getWafGroups
229-
description: Retrieves all WAF groups accessible to the caller.
241+
description: Retrieves all WAF groups accessible to the caller. Not applicable for zones using WAFv2. For any zones created after the 24.5 release, use the endpoints for WAF managed rulesets instead.
230242
responses:
231243
'200':
232244
description: Successfully retrieved details of WAF groups that caller has access to.
@@ -242,7 +254,7 @@ traits:
242254
put:
243255
is: [hasUnauthorizedResponse, hasForbiddenAccessResponse, hasInternalServerErrorResponse, hasBadRequestResponse]
244256
displayName: updateWafGroup
245-
description: Update action or mode of a specific WAF group.
257+
description: Updates action or mode of a specific WAF group. Not applicable for zones using WAFv2. For any zones created after the 24.5 release, use the endpoints for WAF managed rulesets instead.
246258
body:
247259
application/json:
248260
type: WafGroup
@@ -263,7 +275,7 @@ traits:
263275
get:
264276
is: [hasResourceNotFoundResponse]
265277
displayName: getWafRules
266-
description: Retrieve WAF rules under the waf group specified by the caller.
278+
description: Retrieves WAF rules under the waf group specified by the caller. Not applicable for zones using WAFv2. For any zones created after the 24.5 release, use the endpoints for WAF managed rulesets instead.
267279
queryParameters:
268280
groupId:
269281
displayName: GroupId
@@ -286,7 +298,7 @@ traits:
286298
get:
287299
is: [hasResourceNotFoundResponse]
288300
displayName: getWafRule
289-
description: Retrieve details of a specific WAF rule.
301+
description: Retrieves details of a specific WAF rule. Not applicable for zones using WAFv2. For any zones created after the 24.5 release, use the endpoints for WAF managed rulesets instead.
290302
responses:
291303
'200':
292304
description: Successfully retrieved details of the WAF rule requested by the caller.
@@ -300,7 +312,7 @@ traits:
300312
put:
301313
is: [hasBadRequestResponse]
302314
displayName: updateWafRule
303-
description: Update action of a specific WAF rule.
315+
description: Updates action of a specific WAF rule. Not applicable for zones using WAFv2. For any zones created after the 24.5 release, use the endpoints for WAF managed rulesets instead.
304316
body:
305317
application/json:
306318
type: WafRule
@@ -510,7 +522,9 @@ traits:
510522
body:
511523
application/json:
512524
type: CertificatesEnvelope
513-
example: !include /examples/zone/certificates-get-response.raml
525+
examples:
526+
Proxy Zone Certificates Response: !include /examples/zone/certificates-get-response1.raml
527+
Legacy Zone Certificates Response: !include /examples/zone/certificates-get-response2.raml
514528
securedBy:
515529
- CommerceCloudStandards.BearerToken: { scopes: [ sfcc.cdn-zones, sfcc.cdn-zones.rw ] }
516530
- CommerceCloudStandards.AmOAuth2
@@ -941,4 +955,38 @@ traits:
941955
description: Successfully deleted the rate limiting rule requested by the caller.
942956
securedBy:
943957
- CommerceCloudStandards.BearerToken: { scopes: [ sfcc.cdn-zones.rw ] }
944-
- CommerceCloudStandards.AmOAuth2
958+
- CommerceCloudStandards.AmOAuth2
959+
/zones/{zoneId}/firewall-managed/rulesets:
960+
is: [hasUnauthorizedResponse, hasForbiddenAccessResponse, hasInternalServerErrorResponse, hasResourceNotFoundResponse]
961+
get:
962+
displayName: getWafManagedRulesets
963+
description: Retrieves WAFv2 managed rulesets.
964+
responses:
965+
'200':
966+
description: Successfully returned the list of WAF managed rulesets.
967+
body:
968+
application/json:
969+
type: WAFManagedRulesetsEnvelope
970+
example: !include /examples/wafmanagedrulesets/waf-managed-rulesets-response.raml
971+
securedBy:
972+
- CommerceCloudStandards.BearerToken: { scopes: [ sfcc.cdn-zones, sfcc.cdn-zones.rw ] }
973+
- CommerceCloudStandards.AmOAuth2
974+
/{rulesetId}:
975+
is: [hasBadRequestResponse, hasUnauthorizedResponse, hasForbiddenAccessResponse, hasInternalServerErrorResponse, hasResourceNotFoundResponse]
976+
patch:
977+
displayName: updateWafManagedRuleset
978+
description: Updates WAFv2 managed ruleset.
979+
body:
980+
application/json:
981+
type: WAFManagedRulesetRequest
982+
example: !include /examples/wafmanagedrulesets/waf-managed-rulesets-update-request.raml
983+
responses:
984+
'200':
985+
description: Successfully returned the updated WAF managed rulesets.
986+
body:
987+
application/json:
988+
type: WAFManagedRulesetEnvelope
989+
example: !include /examples/wafmanagedrulesets/waf-managed-rulesets-update-response.raml
990+
securedBy:
991+
- CommerceCloudStandards.BearerToken: { scopes: [ sfcc.cdn-zones.rw ] }
992+
- CommerceCloudStandards.AmOAuth2

apis/cdn/cdn-api-process-apis/dataTypes/Certificate.raml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,15 @@ properties:
99
hosts:
1010
description: List of hosts the certificate applies to.
1111
type: string[]
12+
required: false
1213
expiresOn:
1314
description: Date of expiration for the certificate.
1415
type: datetime
16+
required: false
1517
uploadedOn:
1618
description: Date the certificate was uploaded.
1719
type: datetime
20+
required: false
1821
issuer:
1922
description: The certificate authority that issued the certificate.
2023
type: string

apis/cdn/cdn-api-process-apis/dataTypes/SecuritySetting.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ properties:
1414
type: boolean
1515
required: false
1616
wafEnabled:
17-
description: Enable WAF (OWASP) protection for this zone.
17+
description: Enable WAF (OWASP) protection for this zone. Not applicable for zones using WAFv2.
1818
type: boolean
1919
required: false
2020
alwaysUseHttps:
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#%RAML 1.0 DataType
2+
description: A WAF managed ruleset.
3+
type: object
4+
properties:
5+
name:
6+
description: The name of the WAF managed ruleset.
7+
type: string
8+
example: OWASP Core Ruleset
9+
rulesetId:
10+
description: The ID of the WAF managed ruleset.
11+
type: string
12+
example: 4814384a9e5d4991b9815dcfc25d2f1f
13+
action:
14+
description: The action applied by the WAF managed ruleset.
15+
type: string
16+
example: default
17+
anomalyScore:
18+
description: The anomaly score threshold of the WAF managed ruleset. Only applicable for the OWASP Core Ruleset.
19+
type: string
20+
example: low
21+
required: false
22+
anomalyScoreThreshold:
23+
description: The numerical value of the anomaly score threshold of the WAF managed ruleset. Only applicable for the OWASP Core Ruleset.
24+
type: integer
25+
example: 60
26+
required: false
27+
paranoiaLevel:
28+
description: The paranoia level of the WAF managed ruleset. Higher paranoia levels activate more aggressive rules. Only applicable for the OWASP Core Ruleset.
29+
type: integer
30+
example: 1
31+
required: false
32+
enabled:
33+
description: Whether or not the WAF managed ruleset is enabled.
34+
type: boolean
35+
example: true
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#%RAML 1.0 DataType
2+
description: A WAF managed ruleset request body.
3+
type: object
4+
properties:
5+
action:
6+
description: The action applied by the WAF managed ruleset.
7+
type: string
8+
example: default
9+
required: false
10+
anomalyScore:
11+
description: The anomaly score threshold of the WAF managed ruleset. Only applicable for the OWASP Core Ruleset.
12+
type: string
13+
example: low
14+
required: false
15+
paranoiaLevel:
16+
description: The paranoia level of the WAF managed ruleset. Higher paranoia levels activate more aggressive rules. Only applicable for the OWASP Core Ruleset.
17+
type: integer
18+
example: 1
19+
required: false
20+
enabled:
21+
description: Whether or not the WAF managed ruleset is enabled.
22+
type: boolean
23+
example: true
24+
required: false
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#%RAML 1.0 NamedExample
2+
value:
3+
{
4+
"data": [
5+
{
6+
"name": "Managed Ruleset",
7+
"rulesetId": "efb7b8c949ac4650a09736fc376e9aee",
8+
"action": "default",
9+
"enabled": true
10+
},
11+
{
12+
"name": "OWASP Core Ruleset",
13+
"rulesetId": "4814384a9e5d4991b9815dcfc25d2f1f",
14+
"action": "log",
15+
"anomalyScoreThreshold": 25,
16+
"anomalyScore": "high",
17+
"paranoiaLevel": 1,
18+
"enabled": true
19+
},
20+
{
21+
"name": "Leaked Crednetials Check Ruleset",
22+
"rulesetId": "c2e184081120413c86c3ab7e14069605",
23+
"action": "block",
24+
"enabled": true
25+
}
26+
]
27+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#%RAML 1.0 NamedExample
2+
value:
3+
{
4+
"action": "js_challenge",
5+
"enabled": true
6+
}

0 commit comments

Comments
 (0)