Skip to content

Commit 8eddd8c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3237a81 of spec repo
1 parent ae80ae2 commit 8eddd8c

22 files changed

+2211
-2
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 418 additions & 0 deletions
Large diffs are not rendered by default.

features/v2/application_security.feature

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,27 @@ Feature: Application Security
1313
And a valid "appKeyAuth" key in the system
1414
And an instance of "ApplicationSecurity" API
1515

16+
@generated @skip @team:DataDog/asm-backend
17+
Scenario: Create a WAF Policy returns "Bad Request" response
18+
Given new "CreateApplicationSecurityWafPolicy" request
19+
And body with value {"data": {"attributes": {"basedOn": "recommended", "description": "Policy applied to internal web applications.", "isDefault": false, "name": "Internal Network Policy", "protectionPresets": ["attack-tools"], "rules": [{"blocking": false, "enabled": true, "id": "rasp-001-002"}], "scope": [{"env": "prod", "service": "billing-service"}], "version": 0}, "type": "policy"}}
20+
When the request is sent
21+
Then the response status is 400 Bad Request
22+
23+
@generated @skip @team:DataDog/asm-backend
24+
Scenario: Create a WAF Policy returns "Concurrent Modification" response
25+
Given new "CreateApplicationSecurityWafPolicy" request
26+
And body with value {"data": {"attributes": {"basedOn": "recommended", "description": "Policy applied to internal web applications.", "isDefault": false, "name": "Internal Network Policy", "protectionPresets": ["attack-tools"], "rules": [{"blocking": false, "enabled": true, "id": "rasp-001-002"}], "scope": [{"env": "prod", "service": "billing-service"}], "version": 0}, "type": "policy"}}
27+
When the request is sent
28+
Then the response status is 409 Concurrent Modification
29+
30+
@generated @skip @team:DataDog/asm-backend
31+
Scenario: Create a WAF Policy returns "Created" response
32+
Given new "CreateApplicationSecurityWafPolicy" request
33+
And body with value {"data": {"attributes": {"basedOn": "recommended", "description": "Policy applied to internal web applications.", "isDefault": false, "name": "Internal Network Policy", "protectionPresets": ["attack-tools"], "rules": [{"blocking": false, "enabled": true, "id": "rasp-001-002"}], "scope": [{"env": "prod", "service": "billing-service"}], "version": 0}, "type": "policy"}}
34+
When the request is sent
35+
Then the response status is 201 Created
36+
1637
@generated @skip @team:DataDog/asm-backend
1738
Scenario: Create a WAF custom rule returns "Bad Request" response
1839
Given new "CreateApplicationSecurityWafCustomRule" request
@@ -84,6 +105,27 @@ Feature: Application Security
84105
When the request is sent
85106
Then the response status is 404 Not Found
86107

108+
@generated @skip @team:DataDog/asm-backend
109+
Scenario: Delete a WAF Policy returns "Concurrent Modification" response
110+
Given new "DeleteApplicationSecurityWafPolicy" request
111+
And request contains "policy_id" parameter from "REPLACE.ME"
112+
When the request is sent
113+
Then the response status is 409 Concurrent Modification
114+
115+
@generated @skip @team:DataDog/asm-backend
116+
Scenario: Delete a WAF Policy returns "No Content" response
117+
Given new "DeleteApplicationSecurityWafPolicy" request
118+
And request contains "policy_id" parameter from "REPLACE.ME"
119+
When the request is sent
120+
Then the response status is 204 No Content
121+
122+
@generated @skip @team:DataDog/asm-backend
123+
Scenario: Delete a WAF Policy returns "Not Found" response
124+
Given new "DeleteApplicationSecurityWafPolicy" request
125+
And request contains "policy_id" parameter from "REPLACE.ME"
126+
When the request is sent
127+
Then the response status is 404 Not Found
128+
87129
@generated @skip @team:DataDog/asm-backend
88130
Scenario: Delete a WAF exclusion filter returns "Concurrent Modification" response
89131
Given new "DeleteApplicationSecurityWafExclusionFilter" request
@@ -106,6 +148,13 @@ Feature: Application Security
106148
When the request is sent
107149
Then the response status is 204 OK
108150

