Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-11 12:58:58.679153",
"spec_repo_commit": "7307da21"
"regenerated": "2025-04-11 15:05:29.390383",
"spec_repo_commit": "d209cd40"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-04-11 12:58:58.695743",
"spec_repo_commit": "7307da21"
"regenerated": "2025-04-11 15:05:29.407748",
"spec_repo_commit": "d209cd40"
}
}
}
54 changes: 27 additions & 27 deletions features/v2/application_security.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,134 +13,134 @@ Feature: Application Security
And a valid "appKeyAuth" key in the system
And an instance of "ApplicationSecurity" API

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Create a WAF custom rule returns "Bad Request" response
Given new "CreateApplicationSecurityWafCustomRule" request
And body with value {"data": {"attributes": {"action": {"action": "block_request", "parameters": {"location": "/blocking", "status_code": 403}}, "blocking": false, "conditions": [{"operator": "match_regex", "parameters": {"data": "blocked_users", "inputs": [{"address": "server.db.statement", "key_path": []}], "list": [], "options": {"case_sensitive": false, "min_length": 0}, "regex": "path.*", "value": "custom_tag"}}], "enabled": false, "name": "Block request from a bad useragent", "path_glob": "/api/search/*", "scope": [{"env": "prod", "service": "billing-service"}], "tags": {"category": "business_logic", "type": "users.login.success"}}, "type": "custom_rule"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Create a WAF custom rule returns "Concurrent Modification" response
Given new "CreateApplicationSecurityWafCustomRule" request
And body with value {"data": {"attributes": {"action": {"action": "block_request", "parameters": {"location": "/blocking", "status_code": 403}}, "blocking": false, "conditions": [{"operator": "match_regex", "parameters": {"data": "blocked_users", "inputs": [{"address": "server.db.statement", "key_path": []}], "list": [], "options": {"case_sensitive": false, "min_length": 0}, "regex": "path.*", "value": "custom_tag"}}], "enabled": false, "name": "Block request from a bad useragent", "path_glob": "/api/search/*", "scope": [{"env": "prod", "service": "billing-service"}], "tags": {"category": "business_logic", "type": "users.login.success"}}, "type": "custom_rule"}}
When the request is sent
Then the response status is 409 Concurrent Modification

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Create a WAF custom rule returns "Created" response
Given new "CreateApplicationSecurityWafCustomRule" request
And body with value {"data": {"attributes": {"action": {"action": "block_request", "parameters": {"location": "/blocking", "status_code": 403}}, "blocking": false, "conditions": [{"operator": "match_regex", "parameters": {"data": "blocked_users", "inputs": [{"address": "server.db.statement", "key_path": []}], "list": [], "options": {"case_sensitive": false, "min_length": 0}, "regex": "path.*", "value": "custom_tag"}}], "enabled": false, "name": "Block request from a bad useragent", "path_glob": "/api/search/*", "scope": [{"env": "prod", "service": "billing-service"}], "tags": {"category": "business_logic", "type": "users.login.success"}}, "type": "custom_rule"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Create a WAF exclusion filter returns "Bad Request" response
Given new "CreateApplicationSecurityWafExclusionFilter" request
And body with value {"data": {"attributes": {"description": "Exclude false positives on a path", "enabled": true, "ip_list": ["198.51.100.72"], "on_match": "monitor", "parameters": ["list.search.query"], "path_glob": "/accounts/*", "rules_target": [{"rule_id": "dog-913-009", "tags": {"category": "attack_attempt", "type": "lfi"}}], "scope": [{"env": "www", "service": "prod"}]}, "type": "exclusion_filter"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Create a WAF exclusion filter returns "Concurrent Modification" response
Given new "CreateApplicationSecurityWafExclusionFilter" request
And body with value {"data": {"attributes": {"description": "Exclude false positives on a path", "enabled": true, "ip_list": ["198.51.100.72"], "on_match": "monitor", "parameters": ["list.search.query"], "path_glob": "/accounts/*", "rules_target": [{"rule_id": "dog-913-009", "tags": {"category": "attack_attempt", "type": "lfi"}}], "scope": [{"env": "www", "service": "prod"}]}, "type": "exclusion_filter"}}
When the request is sent
Then the response status is 409 Concurrent Modification

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Create a WAF exclusion filter returns "OK" response
Given new "CreateApplicationSecurityWafExclusionFilter" request
And body with value {"data": {"attributes": {"description": "Exclude false positives on a path", "enabled": true, "parameters": ["list.search.query"], "path_glob": "/accounts/*", "rules_target": [{"tags": {"category": "attack_attempt", "type": "lfi"}}], "scope": [{"env": "www", "service": "prod"}]}, "type": "exclusion_filter"}}
When the request is sent
Then the response status is 200 OK
And the response "data.attributes.enabled" is equal to true

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Create a legacy WAF exclusion filter returns "Bad Request" response
Given new "CreateApplicationSecurityWafExclusionFilter" request
And body with value {"data": {"attributes": {"description": "Exclude false positives on a path", "enabled": true, "event_query": "test:1"}, "type": "exclusion_filter"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Delete a WAF Custom Rule returns "Concurrent Modification" response
Given new "DeleteApplicationSecurityWafCustomRule" request
And request contains "custom_rule_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 409 Concurrent Modification

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Delete a WAF Custom Rule returns "No Content" response
Given new "DeleteApplicationSecurityWafCustomRule" request
And request contains "custom_rule_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Delete a WAF Custom Rule returns "Not Found" response
Given new "DeleteApplicationSecurityWafCustomRule" request
And request contains "custom_rule_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Delete a WAF exclusion filter returns "Concurrent Modification" response
Given new "DeleteApplicationSecurityWafExclusionFilter" request
And request contains "exclusion_filter_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 409 Concurrent Modification

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Delete a WAF exclusion filter returns "Not Found" response
Given new "DeleteApplicationSecurityWafExclusionFilter" request
And request contains "exclusion_filter_id" parameter with value "unknown"
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Delete a WAF exclusion filter returns "OK" response
Given there is a valid "exclusion_filter" in the system
And new "DeleteApplicationSecurityWafExclusionFilter" request
And request contains "exclusion_filter_id" parameter from "exclusion_filter.data.id"
When the request is sent
Then the response status is 204 OK

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Get a WAF custom rule returns "OK" response
Given new "GetApplicationSecurityWafCustomRule" request
And request contains "custom_rule_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Get a WAF exclusion filter returns "Not Found" response
Given new "GetApplicationSecurityWafExclusionFilter" request
And request contains "exclusion_filter_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Get a WAF exclusion filter returns "OK" response
Given there is a valid "exclusion_filter" in the system
And new "GetApplicationSecurityWafExclusionFilter" request
And request contains "exclusion_filter_id" parameter from "exclusion_filter.data.id"
When the request is sent
Then the response status is 200 OK

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: List all WAF custom rules returns "OK" response
Given new "ListApplicationSecurityWAFCustomRules" request
When the request is sent
Then the response status is 200 OK

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: List all WAF exclusion filters returns "OK" response
Given new "ListApplicationSecurityWafExclusionFilters" request
When the request is sent
Then the response status is 200 OK

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Update a WAF Custom Rule returns "Bad Request" response
Given there is a valid "custom_rule" in the system
And new "UpdateApplicationSecurityWafCustomRule" request
Expand All @@ -149,23 +149,23 @@ Feature: Application Security
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Update a WAF Custom Rule returns "Concurrent Modification" response
Given new "UpdateApplicationSecurityWafCustomRule" request
And request contains "custom_rule_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": {"action": "block_request", "parameters": {"location": "/blocking", "status_code": 403}}, "blocking": false, "conditions": [{"operator": "match_regex", "parameters": {"data": "blocked_users", "inputs": [{"address": "server.db.statement", "key_path": []}], "list": [], "options": {"case_sensitive": false, "min_length": 0}, "regex": "path.*", "value": "custom_tag"}}], "enabled": false, "name": "Block request from bad useragent", "path_glob": "/api/search/*", "scope": [{"env": "prod", "service": "billing-service"}], "tags": {"category": "business_logic", "type": "users.login.success"}}, "type": "custom_rule"}}
When the request is sent
Then the response status is 409 Concurrent Modification

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Update a WAF Custom Rule returns "Not Found" response
Given new "UpdateApplicationSecurityWafCustomRule" request
And request contains "custom_rule_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": {"action": "block_request", "parameters": {"location": "/blocking", "status_code": 403}}, "blocking": false, "conditions": [{"operator": "match_regex", "parameters": {"data": "blocked_users", "inputs": [{"address": "server.db.statement", "key_path": []}], "list": [], "options": {"case_sensitive": false, "min_length": 0}, "regex": "path.*", "value": "custom_tag"}}], "enabled": false, "name": "Block request from bad useragent", "path_glob": "/api/search/*", "scope": [{"env": "prod", "service": "billing-service"}], "tags": {"category": "business_logic", "type": "users.login.success"}}, "type": "custom_rule"}}
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Update a WAF Custom Rule returns "OK" response
Given there is a valid "custom_rule" in the system
And new "UpdateApplicationSecurityWafCustomRule" request
Expand All @@ -174,7 +174,7 @@ Feature: Application Security
When the request is sent
Then the response status is 200 OK

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Update a WAF exclusion filter returns "Bad Request" response
Given there is a valid "custom_rule" in the system
And new "UpdateApplicationSecurityWafExclusionFilter" request
Expand All @@ -183,23 +183,23 @@ Feature: Application Security
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/asm-respond-backend
@generated @skip @team:DataDog/asm-backend
Scenario: Update a WAF exclusion filter returns "Concurrent Modification" response
Given new "UpdateApplicationSecurityWafExclusionFilter" request
And request contains "exclusion_filter_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Exclude false positives on a path", "enabled": true, "ip_list": ["198.51.100.72"], "on_match": "monitor", "parameters": ["list.search.query"], "path_glob": "/accounts/*", "rules_target": [{"rule_id": "dog-913-009", "tags": {"category": "attack_attempt", "type": "lfi"}}], "scope": [{"env": "www", "service": "prod"}]}, "type": "exclusion_filter"}}
When the request is sent
Then the response status is 409 Concurrent Modification

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Update a WAF exclusion filter returns "Not Found" response
Given new "UpdateApplicationSecurityWafExclusionFilter" request
And request contains "exclusion_filter_id" parameter with value "unknown"
And body with value {"data": {"attributes": {"description": "Exclude false positives on a path", "enabled": true, "parameters": ["list.search.query"], "path_glob": "/accounts/*", "rules_target": [{"rule_id": "dog-913-009", "tags": {"category": "attack_attempt", "type": "lfi"}}], "scope": [{"env": "www", "service": "prod"}]}, "type": "exclusion_filter"}}
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Update a WAF exclusion filter returns "OK" response
Given there is a valid "exclusion_filter" in the system
And new "UpdateApplicationSecurityWafExclusionFilter" request
Expand All @@ -208,7 +208,7 @@ Feature: Application Security
When the request is sent
Then the response status is 200 OK

@team:DataDog/asm-respond-backend
@team:DataDog/asm-backend
Scenario: Update a legacy WAF exclusion filter returns "Bad Request" response
Given there is a valid "exclusion_filter" in the system
And new "UpdateApplicationSecurityWafExclusionFilter" request
Expand Down
Loading