sefrone-api-e2e 1.3.1__tar.gz → 1.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/PKG-INFO +1 -1
  2. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Auth/1_normal_auth_flow.yaml +0 -33
  3. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Auth/2_account_endpoints.yaml +0 -2
  4. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Auth/3_admin_account_endpoints.yaml +476 -310
  5. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Auth/5_apikey_endpoints.yaml +0 -5
  6. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e.egg-info/PKG-INFO +1 -1
  7. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/setup.py +1 -1
  8. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/README.md +0 -0
  9. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/__init__.py +0 -0
  10. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/api_e2e_manager.py +0 -0
  11. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Auth/0_check_features.yaml +0 -0
  12. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Auth/4_workspace_endpoints.yaml +0 -0
  13. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Auth/6_project_endpoints.yaml +0 -0
  14. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Auth/7_email_2fa_flow.yaml +0 -0
  15. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Auth/8_temporary_passwords_flow.yaml +0 -0
  16. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Oidc/1_relying_party_admin.yaml +0 -0
  17. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Oidc/2_authorization_code_flow.yaml +0 -0
  18. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Oidc/3_disable_propagation_flow.yaml +0 -0
  19. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e/Scenarios/Oidc/4_multi_project_isolation.yaml +0 -0
  20. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/e2e_scenarios_manager.py +0 -0
  21. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/env_patch.py +0 -0
  22. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/json_mock_server.py +0 -0
  23. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/runner_assets.py +0 -0
  24. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/runner_email_mock.py +0 -0
  25. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/runner_rest_api.py +0 -0
  26. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/runner_satim_mock.py +0 -0
  27. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/runner_webhook_mock.py +0 -0
  28. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e/step_runner.py +0 -0
  29. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e.egg-info/SOURCES.txt +0 -0
  30. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e.egg-info/dependency_links.txt +0 -0
  31. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e.egg-info/requires.txt +0 -0
  32. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/sefrone_api_e2e.egg-info/top_level.txt +0 -0
  33. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sefrone_api_e2e
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: A Python package to provide e2e testing helpers for sefrone API projects
5
5
  Home-page: https://bitbucket.org/sefrone/sefrone_pypi
6
6
  Author: Sefrone
@@ -38,7 +38,6 @@ steps:
38
38
  projectId: string
39
39
  project: string
40
40
  accountType: string
41
- credentialType: string
42
41
  isActive: boolean
43
42
  username: string
44
43
  linkedWorkspaces:
@@ -63,32 +62,6 @@ steps:
63
62
  - "{{body.response.username}} == 'admin'"
64
63
  - "{{body.response.isActive}} == True"
65
64
  - "{{body.response.accountType}} == 'root'"
66
- - "{{body.response.credentialType}} == 'standard'"
67
-
68
- - name: "Get user permissions"
69
- method: "GET"
70
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/permission/{$stored.login_account_id}"
71
- request_headers:
72
- - x-api-token: "{$stored.login_token}"
73
- expect:
74
- status: 200
75
- body:
76
- errorCode: number
77
- errorCodeStr: string
78
- message: string
79
- response:
80
- accountId: string
81
- projectId: string
82
- permissions:
83
- Projects: string
84
- Workspaces: string
85
- ListWorkspaces: string
86
- Accounts: string
87
- ApiKeys: string
88
- AuthStats: string
89
- AccountState: string
90
- ChangeAccountPermissions: string
91
- ChangeAccountCredentials: string
92
65
 
93
66
  - name: "Create guest account"
94
67
  skip_if:
@@ -106,7 +79,6 @@ steps:
106
79
  projectId: string
107
80
  project: string
108
81
  accountType: string
109
- credentialType: string
110
82
  isActive: boolean
111
83
  username: string
112
84
  linkedWorkspaces: []
@@ -117,7 +89,6 @@ steps:
117
89
  guest_account_id: "{{body.response.accountId}}"
118
90
  assertions:
119
91
  - "{{body.response.accountType}} == 'guest'"
120
- - "{{body.response.credentialType}} == 'guest'"
121
92
  - "{{body.response.isActive}} == True"
