-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathdashboard_secure_embed.feature
More file actions
99 lines (89 loc) · 6.79 KB
/
dashboard_secure_embed.feature
File metadata and controls
99 lines (89 loc) · 6.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@endpoint(dashboard-secure-embed) @endpoint(dashboard-secure-embed-v2) @endpoint(https://api.datadoghq.com) @endpoint(https://api.datadoghq.eu) @endpoint(https://api.ddog-gov.com) @endpoint(https://api.us5.datadoghq.com)
Feature: Dashboard Secure Embed
Manage securely embedded Datadog dashboards. Secure embeds use HMAC-SHA256
signed sessions for authentication, enabling customers to embed dashboards
in their own applications with server-side auth control. Unlike public
dashboards (open URL) or invite dashboards (email-based access), secure
embeds provide programmatic access control. **Requirements:** - **Embed**
sharing must be enabled under **Organization Settings** > **Public
Sharing** > **Shared Dashboards**. - You need [an API key and an
application key](https://docs.datadoghq.com/account_management/api-app-
keys/) to interact with these endpoints.
Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "DashboardSecureEmbed" API
@generated @skip @team:DataDog/dashboardsnotebooks-backend
Scenario: Create a secure embed for a dashboard returns "Conflict — max 1000 share URLs per dashboard exceeded" response
Given operation "CreateDashboardSecureEmbed" enabled
And new "CreateDashboardSecureEmbed" request
And request contains "dashboard_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}}
When the request is sent
Then the response status is 409 Conflict — max 1000 share URLs per dashboard exceeded
@generated @skip @team:DataDog/dashboardsnotebooks-backend
Scenario: Create a secure embed for a dashboard returns "Dashboard Not Found" response
Given operation "CreateDashboardSecureEmbed" enabled
And new "CreateDashboardSecureEmbed" request
And request contains "dashboard_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}}
When the request is sent
Then the response status is 404 Dashboard Not Found
@generated @skip @team:DataDog/dashboardsnotebooks-backend
Scenario: Create a secure embed for a dashboard returns "OK" response
Given operation "CreateDashboardSecureEmbed" enabled
And new "CreateDashboardSecureEmbed" request
And request contains "dashboard_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_request"}}
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/dashboardsnotebooks-backend
Scenario: Delete a secure embed for a dashboard returns "No Content" response
Given operation "DeleteDashboardSecureEmbed" enabled
And new "DeleteDashboardSecureEmbed" request
And request contains "dashboard_id" parameter from "REPLACE.ME"
And request contains "token" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 204 No Content
@generated @skip @team:DataDog/dashboardsnotebooks-backend
Scenario: Delete a secure embed for a dashboard returns "Not Found" response
Given operation "DeleteDashboardSecureEmbed" enabled
And new "DeleteDashboardSecureEmbed" request
And request contains "dashboard_id" parameter from "REPLACE.ME"
And request contains "token" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/dashboardsnotebooks-backend
Scenario: Get a secure embed for a dashboard returns "Not Found" response
Given operation "GetDashboardSecureEmbed" enabled
And new "GetDashboardSecureEmbed" request
And request contains "dashboard_id" parameter from "REPLACE.ME"
And request contains "token" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/dashboardsnotebooks-backend
Scenario: Get a secure embed for a dashboard returns "OK" response
Given operation "GetDashboardSecureEmbed" enabled
And new "GetDashboardSecureEmbed" request
And request contains "dashboard_id" parameter from "REPLACE.ME"
And request contains "token" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
@generated @skip @team:DataDog/dashboardsnotebooks-backend
Scenario: Update a secure embed for a dashboard returns "Not Found" response
Given operation "UpdateDashboardSecureEmbed" enabled
And new "UpdateDashboardSecureEmbed" request
And request contains "dashboard_id" parameter from "REPLACE.ME"
And request contains "token" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard (Updated)", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_update_request"}}
When the request is sent
Then the response status is 404 Not Found
@generated @skip @team:DataDog/dashboardsnotebooks-backend
Scenario: Update a secure embed for a dashboard returns "OK" response
Given operation "UpdateDashboardSecureEmbed" enabled
And new "UpdateDashboardSecureEmbed" request
And request contains "dashboard_id" parameter from "REPLACE.ME"
And request contains "token" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"global_time": {"live_span": "1h"}, "global_time_selectable": true, "selectable_template_vars": [{"default_values": ["1"], "name": "org_id", "prefix": "org_id", "visible_tags": ["1"]}], "status": "active", "title": "Q1 Metrics Dashboard (Updated)", "viewing_preferences": {"high_density": false, "theme": "system"}}, "type": "secure_embed_update_request"}}
When the request is sent
Then the response status is 200 OK