151+
@generated @skip @team:DataDog/asm-backend
152+
Scenario: Get a WAF Policy returns "OK" response
153+
Given new "GetApplicationSecurityWafPolicy" request
154+
And request contains "policy_id" parameter from "REPLACE.ME"
155+
When the request is sent
156+
Then the response status is 200 OK
157+
109158
@generated @skip @team:DataDog/asm-backend
110159
Scenario: Get a WAF custom rule returns "OK" response
111160
Given new "GetApplicationSecurityWafCustomRule" request
@@ -140,6 +189,12 @@ Feature: Application Security
140189
When the request is sent
141190
Then the response status is 200 OK
142191

192+
@generated @skip @team:DataDog/asm-backend
193+
Scenario: List all WAF policies returns "OK" response
194+
Given new "ListApplicationSecurityWAFPolicies" request
195+
When the request is sent
196+
Then the response status is 200 OK
197+
143198
@team:DataDog/asm-backend
144199
Scenario: Update a WAF Custom Rule returns "Bad Request" response
145200
Given there is a valid "custom_rule" in the system
@@ -174,6 +229,38 @@ Feature: Application Security
174229
When the request is sent
175230
Then the response status is 200 OK
176231

232+
@generated @skip @team:DataDog/asm-backend
233+
Scenario: Update a WAF Policy returns "Bad Request" response
234+
Given new "UpdateApplicationSecurityWafPolicy" request
235+
And request contains "policy_id" parameter from "REPLACE.ME"
236+
And body with value {"data": {"attributes": {"description": "Policy applied to internal web applications.", "isDefault": false, "name": "Internal Network Policy", "protectionPresets": ["attack-tools"], "rules": [{"blocking": false, "enabled": true, "id": "rasp-001-002"}], "scope": [{"env": "prod", "service": "billing-service"}], "version": 0}, "type": "policy"}}
237+
When the request is sent
238+
Then the response status is 400 Bad Request
239+
240+
@generated @skip @team:DataDog/asm-backend
241+
Scenario: Update a WAF Policy returns "Concurrent Modification" response
242+
Given new "UpdateApplicationSecurityWafPolicy" request
243+
And request contains "policy_id" parameter from "REPLACE.ME"
244+
And body with value {"data": {"attributes": {"description": "Policy applied to internal web applications.", "isDefault": false, "name": "Internal Network Policy", "protectionPresets": ["attack-tools"], "rules": [{"blocking": false, "enabled": true, "id": "rasp-001-002"}], "scope": [{"env": "prod", "service": "billing-service"}], "version": 0}, "type": "policy"}}
245+
When the request is sent
246+
Then the response status is 409 Concurrent Modification
247+
248+
@generated @skip @team:DataDog/asm-backend
249+
Scenario: Update a WAF Policy returns "Not Found" response
250+
Given new "UpdateApplicationSecurityWafPolicy" request
251+
And request contains "policy_id" parameter from "REPLACE.ME"
252+
And body with value {"data": {"attributes": {"description": "Policy applied to internal web applications.", "isDefault": false, "name": "Internal Network Policy", "protectionPresets": ["attack-tools"], "rules": [{"blocking": false, "enabled": true, "id": "rasp-001-002"}], "scope": [{"env": "prod", "service": "billing-service"}], "version": 0}, "type": "policy"}}
253+
When the request is sent
254+
Then the response status is 404 Not Found
255+
256+
@generated @skip @team:DataDog/asm-backend
257+
Scenario: Update a WAF Policy returns "OK" response
258+
Given new "UpdateApplicationSecurityWafPolicy" request
259+
And request contains "policy_id" parameter from "REPLACE.ME"
260+
And body with value {"data": {"attributes": {"description": "Policy applied to internal web applications.", "isDefault": false, "name": "Internal Network Policy", "protectionPresets": ["attack-tools"], "rules": [{"blocking": false, "enabled": true, "id": "rasp-001-002"}], "scope": [{"env": "prod", "service": "billing-service"}], "version": 0}, "type": "policy"}}
261+
When the request is sent
262+
Then the response status is 200 OK
263+
177264
@team:DataDog/asm-backend
178265
Scenario: Update a WAF exclusion filter returns "Bad Request" response
179266
Given there is a valid "custom_rule" in the system

