From 9a32c15458589f4707712b8d3962ecd03a2ee089 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:50:29 +0000 Subject: [PATCH] Update remove permission test param so it fails correctly (#2746) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +- ...ission_returns_Bad_Request_response.freeze | 2 +- ...rmission_returns_Bad_Request_response.yaml | 210 +----------------- tests/scenarios/features/v2/roles.feature | 5 +- 4 files changed, 18 insertions(+), 207 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 6d5e97cbcd3..068e499b296 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-23 10:08:17.346217", - "spec_repo_commit": "df3187ca" + "regenerated": "2024-10-23 16:36:56.915981", + "spec_repo_commit": "a916f673" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-10-23 10:08:17.364508", - "spec_repo_commit": "df3187ca" + "regenerated": "2024-10-23 16:36:56.934414", + "spec_repo_commit": "a916f673" } } } \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Roles/Scenario_Revoke_permission_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Roles/Scenario_Revoke_permission_returns_Bad_Request_response.freeze index 56cf1118bc6..c16eb713495 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Roles/Scenario_Revoke_permission_returns_Bad_Request_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Roles/Scenario_Revoke_permission_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2022-05-12T09:52:59.418Z \ No newline at end of file +2024-10-23T16:34:06.263Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Roles/Scenario_Revoke_permission_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Roles/Scenario_Revoke_permission_returns_Bad_Request_response.yaml index b9186d1fcdb..1ccc0cc4829 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Roles/Scenario_Revoke_permission_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Roles/Scenario_Revoke_permission_returns_Bad_Request_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"data":{"attributes":{"name":"Test-Revoke_permission_returns_Bad_Request_response-1652349179"},"type":"roles"}} + {"data":{"attributes":{"name":"Test-Revoke_permission_returns_Bad_Request_response-1729701246"},"type":"roles"}} form: {} headers: Accept: @@ -12,217 +12,29 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/roles response: - body: '{"data":{"type":"roles","id":"4e9847ba-d1d9-11ec-ad3d-da7ad0900002","attributes":{"name":"Test-Revoke_permission_returns_Bad_Request_response-1652349179","created_at":"2022-05-12T09:52:59.834597+00:00","modified_at":"2022-05-12T09:52:59.881343+00:00"},"relationships":{"permissions":{"data":[{"type":"permissions","id":"d90f6830-d3d8-11e9-a77a-b3404e5e9ee2"},{"type":"permissions","id":"4441648c-d8b1-11e9-a77a-1b899a04b304"},{"type":"permissions","id":"417ba636-2dce-11eb-84c0-6bce5b0d9de0"},{"type":"permissions","id":"12efc20e-d36c-11eb-a9b8-da7ad0900002"},{"type":"permissions","id":"97971c1c-e895-11eb-b13c-da7ad0900002"},{"type":"permissions","id":"7605ef24-f376-11eb-b90b-da7ad0900002"},{"type":"permissions","id":"b6bf9ac6-9a59-11ec-8480-da7ad0900002"}]}}}}' + body: '{"data":{"id":"9f155b5c-915c-11ef-b749-da7ad0900002","type":"roles","attributes":{"created_at":"2024-10-23T16:34:06.380085Z","modified_at":"2024-10-23T16:34:06.376797Z","name":"Test-Revoke_permission_returns_Bad_Request_response-1729701246","user_count":0},"relationships":{"permissions":{"data":[{"id":"d90f6830-d3d8-11e9-a77a-b3404e5e9ee2","type":"permissions"},{"id":"4441648c-d8b1-11e9-a77a-1b899a04b304","type":"permissions"},{"id":"417ba636-2dce-11eb-84c0-6bce5b0d9de0","type":"permissions"},{"id":"12efc20e-d36c-11eb-a9b8-da7ad0900002","type":"permissions"},{"id":"7605ef24-f376-11eb-b90b-da7ad0900002","type":"permissions"},{"id":"b6bf9ac6-9a59-11ec-8480-da7ad0900002","type":"permissions"},{"id":"f8e941cf-e746-11ec-b22d-da7ad0900002","type":"permissions"},{"id":"6c5ad874-7aff-11ed-a5cd-da7ad0900002","type":"permissions"},{"id":"a8b4d6e8-4ea4-11ee-b482-da7ad0900002","type":"permissions"},{"id":"50c270de-69ee-11ee-9151-da7ad0900002","type":"permissions"}]}}}}' code: 200 duration: 0ms headers: Content-Type: - - application/json - status: 200 OK -- request: - body: '' - form: {} - headers: - Accept: - - application/json - id: 1 - method: GET - url: https://api.datadoghq.com/api/v2/permissions - response: - body: '{"data":[{"type":"permissions","id":"984a2bd4-d3b4-11e8-a1ff-a7f660d43029","attributes":{"name":"admin","display_name":"Privileged - Access","description":"Deprecated. Privileged Access (also known as Admin permission) - has been replaced by more specific permissions: Access Management, Org Management, - Billing Read/Write, Usage Read/Write.","created":"2018-10-19T15:35:23.734317+00:00","group_name":"General","display_type":"other","restricted":false}},{"type":"permissions","id":"984d2f00-d3b4-11e8-a200-bb47109e9987","attributes":{"name":"standard","display_name":"Standard - Access","description":"View and edit components in your Datadog organization - that do not have explicitly defined permissions. This includes configuring integrations - (from the UI), SLOs, events, most facets, and saved views.","created":"2018-10-19T15:35:23.756736+00:00","group_name":"General","display_type":"other","restricted":false}},{"type":"permissions","id":"5e605652-dd12-11e8-9e53-375565b8970e","attributes":{"name":"logs_read_index_data","display_name":"Logs - Read Index Data","description":"Read log data, possibly scoped to one or more - indexes. In order to read log data, a user must have both this permission and - Logs Read Data. This permission can be granted in a limited capacity per index - from the Logs interface or APIs. If granted via the Roles interface or API the - permission has global scope. Restrictions are limited to the Log Management - product.","created":"2018-10-31T13:39:19.727450+00:00","group_name":"Logs","display_type":"read","restricted":false}},{"type":"permissions","id":"62cc036c-dd12-11e8-9e54-db9995643092","attributes":{"name":"logs_modify_indexes","display_name":"Logs - Modify Indexes","description":"Read and modify all indexes in your account. - This includes the ability to grant the Logs Read Index Data and Logs Write Exclusion - Filters permission to other roles, for some or all indexes.","created":"2018-10-31T13:39:27.148615+00:00","group_name":"Logs","display_type":"other","restricted":false}},{"type":"permissions","id":"6f66600e-dd12-11e8-9e55-7f30fbb45e73","attributes":{"name":"logs_live_tail","display_name":"Logs - Live Tail","description":"View the live tail feed for all log indexes, even - if otherwise specifically restricted.","created":"2018-10-31T13:39:48.292879+00:00","group_name":"Logs","display_type":"read","restricted":false}},{"type":"permissions","id":"7d7c98ac-dd12-11e8-9e56-93700598622d","attributes":{"name":"logs_write_exclusion_filters","display_name":"Logs - Write Exclusion Filters","description":"Add and change exclusion filters for - all or some log indexes. Can be granted in a limited capacity per index to specific - roles via the Logs interface or API. If granted from the Roles interface or - API, the permission has global scope.","created":"2018-10-31T13:40:11.926613+00:00","group_name":"Logs","display_type":"write","restricted":false}},{"type":"permissions","id":"811ac4ca-dd12-11e8-9e57-676a7f0beef9","attributes":{"name":"logs_write_pipelines","display_name":"Logs - Write Pipelines","description":"Add and change log pipeline configurations, - including the ability to grant the Logs Write Processors permission to other - roles, for some or all pipelines.","created":"2018-10-31T13:40:17.996379+00:00","group_name":"Logs","display_type":"other","restricted":false}},{"type":"permissions","id":"84aa3ae4-dd12-11e8-9e58-a373a514ccd0","attributes":{"name":"logs_write_processors","display_name":"Logs - Write Processors","description":"Add and change some or all log processor configurations. - Can be granted in a limited capacity per pipeline to specific roles via the - Logs interface or API. If granted via the Roles interface or API the permission - has global scope.","created":"2018-10-31T13:40:23.969725+00:00","group_name":"Logs","display_type":"write","restricted":false}},{"type":"permissions","id":"87b00304-dd12-11e8-9e59-cbeb5f71f72f","attributes":{"name":"logs_write_archives","display_name":"Logs - Write Archives","description":"Add and edit Log Archives.","created":"2018-10-31T13:40:29.040786+00:00","group_name":"Logs","display_type":"write","restricted":false}},{"type":"permissions","id":"979df720-aed7-11e9-99c6-a7eb8373165a","attributes":{"name":"logs_generate_metrics","display_name":"Logs - Generate Metrics","description":"Create custom metrics from logs.","created":"2019-07-25T12:27:39.640758+00:00","group_name":"Logs","display_type":"other","restricted":false}},{"type":"permissions","id":"d90f6830-d3d8-11e9-a77a-b3404e5e9ee2","attributes":{"name":"dashboards_read","display_name":"Dashboards - Read","description":"View dashboards.","created":"2019-09-10T14:39:51.955175+00:00","group_name":"Dashboards","display_type":"read","restricted":true}},{"type":"permissions","id":"d90f6831-d3d8-11e9-a77a-4fd230ddbc6a","attributes":{"name":"dashboards_write","display_name":"Dashboards - Write","description":"Create and change dashboards.","created":"2019-09-10T14:39:51.962944+00:00","group_name":"Dashboards","display_type":"write","restricted":false}},{"type":"permissions","id":"d90f6832-d3d8-11e9-a77a-bf8a2607f864","attributes":{"name":"dashboards_public_share","display_name":"Dashboards - Public Share","description":"Share dashboards externally.","created":"2019-09-10T14:39:51.967094+00:00","group_name":"Dashboards","display_type":"other","restricted":false}},{"type":"permissions","id":"4441648c-d8b1-11e9-a77a-1b899a04b304","attributes":{"name":"monitors_read","display_name":"Monitors - Read","description":"View monitors.","created":"2019-09-16T18:39:07.744297+00:00","group_name":"Monitors","display_type":"read","restricted":true}},{"type":"permissions","id":"48ef71ea-d8b1-11e9-a77a-93f408470ad0","attributes":{"name":"monitors_write","display_name":"Monitors - Write","description":"Edit, mute, and delete individual monitors.","created":"2019-09-16T18:39:15.597109+00:00","group_name":"Monitors","display_type":"write","restricted":false}},{"type":"permissions","id":"4d87d5f8-d8b1-11e9-a77a-eb9c8350d04f","attributes":{"name":"monitors_downtime","display_name":"Monitors - Manage Downtime","description":"Set downtimes to suppress alerts from any monitor - in an organization. The ability to write monitors is not required to set downtimes.","created":"2019-09-16T18:39:23.306702+00:00","group_name":"Monitors","display_type":"other","restricted":false}},{"type":"permissions","id":"1af86ce4-7823-11ea-93dc-d7cad1b1c6cb","attributes":{"name":"logs_read_data","display_name":"Logs - Read Data","description":"Read log data. In order to read log data, a user must - have both this permission and Logs Read Index Data. This permission can be restricted - with restriction queries. Restrictions are limited to the Log Management product.","created":"2020-04-06T16:24:35.989108+00:00","group_name":"Logs","display_type":"read","restricted":false}},{"type":"permissions","id":"b382b982-8535-11ea-93de-2bf1bdf20798","attributes":{"name":"logs_read_archives","display_name":"Logs - Read Archives","description":"Read Log Archives location and use it for rehydration.","created":"2020-04-23T07:40:27.966133+00:00","group_name":"Logs","display_type":"read","restricted":false}},{"type":"permissions","id":"7314eb20-aa58-11ea-95e2-6fb6e4a451d5","attributes":{"name":"security_monitoring_rules_read","display_name":"Security - Rules Read","description":"Read Detection Rules.","created":"2020-06-09T13:52:25.279909+00:00","group_name":"Cloud - Security Platform","display_type":"read","restricted":false}},{"type":"permissions","id":"7b516476-aa58-11ea-95e2-93718cd56369","attributes":{"name":"security_monitoring_rules_write","display_name":"Security - Rules Write","description":"Create and edit Detection Rules.","created":"2020-06-09T13:52:39.099413+00:00","group_name":"Cloud - Security Platform","display_type":"write","restricted":false}},{"type":"permissions","id":"80de1ec0-aa58-11ea-95e2-aff381626d5d","attributes":{"name":"security_monitoring_signals_read","display_name":"Security - Signals Read","description":"View Security Signals.","created":"2020-06-09T13:52:48.410398+00:00","group_name":"Cloud - Security Platform","display_type":"read","restricted":false}},{"type":"permissions","id":"58b412cc-ff6d-11eb-bc9c-da7ad0900002","attributes":{"name":"security_monitoring_signals_write","display_name":"Security - Signals Write","description":"Modify Security Signals.","created":"2021-08-17T15:11:06.963503+00:00","group_name":"Cloud - Security Platform","display_type":"write","restricted":false}},{"type":"permissions","id":"9ac1d8cc-e707-11ea-aa2d-73d37e989a9d","attributes":{"name":"user_access_invite","display_name":"User - Access Invite","description":"Invite other users to your organization.","created":"2020-08-25T19:17:23.539701+00:00","group_name":"Access - Management","display_type":"other","restricted":false}},{"type":"permissions","id":"9de604d8-e707-11ea-aa2d-93f1a783b3a3","attributes":{"name":"user_access_manage","display_name":"User - Access Manage","description":"Disable users, manage user roles, manage SAML-to-role - mappings, and configure logs restriction queries.","created":"2020-08-25T19:17:28.810412+00:00","group_name":"Access - Management","display_type":"other","restricted":false}},{"type":"permissions","id":"46a301da-ec5c-11ea-aa9f-73bedeab67ee","attributes":{"name":"user_app_keys","display_name":"User - App Keys","description":"View and manage Application Keys owned by the user.","created":"2020-09-01T14:06:05.444705+00:00","group_name":"API - and Application Keys","display_type":"other","restricted":false}},{"type":"permissions","id":"46a301db-ec5c-11ea-aa9f-2fe72193d60e","attributes":{"name":"org_app_keys_read","display_name":"Org - App Keys Read","description":"View Application Keys owned by all users in the - organization.","created":"2020-09-01T14:06:05.444705+00:00","group_name":"API - and Application Keys","display_type":"read","restricted":false}},{"type":"permissions","id":"46a301dc-ec5c-11ea-aa9f-13b33f8f46ea","attributes":{"name":"org_app_keys_write","display_name":"Org - App Keys Write","description":"Manage Application Keys owned by all users in - the organization.","created":"2020-09-01T14:06:05.444705+00:00","group_name":"API - and Application Keys","display_type":"write","restricted":false}},{"type":"permissions","id":"46a301dd-ec5c-11ea-aa9f-97edfb345bc9","attributes":{"name":"synthetics_private_location_read","display_name":"Synthetics - Private Location Read","description":"View, search, and use in tests the list - of available private locations.","created":"2020-09-01T14:06:05.444705+00:00","group_name":"Synthetic - Monitoring","display_type":"read","restricted":false}},{"type":"permissions","id":"46a301de-ec5c-11ea-aa9f-a73252c24806","attributes":{"name":"synthetics_private_location_write","display_name":"Synthetics - Private Location Write","description":"Create and delete private locations as - well as seeing the associated installation guidelines.","created":"2020-09-01T14:06:05.444705+00:00","group_name":"Synthetic - Monitoring","display_type":"write","restricted":false}},{"type":"permissions","id":"46a301df-ec5c-11ea-aa9f-970a9ae645e5","attributes":{"name":"billing_read","display_name":"Billing - Read","description":"View your organization''s subscription and payment method - but not make edits.","created":"2020-09-01T14:06:05.444705+00:00","group_name":"Billing - and Usage","display_type":"read","restricted":false}},{"type":"permissions","id":"46a301e0-ec5c-11ea-aa9f-6ba6cc675d8c","attributes":{"name":"billing_edit","display_name":"Billing - Edit","description":"Manage your organization''s subscription and payment method.","created":"2020-09-01T14:06:05.444705+00:00","group_name":"Billing - and Usage","display_type":"write","restricted":false}},{"type":"permissions","id":"46a301e1-ec5c-11ea-aa9f-afa39f6f3e36","attributes":{"name":"usage_read","display_name":"Usage - Read","description":"View your organization''s usage and usage attribution.","created":"2020-09-01T14:06:05.444705+00:00","group_name":"Billing - and Usage","display_type":"read","restricted":false}},{"type":"permissions","id":"46a301e2-ec5c-11ea-aa9f-1f511b7305fd","attributes":{"name":"usage_edit","display_name":"Usage - Edit","description":"Manage your organization''s usage attribution set-up.","created":"2020-09-01T14:06:05.444705+00:00","group_name":"Billing - and Usage","display_type":"write","restricted":false}},{"type":"permissions","id":"46a301e4-ec5c-11ea-aa9f-87282b3a50cc","attributes":{"name":"metric_tags_write","display_name":"Metric - Tags Write","description":"Edit and save tag configurations for custom metrics.","created":"2020-09-01T14:06:05.444705+00:00","group_name":"Metrics","display_type":"write","restricted":false}},{"type":"permissions","id":"07c3c146-f7f8-11ea-acf6-0bd62b9ae60e","attributes":{"name":"logs_write_historical_view","display_name":"Logs - Write Historical View","description":"Rehydrate logs from Archives.","created":"2020-09-16T08:38:44.242076+00:00","group_name":"Logs","display_type":"write","restricted":false}},{"type":"permissions","id":"2fbdac76-f923-11ea-adbc-07f3823e2b43","attributes":{"name":"audit_logs_read","display_name":"Audit - Logs Read","description":"View Audit Logs in your organization.","created":"2020-09-17T20:20:10.834252+00:00","group_name":"Compliance","display_type":"read","restricted":false}},{"type":"permissions","id":"372896c4-f923-11ea-adbc-4fecd107156d","attributes":{"name":"api_keys_read","display_name":"API - Keys Read","description":"List and retrieve the key values of all API Keys in - your organization.","created":"2020-09-17T20:20:23.279769+00:00","group_name":"API - and Application Keys","display_type":"read","restricted":false}},{"type":"permissions","id":"3e4d4d28-f923-11ea-adbc-e3565938c12e","attributes":{"name":"api_keys_write","display_name":"API - Keys Write","description":"Create, rename, and revoke API Keys for your organization.","created":"2020-09-17T20:20:35.264430+00:00","group_name":"API - and Application Keys","display_type":"write","restricted":false}},{"type":"permissions","id":"4628ca54-f923-11ea-adbc-4b2b7f88c5e9","attributes":{"name":"synthetics_global_variable_read","display_name":"Synthetics - Global Variable Read","description":"View, search, and use in tests the list - of global variables available for Synthetics.","created":"2020-09-17T20:20:48.446916+00:00","group_name":"Synthetic - Monitoring","display_type":"read","restricted":false}},{"type":"permissions","id":"4ada6e36-f923-11ea-adbc-0788e5c5e3cf","attributes":{"name":"synthetics_global_variable_write","display_name":"Synthetics - Global Variable Write","description":"Create, edit, and delete global variables - for Synthetics.","created":"2020-09-17T20:20:56.322003+00:00","group_name":"Synthetic - Monitoring","display_type":"write","restricted":false}},{"type":"permissions","id":"5025ee24-f923-11ea-adbc-576ea241df8d","attributes":{"name":"synthetics_read","display_name":"Synthetics - Read","description":"List and view configured Synthetic tests.","created":"2020-09-17T20:21:05.205361+00:00","group_name":"Synthetic - Monitoring","display_type":"read","restricted":false}},{"type":"permissions","id":"55f4b5ec-f923-11ea-adbc-1bfa2334a755","attributes":{"name":"synthetics_write","display_name":"Synthetics - Write","description":"Create, edit, and delete Synthetic tests.","created":"2020-09-17T20:21:14.949140+00:00","group_name":"Synthetic - Monitoring","display_type":"write","restricted":false}},{"type":"permissions","id":"5c6b88e2-f923-11ea-adbc-abf57d079420","attributes":{"name":"synthetics_default_settings_read","display_name":"Synthetics - Default Settings Read","description":"View default settings for Synthetics Monitoring.","created":"2020-09-17T20:21:25.794160+00:00","group_name":"Synthetic - Monitoring","display_type":"read","restricted":false}},{"type":"permissions","id":"642eebe6-f923-11ea-adbc-eb617674ea04","attributes":{"name":"synthetics_default_settings_write","display_name":"Synthetics - Default Settings Write","description":"Edit default settings for Synthetics - Monitoring.","created":"2020-09-17T20:21:38.818771+00:00","group_name":"Synthetic - Monitoring","display_type":"write","restricted":false}},{"type":"permissions","id":"6ba32d22-0e1a-11eb-ba44-bf9a5aafaa39","attributes":{"name":"logs_write_facets","display_name":"Logs - Write Facets","description":"Create or edit Log Facets.","created":"2020-10-14T12:40:20.271908+00:00","group_name":"Logs","display_type":"write","restricted":false}},{"type":"permissions","id":"a42e94b2-1476-11eb-bd08-efda28c04248","attributes":{"name":"service_account_write","display_name":"Service - Account Write","description":"Create, disable, and use Service Accounts in your - organization.","created":"2020-10-22T14:55:35.814239+00:00","group_name":"Access - Management","display_type":"write","restricted":false}},{"type":"permissions","id":"fcac2ad8-2843-11eb-8315-0fe47949d625","attributes":{"name":"integrations_api","display_name":"Integrations - API","description":"Use the Integrations APIs to configure integrations. In - order to configure integrations from the UI, a user must have Standard Access - instead.","created":"2020-11-16T19:43:23.198568+00:00","group_name":"Integrations","display_type":"other","restricted":false}},{"type":"permissions","id":"417ba636-2dce-11eb-84c0-6bce5b0d9de0","attributes":{"name":"apm_read","display_name":"APM - Read","description":"Read and query APM and Trace Analytics.","created":"2020-11-23T20:55:45.006110+00:00","group_name":"APM","display_type":"read","restricted":true}},{"type":"permissions","id":"43fa188e-2dce-11eb-84c0-835ad1fd6287","attributes":{"name":"apm_retention_filter_read","display_name":"APM - Retention Filter Read","description":"Read trace retention filters. A user with - this permission can view the retention filters page, list of filters, their - statistics, and creation info.","created":"2020-11-23T20:55:49.190595+00:00","group_name":"APM","display_type":"read","restricted":false}},{"type":"permissions","id":"465cfe66-2dce-11eb-84c0-6baa888239fa","attributes":{"name":"apm_retention_filter_write","display_name":"APM - Retention Filter Write","description":"Create, edit, and delete trace retention - filters. A user with this permission can create new retention filters, and update - or delete to existing retention filters.","created":"2020-11-23T20:55:53.194236+00:00","group_name":"APM","display_type":"write","restricted":false}},{"type":"permissions","id":"4916eebe-2dce-11eb-84c0-271cb2c672e8","attributes":{"name":"apm_service_ingest_read","display_name":"APM - Service Ingest Read","description":"Access service ingestion pages. A user with - this permission can view the service ingestion page, list of root services, - their statistics, and creation info.","created":"2020-11-23T20:55:57.768261+00:00","group_name":"APM","display_type":"read","restricted":false}},{"type":"permissions","id":"4e3f02b4-2dce-11eb-84c0-2fca946a6efc","attributes":{"name":"apm_service_ingest_write","display_name":"APM - Service Ingest Write","description":"Edit service ingestion pages'' root services. - A user with this permission can edit the root service ingestion and generate - a code snippet to increase ingestion per service.","created":"2020-11-23T20:56:06.419518+00:00","group_name":"APM","display_type":"write","restricted":false}},{"type":"permissions","id":"53950c54-2dce-11eb-84c0-a79ae108f6f8","attributes":{"name":"apm_apdex_manage_write","display_name":"APM - Apdex Manage Write","description":"Set Apdex T value on any service. A user - with this permission can set the T value from the Apdex graph on the service - page.","created":"2020-11-23T20:56:15.371926+00:00","group_name":"APM","display_type":"write","restricted":false}},{"type":"permissions","id":"5cbe5f9c-2dce-11eb-84c0-872d3e9f1076","attributes":{"name":"apm_tag_management_write","display_name":"APM - Tag Management Write","description":"Edit second primary tag selection. A user - with this permission can modify the second primary tag dropdown in the APM settings - page.","created":"2020-11-23T20:56:30.742299+00:00","group_name":"APM","display_type":"write","restricted":false}},{"type":"permissions","id":"61765026-2dce-11eb-84c0-833e230d1b8f","attributes":{"name":"apm_primary_operation_write","display_name":"APM - Primary Operation Write","description":"Edit the operation name value selection. - A user with this permission can modify the operation name list in the APM settings - page and the operation name controller on the service page.","created":"2020-11-23T20:56:38.658649+00:00","group_name":"APM","display_type":"write","restricted":false}},{"type":"permissions","id":"04bc1cf2-340a-11eb-873a-43b973c760dd","attributes":{"name":"audit_logs_write","display_name":"Audit - Logs Write","description":"Configure Audit Logs in your organization.","created":"2020-12-01T19:18:39.866516+00:00","group_name":"Compliance","display_type":"write","restricted":false}},{"type":"permissions","id":"8106300a-54f7-11eb-8cbc-7781a434a67b","attributes":{"name":"rum_apps_write","display_name":"RUM - Apps Write","description":"Create, edit, and delete RUM Applications.","created":"2021-01-12T16:59:16.324480+00:00","group_name":"Real - User Monitoring","display_type":"write","restricted":false}},{"type":"permissions","id":"bf0dcf7c-90af-11eb-9b82-da7ad0900002","attributes":{"name":"data_scanner_read","display_name":"Data - Scanner Read","description":"View Data Scanner configurations.","created":"2021-03-29T16:56:46.394971+00:00","group_name":"Compliance","display_type":"read","restricted":false}},{"type":"permissions","id":"bf0dcf7d-90af-11eb-9b82-da7ad0900002","attributes":{"name":"data_scanner_write","display_name":"Data - Scanner Write","description":"Edit Data Scanner configurations.","created":"2021-03-29T16:56:46.398584+00:00","group_name":"Compliance","display_type":"write","restricted":false}},{"type":"permissions","id":"7df222b6-a45c-11eb-a0af-da7ad0900002","attributes":{"name":"org_management","display_name":"Org - Management","description":"Edit org configurations, including authentication - and certain security preferences such as configuring SAML, renaming an org, - configuring allowed login methods, creating child orgs, subscribing & unsubscribing - from apps in the marketplace.","created":"2021-04-23T17:51:12.187340+00:00","group_name":"Access - Management","display_type":"write","restricted":false}},{"type":"permissions","id":"98b984f4-b16d-11eb-a2c6-da7ad0900002","attributes":{"name":"security_monitoring_filters_read","display_name":"Security - Filters Read","description":"Read Security Filters.","created":"2021-05-10T08:56:23.676833+00:00","group_name":"Cloud - Security Platform","display_type":"read","restricted":false}},{"type":"permissions","id":"98b984f5-b16d-11eb-a2c6-da7ad0900002","attributes":{"name":"security_monitoring_filters_write","display_name":"Security - Filters Write","description":"Create, edit, and delete Security Filters.","created":"2021-05-10T08:56:23.680551+00:00","group_name":"Cloud - Security Platform","display_type":"write","restricted":false}},{"type":"permissions","id":"12efc20e-d36c-11eb-a9b8-da7ad0900002","attributes":{"name":"incident_read","display_name":"Incident - Read","description":"View incidents in Datadog.","created":"2021-06-22T15:11:09.255499+00:00","group_name":"Incidents","display_type":"read","restricted":true}},{"type":"permissions","id":"12efc211-d36c-11eb-a9b8-da7ad0900002","attributes":{"name":"incident_write","display_name":"Incident - Write","description":"Create, view, and manage incidents in Datadog.","created":"2021-06-22T15:11:09.264369+00:00","group_name":"Incidents","display_type":"write","restricted":false}},{"type":"permissions","id":"12efc20f-d36c-11eb-a9b8-da7ad0900002","attributes":{"name":"incident_settings_read","display_name":"Incidents - Settings Read","description":"View Incidents settings.","created":"2021-06-22T15:11:09.259568+00:00","group_name":"Incidents","display_type":"read","restricted":false}},{"type":"permissions","id":"12efc210-d36c-11eb-a9b8-da7ad0900002","attributes":{"name":"incident_settings_write","display_name":"Incidents - Settings Write","description":"Configure Incidents settings.","created":"2021-06-22T15:11:09.261986+00:00","group_name":"Incidents","display_type":"write","restricted":false}},{"type":"permissions","id":"97971c1c-e895-11eb-b13c-da7ad0900002","attributes":{"name":"appsec_event_rule_read","display_name":"Application - Security Event Rules Read","description":"View Application Security Event Rules.","created":"2021-07-19T13:31:15.595771+00:00","group_name":"Cloud - Security Platform","display_type":"read","restricted":true}},{"type":"permissions","id":"97971c1d-e895-11eb-b13c-da7ad0900002","attributes":{"name":"appsec_event_rule_write","display_name":"Application - Security Event Rules Write","description":"Edit Application Security Event Rules.","created":"2021-07-19T13:31:15.598808+00:00","group_name":"Cloud - Security Platform","display_type":"write","restricted":false}},{"type":"permissions","id":"7605ef24-f376-11eb-b90b-da7ad0900002","attributes":{"name":"rum_apps_read","display_name":"RUM - Apps Read","description":"View RUM Applications data.","created":"2021-08-02T09:46:07.671535+00:00","group_name":"Real - User Monitoring","display_type":"read","restricted":true}},{"type":"permissions","id":"7605ef25-f376-11eb-b90b-da7ad0900002","attributes":{"name":"rum_session_replay_read","display_name":"RUM - Session Replay Read","description":"View Session Replays.","created":"2021-08-02T09:46:07.674640+00:00","group_name":"Real - User Monitoring","display_type":"read","restricted":false}},{"type":"permissions","id":"c95412b8-16c7-11ec-85c0-da7ad0900002","attributes":{"name":"security_monitoring_notification_profiles_read","display_name":"Security - Notification Rules Read","description":"Read Notification Rules.","created":"2021-09-16T08:26:27.366789+00:00","group_name":"Cloud - Security Platform","display_type":"read","restricted":false}},{"type":"permissions","id":"c95412b9-16c7-11ec-85c0-da7ad0900002","attributes":{"name":"security_monitoring_notification_profiles_write","display_name":"Security - Notification Rules Write","description":"Create, edit, and delete Notification - Rules.","created":"2021-09-16T08:26:27.369359+00:00","group_name":"Cloud Security - Platform","display_type":"write","restricted":false}},{"type":"permissions","id":"26c79920-1703-11ec-85d2-da7ad0900002","attributes":{"name":"apm_generate_metrics","display_name":"APM - Generate Metrics","description":"Create custom metrics from spans.","created":"2021-09-16T15:31:24.458963+00:00","group_name":"APM","display_type":"other","restricted":false}},{"type":"permissions","id":"020a563c-56a4-11ec-a982-da7ad0900002","attributes":{"name":"apm_pipelines_write","display_name":"APM - Pipelines Write","description":"Add and change APM pipeline configurations.","created":"2021-12-06T14:51:35.049129+00:00","group_name":"APM","display_type":"write","restricted":false}},{"type":"permissions","id":"8e4d6b6e-5750-11ec-a9f4-da7ad0900002","attributes":{"name":"apm_pipelines_read","display_name":"APM - Pipelines Read","description":"View APM pipeline configurations.","created":"2021-12-07T11:26:43.807269+00:00","group_name":"APM","display_type":"read","restricted":false}},{"type":"permissions","id":"945b3bb4-5884-11ec-aa6d-da7ad0900002","attributes":{"name":"observability_pipelines_read","display_name":"Pipeline - Configurations Read","description":"View pipeline configurations.","created":"2021-12-09T00:11:38.956827+00:00","group_name":"Observability - Pipelines","display_type":"read","restricted":false}},{"type":"permissions","id":"945b3bb5-5884-11ec-aa6d-da7ad0900002","attributes":{"name":"observability_pipelines_write","display_name":"Pipeline - Configurations Write","description":"Create, edit, and delete pipeline configurations.","created":"2021-12-09T00:11:38.960833+00:00","group_name":"Observability - Pipelines","display_type":"write","restricted":false}},{"type":"permissions","id":"7a89ec40-8b69-11ec-812d-da7ad0900002","attributes":{"name":"incidents_private_global_access","display_name":"Private - Incidents Global Access","description":"Access all private incidents in Datadog, - even when not added as a responder.","created":"2022-02-11T18:36:08.531989+00:00","group_name":"Incidents","display_type":"other","restricted":false}},{"type":"permissions","id":"b6bf9ac6-9a59-11ec-8480-da7ad0900002","attributes":{"name":"notebooks_read","display_name":"Notebooks - Read","description":"View notebooks.","created":"2022-03-02T18:51:05.040950+00:00","group_name":"Notebooks","display_type":"read","restricted":true}},{"type":"permissions","id":"b6bf9ac7-9a59-11ec-8480-da7ad0900002","attributes":{"name":"notebooks_write","display_name":"Notebooks - Write","description":"Create and change notebooks.","created":"2022-03-02T18:51:05.044683+00:00","group_name":"Notebooks","display_type":"write","restricted":false}},{"type":"permissions","id":"2108215e-b9b4-11ec-958e-da7ad0900002","attributes":{"name":"rum_generate_metrics","display_name":"RUM - Generate Metrics","description":"Create custom metrics from RUM events.","created":"2022-04-11T16:26:24.106645+00:00","group_name":"Real - User Monitoring","display_type":"write","restricted":false}}]}' - code: 200 - duration: 0ms - headers: - Content-Type: - - application/json + - application/vnd.api+json status: 200 OK - request: body: | - {"data":{"id":"11111111-dead-beef-dead-ffffffffffff","type":"permissions"}} + {"data":{"id":"11111111-dead-beef-dead-ffffffffffff","type":"bad_permission_type"}} form: {} headers: Accept: - application/json Content-Type: - application/json - id: 2 + id: 1 method: DELETE - url: https://api.datadoghq.com/api/v2/roles/4e9847ba-d1d9-11ec-ad3d-da7ad0900002/permissions + url: https://api.datadoghq.com/api/v2/roles/9f155b5c-915c-11ef-b749-da7ad0900002/permissions response: - body: '{"errors": ["Invalid permission id: 11111111-dead-beef-dead-ffffffffffff"]}' + body: '{"errors":["400 BAD REQUEST"]} + + ' code: 400 duration: 0ms headers: @@ -235,9 +47,9 @@ interactions: headers: Accept: - '*/*' - id: 3 + id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/roles/4e9847ba-d1d9-11ec-ad3d-da7ad0900002 + url: https://api.datadoghq.com/api/v2/roles/9f155b5c-915c-11ef-b749-da7ad0900002 response: body: '' code: 204 diff --git a/tests/scenarios/features/v2/roles.feature b/tests/scenarios/features/v2/roles.feature index e9d2ab41147..bc82e0b07ec 100644 --- a/tests/scenarios/features/v2/roles.feature +++ b/tests/scenarios/features/v2/roles.feature @@ -254,13 +254,12 @@ Feature: Roles When the request is sent Then the response status is 200 OK - @team:DataDog/aaa-core-access + @skip-validation @team:DataDog/aaa-core-access Scenario: Revoke permission returns "Bad Request" response Given there is a valid "role" in the system - And there is a valid "permission" in the system And new "RemovePermissionFromRole" request And request contains "role_id" parameter from "role.data.id" - And body with value {"data": {"id": "11111111-dead-beef-dead-ffffffffffff", "type": "{{ permission.type }}"}} + And body with value {"data": {"id": "11111111-dead-beef-dead-ffffffffffff", "type": "bad_permission_type"}} When the request is sent Then the response status is 400 Bad Request