122
93
  - "{{body.response.username}} include 'Guest_'"
123
94
  - "{{body.response.linkedWorkspaces.count()}} == 0"
@@ -140,7 +111,6 @@ steps:
140
111
  projectId: string
141
112
  project: string
142
113
  accountType: string
143
- credentialType: string
144
114
  isActive: boolean
145
115
  username: string
146
116
  linkedWorkspaces: []
@@ -169,7 +139,6 @@ steps:
169
139
  projectId: string
170
140
  project: string
171
141
  accountType: string
172
- credentialType: string
173
142
  isActive: boolean
174
143
  username: string
175
144
  linkedWorkspaces:
@@ -183,7 +152,6 @@ steps:
183
152
  workspace_guest_account_id: "{{body.response.accountId}}"
184
153
  assertions:
185
154
  - "{{body.response.accountType}} == 'guest'"
186
- - "{{body.response.credentialType}} == 'guest'"
187
155
  - "{{body.response.linkedWorkspaces.count()}} == 1"
188
156
  - "{{body.response.linkedWorkspaces[0].workspaceName}} == '$var(DEFAULT_WORKSPACE_NAME)'"
189
157
 
@@ -206,7 +174,6 @@ steps:
206
174
  projectId: string
207
175
  project: string
208
176
  accountType: string
209
- credentialType: string
210
177
  isActive: boolean
211
178
  username: string
212
179
  linkedWorkspaces:
@@ -46,7 +46,6 @@ steps:
46
46
  projectId: string
47
47
  project: string
48
48
  accountType: string
49
- credentialType: string
50
49
  isActive: boolean
51
50
  username: string
52
51
  linkedWorkspaces:
@@ -58,7 +57,6 @@ steps:
58
57
  managed_account_username: "{{body.response.username}}"
59
58
  assertions:
60
59
  - "{{body.response.accountType}} == 'standard'"
61
- - "{{body.response.credentialType}} == 'standard'"
62
60
  - "{{body.response.isActive}} == True"
63
61
  - "{{body.response.linkedWorkspaces.count()}} == 1"
64
62
  - "{{body.response.linkedWorkspaces[0].workspaceName}} == '$var(DEFAULT_WORKSPACE_NAME)'"