features/v2/given.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,18 @@
693693
"tag": "Application Security",
694694
"operationId": "CreateApplicationSecurityWafExclusionFilter"
695695
},
696+
{
697+
"parameters": [
698+
{
699+
"name": "body",
700+
"value": "{\n \"data\": {\n \"type\": \"policy\",\n \"attributes\": {\n \"name\": \"Test policy\",\n \"description\": \"This is a test policy.\",\n \"basedOn\": \"recommended\"\n }\n }\n}"
701+
}
702+
],
703+
"step": "there is a valid \"policy\" in the system",
704+
"key": "policy",
705+
"tag": "Application Security",
706+
"operationId": "CreateApplicationSecurityWafPolicy"
707+
},
696708
{
697709
"parameters": [
698710
{

features/v2/undo.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,6 +2715,43 @@
27152715
"type": "idempotent"
27162716
}
27172717
},
2718+
"ListApplicationSecurityWAFPolicies": {
2719+
"tag": "Application Security",
2720+
"undo": {
2721+
"type": "safe"
2722+
}
2723+
},
2724+
"CreateApplicationSecurityWafPolicy": {
2725+
"tag": "Application Security",
2726+
"undo": {
2727+
"operationId": "DeleteApplicationSecurityWafPolicy",
2728+
"parameters": [
2729+
{
2730+
"name": "policy_id",
2731+
"source": "data.id"
2732+
}
2733+
],
2734+
"type": "unsafe"
2735+
}
2736+
},
2737+
"DeleteApplicationSecurityWafPolicy": {
2738+
"tag": "Application Security",
2739+
"undo": {
2740+
"type": "idempotent"
2741+
}
2742+
},
2743+
"GetApplicationSecurityWafPolicy": {
2744+
"tag": "Application Security",
2745+
"undo": {
2746+
"type": "safe"
2747+
}
2748+
},
2749+
"UpdateApplicationSecurityWafPolicy": {
2750+
"tag": "Application Security",
2751+
"undo": {
2752+
"type": "idempotent"
2753+
}
2754+
},
27182755
"ListCSMThreatsAgentRules": {
27192756
"tag": "CSM Threats",
27202757
"undo": {

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7318,6 +7318,41 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
73187318
},
73197319
operationResponseType: "{}",
73207320
},
7321+
"ApplicationSecurityApi.V2.ListApplicationSecurityWAFPolicies": {
7322+
operationResponseType: "ApplicationSecurityPolicyListResponse",
7323+
},
7324+
"ApplicationSecurityApi.V2.CreateApplicationSecurityWafPolicy": {
7325+
body: {
7326+
type: "ApplicationSecurityPolicyCreateRequest",
7327+
format: "",
7328+
},
7329+
operationResponseType: "ApplicationSecurityPolicyResponse",
7330+
},
7331+
"ApplicationSecurityApi.V2.GetApplicationSecurityWafPolicy": {
7332+
policyId: {
7333+
type: "string",
7334+
format: "",
7335+
},
7336+
operationResponseType: "ApplicationSecurityPolicyResponse",
7337+
},
7338+
"ApplicationSecurityApi.V2.UpdateApplicationSecurityWafPolicy": {
7339+
policyId: {
7340+
type: "string",
7341+
format: "",
7342+
},
7343+
body: {
7344+
type: "ApplicationSecurityPolicyUpdateRequest",
7345+
format: "",
7346+
},
7347+
operationResponseType: "ApplicationSecurityPolicyResponse",
7348+
},
7349+
"ApplicationSecurityApi.V2.DeleteApplicationSecurityWafPolicy": {
7350+
policyId: {
7351+
type: "string",
7352+
format: "",
7353+
},
7354+
operationResponseType: "{}",
7355+
},
73217356
"CSMThreatsApi.V2.ListCSMThreatsAgentRules": {
73227357
policyId: {
73237358
type: "string",

0 commit comments

Comments
 (0)