|
| 1 | +@endpoint(csm-ownership) @endpoint(csm-ownership-v2) |
| 2 | +Feature: CSM Ownership |
| 3 | + Datadog Cloud Security Management (CSM) Ownership infers the most likely |
| 4 | + owner for a cloud resource by combining ownership signals from across the |
| 5 | + platform, and lets you review the inference, inspect its evidence, and |
| 6 | + submit feedback to persist, override, or correct the inferred owner. For |
| 7 | + more information, see [Cloud Security Management](https://docs.datadoghq.c |
| 8 | + om/security/cloud_security_management). |
| 9 | + |
| 10 | + Background: |
| 11 | + Given a valid "apiKeyAuth" key in the system |
| 12 | + And a valid "appKeyAuth" key in the system |
| 13 | + And an instance of "CSMOwnership" API |
| 14 | + |
| 15 | + @generated @skip @team:DataDog/k9-misconfigs |
| 16 | + Scenario: Get an ownership inference by owner type returns "Bad Request" response |
| 17 | + Given operation "GetOwnershipInference" enabled |
| 18 | + And new "GetOwnershipInference" request |
| 19 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 20 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 21 | + When the request is sent |
| 22 | + Then the response status is 400 Bad Request |
| 23 | + |
| 24 | + @generated @skip @team:DataDog/k9-misconfigs |
| 25 | + Scenario: Get an ownership inference by owner type returns "Not Found" response |
| 26 | + Given operation "GetOwnershipInference" enabled |
| 27 | + And new "GetOwnershipInference" request |
| 28 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 29 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 30 | + When the request is sent |
| 31 | + Then the response status is 404 Not Found |
| 32 | + |
| 33 | + @generated @skip @team:DataDog/k9-misconfigs |
| 34 | + Scenario: Get an ownership inference by owner type returns "OK" response |
| 35 | + Given operation "GetOwnershipInference" enabled |
| 36 | + And new "GetOwnershipInference" request |
| 37 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 38 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 39 | + When the request is sent |
| 40 | + Then the response status is 200 OK |
| 41 | + |
| 42 | + @generated @skip @team:DataDog/k9-misconfigs |
| 43 | + Scenario: Get the evidence for an ownership inference returns "Bad Request" response |
| 44 | + Given operation "GetOwnershipEvidence" enabled |
| 45 | + And new "GetOwnershipEvidence" request |
| 46 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 47 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 48 | + When the request is sent |
| 49 | + Then the response status is 400 Bad Request |
| 50 | + |
| 51 | + @generated @skip @team:DataDog/k9-misconfigs |
| 52 | + Scenario: Get the evidence for an ownership inference returns "Not Found" response |
| 53 | + Given operation "GetOwnershipEvidence" enabled |
| 54 | + And new "GetOwnershipEvidence" request |
| 55 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 56 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 57 | + When the request is sent |
| 58 | + Then the response status is 404 Not Found |
| 59 | + |
| 60 | + @generated @skip @team:DataDog/k9-misconfigs |
| 61 | + Scenario: Get the evidence for an ownership inference returns "OK" response |
| 62 | + Given operation "GetOwnershipEvidence" enabled |
| 63 | + And new "GetOwnershipEvidence" request |
| 64 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 65 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 66 | + When the request is sent |
| 67 | + Then the response status is 200 OK |
| 68 | + |
| 69 | + @generated @skip @team:DataDog/k9-misconfigs |
| 70 | + Scenario: List ownership history by owner type returns "Bad Request" response |
| 71 | + Given operation "ListOwnershipHistoryByOwnerType" enabled |
| 72 | + And new "ListOwnershipHistoryByOwnerType" request |
| 73 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 74 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 75 | + When the request is sent |
| 76 | + Then the response status is 400 Bad Request |
| 77 | + |
| 78 | + @generated @skip @team:DataDog/k9-misconfigs |
| 79 | + Scenario: List ownership history by owner type returns "OK" response |
| 80 | + Given operation "ListOwnershipHistoryByOwnerType" enabled |
| 81 | + And new "ListOwnershipHistoryByOwnerType" request |
| 82 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 83 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 84 | + When the request is sent |
| 85 | + Then the response status is 200 OK |
| 86 | + |
| 87 | + @generated @skip @team:DataDog/k9-misconfigs |
| 88 | + Scenario: List ownership inference history for a resource returns "Bad Request" response |
| 89 | + Given operation "ListOwnershipHistory" enabled |
| 90 | + And new "ListOwnershipHistory" request |
| 91 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 92 | + When the request is sent |
| 93 | + Then the response status is 400 Bad Request |
| 94 | + |
| 95 | + @generated @skip @team:DataDog/k9-misconfigs |
| 96 | + Scenario: List ownership inference history for a resource returns "OK" response |
| 97 | + Given operation "ListOwnershipHistory" enabled |
| 98 | + And new "ListOwnershipHistory" request |
| 99 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 100 | + When the request is sent |
| 101 | + Then the response status is 200 OK |
| 102 | + |
| 103 | + @generated @skip @team:DataDog/k9-misconfigs |
| 104 | + Scenario: List ownership inferences for a resource returns "Bad Request" response |
| 105 | + Given operation "ListOwnershipInferences" enabled |
| 106 | + And new "ListOwnershipInferences" request |
| 107 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 108 | + When the request is sent |
| 109 | + Then the response status is 400 Bad Request |
| 110 | + |
| 111 | + @generated @skip @team:DataDog/k9-misconfigs |
| 112 | + Scenario: List ownership inferences for a resource returns "Not Found" response |
| 113 | + Given operation "ListOwnershipInferences" enabled |
| 114 | + And new "ListOwnershipInferences" request |
| 115 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 116 | + When the request is sent |
| 117 | + Then the response status is 404 Not Found |
| 118 | + |
| 119 | + @generated @skip @team:DataDog/k9-misconfigs |
| 120 | + Scenario: List ownership inferences for a resource returns "OK" response |
| 121 | + Given operation "ListOwnershipInferences" enabled |
| 122 | + And new "ListOwnershipInferences" request |
| 123 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 124 | + When the request is sent |
| 125 | + Then the response status is 200 OK |
| 126 | + |
| 127 | + @generated @skip @team:DataDog/k9-misconfigs |
| 128 | + Scenario: Submit feedback on an ownership inference returns "Bad Request" response |
| 129 | + Given operation "CreateOwnershipFeedback" enabled |
| 130 | + And new "CreateOwnershipFeedback" request |
| 131 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 132 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 133 | + And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}} |
| 134 | + When the request is sent |
| 135 | + Then the response status is 400 Bad Request |
| 136 | + |
| 137 | + @generated @skip @team:DataDog/k9-misconfigs |
| 138 | + Scenario: Submit feedback on an ownership inference returns "Conflict" response |
| 139 | + Given operation "CreateOwnershipFeedback" enabled |
| 140 | + And new "CreateOwnershipFeedback" request |
| 141 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 142 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 143 | + And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}} |
| 144 | + When the request is sent |
| 145 | + Then the response status is 409 Conflict |
| 146 | + |
| 147 | + @generated @skip @team:DataDog/k9-misconfigs |
| 148 | + Scenario: Submit feedback on an ownership inference returns "Created" response |
| 149 | + Given operation "CreateOwnershipFeedback" enabled |
| 150 | + And new "CreateOwnershipFeedback" request |
| 151 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 152 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 153 | + And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}} |
| 154 | + When the request is sent |
| 155 | + Then the response status is 201 Created |
| 156 | + |
| 157 | + @generated @skip @team:DataDog/k9-misconfigs |
| 158 | + Scenario: Submit feedback on an ownership inference returns "Not Found" response |
| 159 | + Given operation "CreateOwnershipFeedback" enabled |
| 160 | + And new "CreateOwnershipFeedback" request |
| 161 | + And request contains "resource_id" parameter from "REPLACE.ME" |
| 162 | + And request contains "owner_type" parameter from "REPLACE.ME" |
| 163 | + And body with value {"data": {"attributes": {"action": "confirm", "actor_handle": "user@example.com", "actor_type": "user", "corrected_owner_handle": "team-b", "corrected_owner_type": "team", "inference_checksum": "abc123", "reason": "Confirmed by team lead."}, "type": "ownership_feedback"}} |
| 164 | + When the request is sent |
| 165 | + Then the response status is 404 Not Found |
0 commit comments