@@ -1,310 +1,476 @@
1
- name: "Root Account Endpoints Flow"
2
- base_url: "http://localhost:$var(API_PUBLIC_PORT)"
3
- steps:
4
- - name: "Login root admin"
5
- retry:
6
- attempts: 10
7
- delay_seconds: 5
8
- method: "POST"
9
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
10
- send_as: "json"
11
- body:
12
- device: "e2e_test_device"
13
- pseudo: "$var(DEFAULT_USERNAME)"
14
- password: "$var(DEFAULT_PASSWORD)"
15
- expect:
16
- status: 200
17
- body:
18
- response:
19
- token: string
20
- save:
21
- root_admin_token: "{{body.response.token}}"
22
-
23
- - name: "Generate unique test suffix"
24
- randomize:
25
- seed_account_id: 8
26
-
27
- - name: "Root create managed standard account"
28
- method: "POST"
29
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create"
30
- request_headers:
31
- - x-api-token: "{$stored.root_admin_token}"
32
- send_as: "json"
33
- body:
34
- username: "e2e_admin_managed_{$stored.seed_account_id}"
35
- password: "e2e_admin_pwd_v1"
36
- expect:
37
- status: 200
38
- body:
39
- errorCode: number
40
- errorCodeStr: string
41
- message: string
42
- response:
43
- accountId: string
44
- projectId: string
45
- project: string
46
- accountType: string
47
- credentialType: string
48
- isActive: boolean
49
- username: string
50
- linkedWorkspaces: []
51
- save:
52
- admin_managed_account_id: "{{body.response.accountId}}"
53
- admin_managed_account_username: "{{body.response.username}}"
54
- assertions:
55
- - "{{body.response.accountType}} == 'standard'"
56
- - "{{body.response.credentialType}} == 'standard'"
57
- - "{{body.response.linkedWorkspaces.count()}} == 0"
58
-
59
- - name: "Root list accounts"
60
- method: "POST"
61
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/list"
62
- request_headers:
63
- - x-api-token: "{$stored.root_admin_token}"
64
- send_as: "json"
65
- body:
66
- begin: 0
67
- count: 10
68
- excludeCaller: true
69
- accountTypes:
70
- - "standard"
71
- expect:
72
- status: 200
73
- body:
74
- errorCode: number
75
- errorCodeStr: string
76
- message: string
77
- totalCount: number
78
- pageCount: number
79
- nextIndex: number
80
- currentIndex: number
81
- response: []
82
-
83
- - name: "Root update managed account"
84
- method: "POST"
85
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/update/{$stored.admin_managed_account_id}"
86
- request_headers:
87
- - x-api-token: "{$stored.root_admin_token}"
88
- send_as: "json"
89
- body:
90
- username: "e2e_admin_updated_{$stored.seed_account_id}"
91
- expect:
92
- status: 200
93
- body:
94
- errorCode: number
95
- errorCodeStr: string
96
- message: string
97
-
98
- - name: "Root set managed account credentials"
99
- method: "POST"
100
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/credentials/{$stored.admin_managed_account_id}"
101
- request_headers:
102
- - x-api-token: "{$stored.root_admin_token}"
103
- send_as: "json"
104
- body:
105
- password: "e2e_admin_pwd_v2"
106
- expect:
107
- status: 200
108
- body:
109
- errorCode: number
110
- errorCodeStr: string
111
- message: string
112
-
113
- - name: "Root set managed account inactive"
114
- method: "POST"
115
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/activationState/{$stored.admin_managed_account_id}?isActive=false"
116
- request_headers:
117
- - x-api-token: "{$stored.root_admin_token}"
118
- expect:
119
- status: 200
120
- body:
121
- errorCode: number
122
- errorCodeStr: string
123
- message: string
124
-
125
- - name: "Root set managed account active"
126
- method: "POST"
127
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/activationState/{$stored.admin_managed_account_id}?isActive=true"
128
- request_headers:
129
- - x-api-token: "{$stored.root_admin_token}"
130
- expect:
131
- status: 200
132
- body:
133
- errorCode: number
134
- errorCodeStr: string
135
- message: string
136
-
137
- - name: "Root add workspace link"
138
- skip_if:
139
- - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
140
- method: "POST"
141
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/link/{$stored.admin_managed_account_id}"
142
- request_headers:
143
- - x-api-token: "{$stored.root_admin_token}"
144
- expect:
145
- status: 200
146
- body:
147
- errorCode: number
148
- errorCodeStr: string
149
- message: string
150
-
151
- - name: "Root remove workspace link"
152
- skip_if:
153
- - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
154
- method: "DELETE"
155
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/link/{$stored.admin_managed_account_id}"
156
- request_headers:
157
- - x-api-token: "{$stored.root_admin_token}"
158
- expect:
159
- status: 200
160
- body:
161
- errorCode: number
162
- errorCodeStr: string
163
- message: string
164
-
165
- - name: "Root create limited admin account"
166
- method: "POST"
167
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=admin"
168
- request_headers:
169
- - x-api-token: "{$stored.root_admin_token}"
170
- send_as: "json"
171
- body:
172
- username: "e2e_limited_admin_{$stored.seed_account_id}"
173
- password: "e2e_limited_admin_pwd_v1"
174
- expect:
175
- status: 200
176
- body:
177
- response:
178
- accountId: string
179
- accountType: string
180
- credentialType: string
181
- save:
182
- limited_admin_account_id: "{{body.response.accountId}}"
183
- assertions:
184
- - "{{body.response.accountType}} == 'admin'"
185
- - "{{body.response.credentialType}} == 'standard'"
186
-
187
- - name: "Login limited admin"
188
- method: "POST"
189
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
190
- send_as: "json"
191
- body:
192
- device: "e2e_test_device"
193
- pseudo: "e2e_limited_admin_{$stored.seed_account_id}"
194
- password: "e2e_limited_admin_pwd_v1"
195
- expect:
196
- status: 200
197
- body:
198
- response:
199
- token: string
200
- save:
201
- limited_admin_token: "{{body.response.token}}"
202
-
203
- - name: "Limited admin cannot access admin list endpoint without projects permission"
204
- method: "POST"
205
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/list"
206
- request_headers:
207
- - x-api-token: "{$stored.limited_admin_token}"
208
- send_as: "json"
209
- body:
210
- begin: 0
211
- count: 10
212
- excludeCaller: true
213
- accountTypes:
214
- - "standard"
215
- expect:
216
- status: 403
217
- body:
218
- errorCode: number
219
- errorCodeStr: string
220
- message: string
221
-
222
- - name: "Limited admin cannot access admin create endpoint without projects permission"
223
- method: "POST"
224
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create"
225
- request_headers:
226
- - x-api-token: "{$stored.limited_admin_token}"
227
- send_as: "json"
228
- body:
229
- username: "e2e_forbidden_{$stored.seed_account_id}"
230
- password: "e2e_forbidden_pwd"
231
- expect:
232
- status: 403
233
- body:
234
- errorCode: number
235
- errorCodeStr: string
236
- message: string
237
-
238
- - name: "Root cannot create another root account via API"
239
- method: "POST"
240
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=root"
241
- request_headers:
242
- - x-api-token: "{$stored.root_admin_token}"
243
- send_as: "json"
244
- body:
245
- username: "e2e_forbidden_root_{$stored.seed_account_id}"
246
- password: "e2e_forbidden_root_pwd"
247
- expect:
248
- status: 400
249
- body:
250
- errorCode: number
251
- errorCodeStr: string
252
- message: string
253
-
254
- - name: "Root account type is excluded from account list results"
255
- method: "POST"
256
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/list"
257
- request_headers:
258
- - x-api-token: "{$stored.root_admin_token}"
259
- send_as: "json"
260
- body:
261
- begin: 0
262
- count: 10
263
- excludeCaller: false
264
- accountTypes:
265
- - "root"
266
- expect:
267
- status: 400
268
- body:
269
- errorCode: number
270
- errorCodeStr: string
271
- message: string
272
-
273
- - name: "Root admin deletes limited admin account"
274
- method: "DELETE"
275
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.limited_admin_account_id}"
276
- request_headers:
277
- - x-api-token: "{$stored.root_admin_token}"
278
- expect:
279
- status: 200
280
- body:
281
- errorCode: number
282
- errorCodeStr: string
283
- message: string
284
-
285
- - name: "Root admin deletes managed account"
286
- method: "DELETE"
287
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.admin_managed_account_id}"
288
- request_headers:
289
- - x-api-token: "{$stored.root_admin_token}"
290
- expect:
291
- status: 200
292
- body:
293
- errorCode: number
294
- errorCodeStr: string
295
- message: string
296
-
297
- - name: "Deleted managed account cannot login"
298
- method: "POST"
299
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
300
- send_as: "json"
301
- body:
302
- device: "e2e_test_device"
303
- pseudo: "e2e_admin_updated_{$stored.seed_account_id}"
304
- password: "e2e_admin_pwd_v2"
305
- expect:
306
- status: 401
307
- body:
308
- errorCode: number
309
- errorCodeStr: string
310
- message: string
1
+ name: "Root Account Endpoints Flow"
2
+ base_url: "http://localhost:$var(API_PUBLIC_PORT)"
3
+ steps:
4
+ - name: "Login root admin"
5
+ retry:
6
+ attempts: 10
7
+ delay_seconds: 5
8
+ method: "POST"
9
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
10
+ send_as: "json"
11
+ body:
12
+ device: "e2e_test_device"
13
+ pseudo: "$var(DEFAULT_USERNAME)"
14
+ password: "$var(DEFAULT_PASSWORD)"
15
+ expect:
16
+ status: 200
17
+ body:
18
+ response:
19
+ accountId: string
20
+ accountType: string
21
+ token: string
22
+ save:
23
+ root_admin_token: "{{body.response.token}}"
24
+ root_admin_account_id: "{{body.response.accountId}}"
25
+ assertions:
26
+ - "{{body.response.accountType}} == 'root'"
27
+
28
+ - name: "Generate unique test suffix"
29
+ randomize:
30
+ seed_account_id: 8
31
+
32
+ - name: "Root create managed standard account"
33
+ method: "POST"
34
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create"
35
+ request_headers:
36
+ - x-api-token: "{$stored.root_admin_token}"
37
+ send_as: "json"
38
+ body:
39
+ username: "e2e_admin_managed_{$stored.seed_account_id}"
40
+ password: "e2e_admin_pwd_v1"
41
+ expect:
42
+ status: 200
43
+ body:
44
+ errorCode: number
45
+ errorCodeStr: string
46
+ message: string
47
+ response:
48
+ accountId: string
49
+ projectId: string
50
+ project: string
51
+ accountType: string
52
+ isActive: boolean
53
+ username: string
54
+ linkedWorkspaces: []
55
+ save:
56
+ admin_managed_account_id: "{{body.response.accountId}}"
57
+ admin_managed_account_username: "{{body.response.username}}"
58
+ assertions:
59
+ - "{{body.response.accountType}} == 'standard'"
60
+ - "{{body.response.linkedWorkspaces.count()}} == 0"
61
+
62
+ - name: "Root list accounts"
63
+ method: "POST"
64
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/list"
65
+ request_headers:
66
+ - x-api-token: "{$stored.root_admin_token}"
67
+ send_as: "json"
68
+ body:
69
+ begin: 0
70
+ count: 10
71
+ excludeCaller: true
72
+ accountTypes:
73
+ - "standard"
74
+ expect:
75
+ status: 200
76
+ body:
77
+ errorCode: number
78
+ errorCodeStr: string
79
+ message: string
80
+ totalCount: number
81
+ pageCount: number
82
+ nextIndex: number
83
+ currentIndex: number
84
+ response: []
85
+
86
+ - name: "Root update managed account"
87
+ method: "POST"
88
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/update/{$stored.admin_managed_account_id}"
89
+ request_headers:
90
+ - x-api-token: "{$stored.root_admin_token}"
91
+ send_as: "json"
92
+ body:
93
+ username: "e2e_admin_updated_{$stored.seed_account_id}"
94
+ expect:
95
+ status: 200
96
+ body:
97
+ errorCode: number
98
+ errorCodeStr: string
99
+ message: string
100
+
101
+ - name: "Root set managed account credentials"
102
+ method: "POST"
103
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/credentials/{$stored.admin_managed_account_id}"
104
+ request_headers:
105
+ - x-api-token: "{$stored.root_admin_token}"
106
+ send_as: "json"
107
+ body:
108
+ password: "e2e_admin_pwd_v2"
109
+ expect:
110
+ status: 200
111
+ body:
112
+ errorCode: number
113
+ errorCodeStr: string
114
+ message: string
115
+
116
+ - name: "Root set managed account inactive"
117
+ method: "POST"
118
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/activationState/{$stored.admin_managed_account_id}?isActive=false"
119
+ request_headers:
120
+ - x-api-token: "{$stored.root_admin_token}"
121
+ expect:
122
+ status: 200
123
+ body:
124
+ errorCode: number
125
+ errorCodeStr: string
126
+ message: string
127
+
128
+ - name: "Root set managed account active"
129
+ method: "POST"
130
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/activationState/{$stored.admin_managed_account_id}?isActive=true"
131
+ request_headers:
132
+ - x-api-token: "{$stored.root_admin_token}"
133
+ expect:
134
+ status: 200
135
+ body:
136
+ errorCode: number
137
+ errorCodeStr: string
138
+ message: string
139
+
140
+ - name: "Root add workspace link"
141
+ skip_if:
142
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
143
+ method: "POST"
144
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/link/{$stored.admin_managed_account_id}"
145
+ request_headers:
146
+ - x-api-token: "{$stored.root_admin_token}"
147
+ expect:
148
+ status: 200
149
+ body:
150
+ errorCode: number
151
+ errorCodeStr: string
152
+ message: string
153
+
154
+ - name: "Root remove workspace link"
155
+ skip_if:
156
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
157
+ method: "DELETE"
158
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/link/{$stored.admin_managed_account_id}"
159
+ request_headers:
160
+ - x-api-token: "{$stored.root_admin_token}"
161
+ expect:
162
+ status: 200
163
+ body:
164
+ errorCode: number
165
+ errorCodeStr: string
166
+ message: string
167
+
168
+ - name: "Root create limited admin account"
169
+ method: "POST"
170
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=admin"
171
+ request_headers:
172
+ - x-api-token: "{$stored.root_admin_token}"
173
+ send_as: "json"
174
+ body:
175
+ username: "e2e_limited_admin_{$stored.seed_account_id}"
176
+ password: "e2e_limited_admin_pwd_v1"
177
+ expect:
178
+ status: 200
179
+ body:
180
+ response:
181
+ accountId: string
182
+ accountType: string
183
+ save:
184
+ limited_admin_account_id: "{{body.response.accountId}}"
185
+ assertions:
186
+ - "{{body.response.accountType}} == 'admin'"
187
+
188
+ - name: "Root create second admin account for permission constraint checks"
189
+ method: "POST"
190
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=admin"
191
+ request_headers:
192
+ - x-api-token: "{$stored.root_admin_token}"
193
+ send_as: "json"
194
+ body:
195
+ username: "e2e_second_admin_{$stored.seed_account_id}"
196
+ password: "e2e_second_admin_pwd_v1"
197
+ expect:
198
+ status: 200
199
+ body:
200
+ response:
201
+ accountId: string
202
+ accountType: string
203
+ save:
204
+ second_admin_account_id: "{{body.response.accountId}}"
205
+ assertions:
206
+ - "{{body.response.accountType}} == 'admin'"
207
+
208
+ - name: "Login limited admin"
209
+ method: "POST"
210
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
211
+ send_as: "json"
212
+ body:
213
+ device: "e2e_test_device"
214
+ pseudo: "e2e_limited_admin_{$stored.seed_account_id}"
215
+ password: "e2e_limited_admin_pwd_v1"
216
+ expect:
217
+ status: 200
218
+ body:
219
+ response:
220
+ token: string
221
+ save:
222
+ limited_admin_token: "{{body.response.token}}"
223
+
224
+ - name: "Limited admin can list accounts using accounts permission alone"
225
+ method: "POST"
226
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/list"
227
+ request_headers:
228
+ - x-api-token: "{$stored.limited_admin_token}"
229
+ send_as: "json"
230
+ body:
231
+ begin: 0
232
+ count: 10
233
+ excludeCaller: true
234
+ accountTypes:
235
+ - "standard"
236
+ expect:
237
+ status: 200
238
+ body:
239
+ errorCode: number
240
+ errorCodeStr: string
241
+ message: string
242
+ totalCount: number
243
+ pageCount: number
244
+ nextIndex: number
245
+ currentIndex: number
246
+ response: []
247
+
248
+ - name: "Limited admin can create standard accounts using accounts permission alone"
249
+ method: "POST"
250
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create"
251
+ request_headers:
252
+ - x-api-token: "{$stored.limited_admin_token}"
253
+ send_as: "json"
254
+ body:
255
+ username: "e2e_by_admin_{$stored.seed_account_id}"
256
+ password: "e2e_by_admin_pwd_v1"
257
+ expect:
258
+ status: 200
259
+ body:
260
+ response:
261
+ accountId: string
262
+ accountType: string
263
+ save:
264
+ account_created_by_limited_admin_id: "{{body.response.accountId}}"
265
+ assertions:
266
+ - "{{body.response.accountType}} == 'standard'"
267
+
268
+ - name: "Admin account cannot create another admin account"
269
+ method: "POST"
270
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=admin"
271
+ request_headers:
272
+ - x-api-token: "{$stored.limited_admin_token}"
273
+ send_as: "json"
274
+ body:
275
+ username: "e2e_admin_forbidden_{$stored.seed_account_id}"
276
+ password: "e2e_admin_forbidden_pwd"
277
+ expect:
278
+ status: 400
279
+ body:
280
+ errorCode: number
281
+ errorCodeStr: string
282
+ message: string
283
+
284
+ - name: "Admin account cannot create a root account"
285
+ method: "POST"
286
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=root"
287
+ request_headers:
288
+ - x-api-token: "{$stored.limited_admin_token}"
289
+ send_as: "json"
290
+ body:
291
+ username: "e2e_root_forbidden_{$stored.seed_account_id}"
292
+ password: "e2e_root_forbidden_pwd"
293
+ expect:
294
+ status: 400
295
+ body:
296
+ errorCode: number
297
+ errorCodeStr: string
298
+ message: string
299
+
300
+ - name: "Root cannot create another root account via API"
301
+ method: "POST"
302
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=root"
303
+ request_headers:
304
+ - x-api-token: "{$stored.root_admin_token}"
305
+ send_as: "json"
306
+ body:
307
+ username: "e2e_forbidden_root_{$stored.seed_account_id}"
308
+ password: "e2e_forbidden_root_pwd"
309
+ expect:
310
+ status: 400
311
+ body:
312
+ errorCode: number
313
+ errorCodeStr: string
314
+ message: string
315
+
316
+ - name: "Root account can create an admin account"
317
+ method: "POST"
318
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=admin"
319
+ request_headers:
320
+ - x-api-token: "{$stored.root_admin_token}"
321
+ send_as: "json"
322
+ body:
323
+ username: "e2e_third_admin_{$stored.seed_account_id}"
324
+ password: "e2e_third_admin_pwd_v1"
325
+ expect:
326
+ status: 200
327
+ body:
328
+ response:
329
+ accountId: string
330
+ accountType: string
331
+ save:
332
+ third_admin_account_id: "{{body.response.accountId}}"
333
+ assertions:
334
+ - "{{body.response.accountType}} == 'admin'"
335
+
336
+ - name: "Root account type is excluded from account list results"
337
+ method: "POST"
338
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/list"
339
+ request_headers:
340
+ - x-api-token: "{$stored.root_admin_token}"
341
+ send_as: "json"
342
+ body:
343
+ begin: 0
344
+ count: 10
345
+ excludeCaller: false
346
+ accountTypes:
347
+ - "root"
348
+ expect:
349
+ status: 400
350
+ body:
351
+ errorCode: number
352
+ errorCodeStr: string
353
+ message: string
354
+
355
+ - name: "Root can set permissions for an admin account"
356
+ method: "POST"
357
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/permission/{$stored.second_admin_account_id}"
358
+ request_headers:
359
+ - x-api-token: "{$stored.root_admin_token}"
360
+ send_as: "json"
361
+ body:
362
+ permissions:
363
+ accounts: "R"
364
+ expect:
365
+ status: 200
366
+ body:
367
+ errorCode: number
368
+ errorCodeStr: string
369
+ message: string
370
+
371
+ - name: "Admin account cannot set permissions for another admin account"
372
+ method: "POST"
373
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/permission/{$stored.second_admin_account_id}"
374
+ request_headers:
375
+ - x-api-token: "{$stored.limited_admin_token}"
376
+ send_as: "json"
377
+ body:
378
+ permissions:
379
+ accounts: "CRUD"
380
+ expect:
381
+ status: 403
382
+ body:
383
+ errorCode: number
384
+ errorCodeStr: string
385
+ message: string
386
+
387
+ - name: "Admin account cannot set permissions for the root account"
388
+ method: "POST"
389
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/permission/{$stored.root_admin_account_id}"
390
+ request_headers:
391
+ - x-api-token: "{$stored.limited_admin_token}"
392
+ send_as: "json"
393
+ body:
394
+ permissions:
395
+ accounts: "CRUD"
396
+ expect:
397
+ status: 403
398
+ body:
399
+ errorCode: number
400
+ errorCodeStr: string
401
+ message: string
402
+
403
+ - name: "Root admin deletes account created by limited admin"
404
+ method: "DELETE"
405
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.account_created_by_limited_admin_id}"
406
+ request_headers:
407
+ - x-api-token: "{$stored.root_admin_token}"
408
+ expect:
409
+ status: 200
410
+ body:
411
+ errorCode: number
412
+ errorCodeStr: string
413
+ message: string
414
+
415
+ - name: "Root admin deletes limited admin account"
416
+ method: "DELETE"
417
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.limited_admin_account_id}"
418
+ request_headers:
419
+ - x-api-token: "{$stored.root_admin_token}"
420
+ expect:
421
+ status: 200
422
+ body:
423
+ errorCode: number
424
+ errorCodeStr: string
425
+ message: string
426
+
427
+ - name: "Root admin deletes second admin account"
428
+ method: "DELETE"
429
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.second_admin_account_id}"
430
+ request_headers:
431
+ - x-api-token: "{$stored.root_admin_token}"
432
+ expect:
433
+ status: 200
434
+ body:
435
+ errorCode: number
436
+ errorCodeStr: string
437
+ message: string
438
+
439
+ - name: "Root admin deletes third admin account"
440
+ method: "DELETE"
441
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.third_admin_account_id}"
442
+ request_headers:
443
+ - x-api-token: "{$stored.root_admin_token}"
444
+ expect:
445
+ status: 200
446
+ body:
447
+ errorCode: number
448
+ errorCodeStr: string
449
+ message: string
450
+
451
+ - name: "Root admin deletes managed account"
452
+ method: "DELETE"
453
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.admin_managed_account_id}"
454
+ request_headers:
455
+ - x-api-token: "{$stored.root_admin_token}"
456
+ expect:
457
+ status: 200
458
+ body:
459
+ errorCode: number
460
+ errorCodeStr: string
461
+ message: string
462
+
463
+ - name: "Deleted managed account cannot login"
464
+ method: "POST"
465
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
466
+ send_as: "json"
467
+ body:
468
+ device: "e2e_test_device"
469
+ pseudo: "e2e_admin_updated_{$stored.seed_account_id}"
470
+ password: "e2e_admin_pwd_v2"
471
+ expect:
472
+ status: 401
473
+ body:
474
+ errorCode: number
475
+ errorCodeStr: string
476
+ message: string
@@ -47,7 +47,6 @@ steps:
47
47
  projectId: string
48
48
  project: string
49
49
  accountType: string
50
- credentialType: string
51
50
  isActive: boolean
52
51
  apiKey: string
53
52
  apiKeyAlias: string
@@ -56,7 +55,6 @@ steps:
56
55
  ws_apikey_value: "{{body.response.apiKey}}"
57
56
  assertions:
58
57
  - "{{body.response.accountType}} == 'api_key'"
59
- - "{{body.response.credentialType}} == 'api_key'"
60
58
  - "{{body.response.apiKeyAlias}} == 'e2e_apikey_workspace_{$stored.seed_account_id}'"
61
59
 
62
60
  - name: "List API keys by workspace"
@@ -102,7 +100,6 @@ steps:
102
100
  projectId: string
103
101
  project: string
104
102
  accountType: string
105
- credentialType: string
106
103
  isActive: boolean
107
104
  apiKey: string
108
105
  apiKeyAlias: string
@@ -129,7 +126,6 @@ steps:
129
126
  projectId: string
130
127
  project: string
131
128
  accountType: string
132
- credentialType: string
133
129
  isActive: boolean
134
130
  apiKey: string
135
131
  apiKeyAlias: string
@@ -138,7 +134,6 @@ steps:
138
134
  project_apikey_value: "{{body.response.apiKey}}"
139
135
  assertions:
140
136
  - "{{body.response.accountType}} == 'api_key'"
141
- - "{{body.response.credentialType}} == 'api_key'"
142
137
  - "{{body.response.apiKeyAlias}} == 'e2e_apikey_project_{$stored.seed_account_id}'"
143
138
 
144
139
  - name: "Update API key"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sefrone_api_e2e
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: A Python package to provide e2e testing helpers for sefrone API projects
5
5
  Home-page: https://bitbucket.org/sefrone/sefrone_pypi
6
6
  Author: Sefrone
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
5
5
 
6
6
  setup(
7
7
  name="sefrone_api_e2e",
8
- version="1.3.1",
8
+ version="1.3.2",
9
9
  author="Sefrone",
10
10
  author_email="contact@sefrone.com",
11
11
  description="A Python package to provide e2e testing helpers for sefrone API projects",