sefrone-api-e2e 1.3.1__tar.gz → 1.3.3__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.3}/PKG-INFO +1 -1
  2. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/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.3}/sefrone_api_e2e/e2e/Scenarios/Auth/2_account_endpoints.yaml +1 -3
  4. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/e2e/Scenarios/Auth/3_admin_account_endpoints.yaml +509 -310
  5. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/e2e/Scenarios/Auth/4_workspace_endpoints.yaml +1 -1
  6. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/e2e/Scenarios/Auth/5_apikey_endpoints.yaml +0 -5
  7. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e.egg-info/PKG-INFO +1 -1
  8. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/setup.py +1 -1
  9. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/README.md +0 -0
  10. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/__init__.py +0 -0
  11. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/api_e2e_manager.py +0 -0
  12. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/e2e/Scenarios/Auth/0_check_features.yaml +0 -0
  13. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/e2e/Scenarios/Auth/6_project_endpoints.yaml +0 -0
  14. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/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.3}/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.3}/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.3}/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.3}/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.3}/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.3}/sefrone_api_e2e/e2e_scenarios_manager.py +0 -0
  21. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/env_patch.py +0 -0
  22. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/json_mock_server.py +0 -0
  23. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/runner_assets.py +0 -0
  24. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/runner_email_mock.py +0 -0
  25. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/runner_rest_api.py +0 -0
  26. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/runner_satim_mock.py +0 -0
  27. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/runner_webhook_mock.py +0 -0
  28. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e/step_runner.py +0 -0
  29. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e.egg-info/SOURCES.txt +0 -0
  30. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e.egg-info/dependency_links.txt +0 -0
  31. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e.egg-info/requires.txt +0 -0
  32. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/sefrone_api_e2e.egg-info/top_level.txt +0 -0
  33. {sefrone_api_e2e-1.3.1 → sefrone_api_e2e-1.3.3}/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.3
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:
@@ -28,7 +28,7 @@ steps:
28
28
  skip_if:
29
29
  - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
30
30
  method: "POST"
31
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/create"
31
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/create?accountType=standard"
32
32
  request_headers:
33
33
  - x-api-token: "{$stored.admin_token}"
34
34
  send_as: "json"
@@ -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,509 @@
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 fetches own target account types"
33
+ method: "POST"
34
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/own/targets"
35
+ request_headers:
36
+ - x-api-token: "{$stored.root_admin_token}"
37
+ expect:
38
+ status: 200
39
+ body:
40
+ errorCode: number
41
+ errorCodeStr: string
42
+ message: string
43
+ response:
44
+ targetAccountTypes: []
45
+ assertions:
46
+ - "{{body.response.targetAccountTypes}} include 'standard'"
47
+ - "{{body.response.targetAccountTypes}} include 'admin'"
48
+
49
+ - name: "Root create managed standard account"
50
+ method: "POST"
51
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=standard"
52
+ request_headers:
53
+ - x-api-token: "{$stored.root_admin_token}"
54
+ send_as: "json"
55
+ body:
56
+ username: "e2e_admin_managed_{$stored.seed_account_id}"
57
+ password: "e2e_admin_pwd_v1"
58
+ expect:
59
+ status: 200
60
+ body:
61
+ errorCode: number
62
+ errorCodeStr: string
63
+ message: string
64
+ response:
65
+ accountId: string
66
+ projectId: string
67
+ project: string
68
+ accountType: string
69
+ isActive: boolean
70
+ username: string
71
+ linkedWorkspaces: []
72
+ save:
73
+ admin_managed_account_id: "{{body.response.accountId}}"
74
+ admin_managed_account_username: "{{body.response.username}}"
75
+ assertions:
76
+ - "{{body.response.accountType}} == 'standard'"
77
+ - "{{body.response.linkedWorkspaces.count()}} == 0"
78
+
79
+ - name: "Root list accounts"
80
+ method: "POST"
81
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/list"
82
+ request_headers:
83
+ - x-api-token: "{$stored.root_admin_token}"
84
+ send_as: "json"
85
+ body:
86
+ begin: 0
87
+ count: 10
88
+ excludeCaller: true
89
+ accountTypes:
90
+ - "standard"
91
+ expect:
92
+ status: 200
93
+ body:
94
+ errorCode: number
95
+ errorCodeStr: string
96
+ message: string
97
+ totalCount: number
98
+ pageCount: number
99
+ nextIndex: number
100
+ currentIndex: number
101
+ response: []
102
+
103
+ - name: "Root update managed account"
104
+ method: "POST"
105
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/update/{$stored.admin_managed_account_id}"
106
+ request_headers:
107
+ - x-api-token: "{$stored.root_admin_token}"
108
+ send_as: "json"
109
+ body:
110
+ username: "e2e_admin_updated_{$stored.seed_account_id}"
111
+ expect:
112
+ status: 200
113
+ body:
114
+ errorCode: number
115
+ errorCodeStr: string
116
+ message: string
117
+
118
+ - name: "Root set managed account credentials"
119
+ method: "POST"
120
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/credentials/{$stored.admin_managed_account_id}"
121
+ request_headers:
122
+ - x-api-token: "{$stored.root_admin_token}"
123
+ send_as: "json"
124
+ body:
125
+ password: "e2e_admin_pwd_v2"
126
+ expect:
127
+ status: 200
128
+ body:
129
+ errorCode: number
130
+ errorCodeStr: string
131
+ message: string
132
+
133
+ - name: "Root set managed account inactive"
134
+ method: "POST"
135
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/activationState/{$stored.admin_managed_account_id}?isActive=false"
136
+ request_headers:
137
+ - x-api-token: "{$stored.root_admin_token}"
138
+ expect:
139
+ status: 200
140
+ body:
141
+ errorCode: number
142
+ errorCodeStr: string
143
+ message: string
144
+
145
+ - name: "Root set managed account active"
146
+ method: "POST"
147
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/activationState/{$stored.admin_managed_account_id}?isActive=true"
148
+ request_headers:
149
+ - x-api-token: "{$stored.root_admin_token}"
150
+ expect:
151
+ status: 200
152
+ body:
153
+ errorCode: number
154
+ errorCodeStr: string
155
+ message: string
156
+
157
+ - name: "Root add workspace link"
158
+ skip_if:
159
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
160
+ method: "POST"
161
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/link/{$stored.admin_managed_account_id}"
162
+ request_headers:
163
+ - x-api-token: "{$stored.root_admin_token}"
164
+ expect:
165
+ status: 200
166
+ body:
167
+ errorCode: number
168
+ errorCodeStr: string
169
+ message: string
170
+
171
+ - name: "Root remove workspace link"
172
+ skip_if:
173
+ - "'$var(DEFAULT_WORKSPACE_NAME)' == ''"
174
+ method: "DELETE"
175
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/$var(DEFAULT_WORKSPACE_NAME)/link/{$stored.admin_managed_account_id}"
176
+ request_headers:
177
+ - x-api-token: "{$stored.root_admin_token}"
178
+ expect:
179
+ status: 200
180
+ body:
181
+ errorCode: number
182
+ errorCodeStr: string
183
+ message: string
184
+
185
+ - name: "Root create limited admin account"
186
+ method: "POST"
187
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=admin"
188
+ request_headers:
189
+ - x-api-token: "{$stored.root_admin_token}"
190
+ send_as: "json"
191
+ body:
192
+ username: "e2e_limited_admin_{$stored.seed_account_id}"
193
+ password: "e2e_limited_admin_pwd_v1"
194
+ expect:
195
+ status: 200
196
+ body:
197
+ response:
198
+ accountId: string
199
+ accountType: string
200
+ save:
201
+ limited_admin_account_id: "{{body.response.accountId}}"
202
+ assertions:
203
+ - "{{body.response.accountType}} == 'admin'"
204
+
205
+ - name: "Root create second admin account for permission constraint checks"
206
+ method: "POST"
207
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=admin"
208
+ request_headers:
209
+ - x-api-token: "{$stored.root_admin_token}"
210
+ send_as: "json"
211
+ body:
212
+ username: "e2e_second_admin_{$stored.seed_account_id}"
213
+ password: "e2e_second_admin_pwd_v1"
214
+ expect:
215
+ status: 200
216
+ body:
217
+ response:
218
+ accountId: string
219
+ accountType: string
220
+ save:
221
+ second_admin_account_id: "{{body.response.accountId}}"
222
+ assertions:
223
+ - "{{body.response.accountType}} == 'admin'"
224
+
225
+ - name: "Login limited admin"
226
+ method: "POST"
227
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
228
+ send_as: "json"
229
+ body:
230
+ device: "e2e_test_device"
231
+ pseudo: "e2e_limited_admin_{$stored.seed_account_id}"
232
+ password: "e2e_limited_admin_pwd_v1"
233
+ expect:
234
+ status: 200
235
+ body:
236
+ response:
237
+ token: string
238
+ save:
239
+ limited_admin_token: "{{body.response.token}}"
240
+
241
+ - name: "Limited admin fetches own target account types"
242
+ method: "POST"
243
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/own/targets"
244
+ request_headers:
245
+ - x-api-token: "{$stored.limited_admin_token}"
246
+ expect:
247
+ status: 200
248
+ body:
249
+ errorCode: number
250
+ errorCodeStr: string
251
+ message: string
252
+ response:
253
+ targetAccountTypes: []
254
+ assertions:
255
+ - "{{body.response.targetAccountTypes}} include 'standard'"
256
+
257
+ - name: "Limited admin can list accounts using accounts permission alone"
258
+ method: "POST"
259
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/list"
260
+ request_headers:
261
+ - x-api-token: "{$stored.limited_admin_token}"
262
+ send_as: "json"
263
+ body:
264
+ begin: 0
265
+ count: 10
266
+ excludeCaller: true
267
+ accountTypes:
268
+ - "standard"
269
+ expect:
270
+ status: 200
271
+ body:
272
+ errorCode: number
273
+ errorCodeStr: string
274
+ message: string
275
+ totalCount: number
276
+ pageCount: number
277
+ nextIndex: number
278
+ currentIndex: number
279
+ response: []
280
+
281
+ - name: "Limited admin can create standard accounts using accounts permission alone"
282
+ method: "POST"
283
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=standard"
284
+ request_headers:
285
+ - x-api-token: "{$stored.limited_admin_token}"
286
+ send_as: "json"
287
+ body:
288
+ username: "e2e_by_admin_{$stored.seed_account_id}"
289
+ password: "e2e_by_admin_pwd_v1"
290
+ expect:
291
+ status: 200
292
+ body:
293
+ response:
294
+ accountId: string
295
+ accountType: string
296
+ save:
297
+ account_created_by_limited_admin_id: "{{body.response.accountId}}"
298
+ assertions:
299
+ - "{{body.response.accountType}} == 'standard'"
300
+
301
+ - name: "Admin account cannot create another admin account"
302
+ method: "POST"
303
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=admin"
304
+ request_headers:
305
+ - x-api-token: "{$stored.limited_admin_token}"
306
+ send_as: "json"
307
+ body:
308
+ username: "e2e_admin_forbidden_{$stored.seed_account_id}"
309
+ password: "e2e_admin_forbidden_pwd"
310
+ expect:
311
+ status: 400
312
+ body:
313
+ errorCode: number
314
+ errorCodeStr: string
315
+ message: string
316
+
317
+ - name: "Admin account cannot create a root account"
318
+ method: "POST"
319
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=root"
320
+ request_headers:
321
+ - x-api-token: "{$stored.limited_admin_token}"
322
+ send_as: "json"
323
+ body:
324
+ username: "e2e_root_forbidden_{$stored.seed_account_id}"
325
+ password: "e2e_root_forbidden_pwd"
326
+ expect:
327
+ status: 400
328
+ body:
329
+ errorCode: number
330
+ errorCodeStr: string
331
+ message: string
332
+
333
+ - name: "Root cannot create another root account via API"
334
+ method: "POST"
335
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=root"
336
+ request_headers:
337
+ - x-api-token: "{$stored.root_admin_token}"
338
+ send_as: "json"
339
+ body:
340
+ username: "e2e_forbidden_root_{$stored.seed_account_id}"
341
+ password: "e2e_forbidden_root_pwd"
342
+ expect:
343
+ status: 400
344
+ body:
345
+ errorCode: number
346
+ errorCodeStr: string
347
+ message: string
348
+
349
+ - name: "Root account can create an admin account"
350
+ method: "POST"
351
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=admin"
352
+ request_headers:
353
+ - x-api-token: "{$stored.root_admin_token}"
354
+ send_as: "json"
355
+ body:
356
+ username: "e2e_third_admin_{$stored.seed_account_id}"
357
+ password: "e2e_third_admin_pwd_v1"
358
+ expect:
359
+ status: 200
360
+ body:
361
+ response:
362
+ accountId: string
363
+ accountType: string
364
+ save:
365
+ third_admin_account_id: "{{body.response.accountId}}"
366
+ assertions:
367
+ - "{{body.response.accountType}} == 'admin'"
368
+
369
+ - name: "Root account type is excluded from account list results"
370
+ method: "POST"
371
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/list"
372
+ request_headers:
373
+ - x-api-token: "{$stored.root_admin_token}"
374
+ send_as: "json"
375
+ body:
376
+ begin: 0
377
+ count: 10
378
+ excludeCaller: false
379
+ accountTypes:
380
+ - "root"
381
+ expect:
382
+ status: 400
383
+ body:
384
+ errorCode: number
385
+ errorCodeStr: string
386
+ message: string
387
+
388
+ - name: "Root can set permissions for an admin account"
389
+ method: "POST"
390
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/permission/{$stored.second_admin_account_id}"
391
+ request_headers:
392
+ - x-api-token: "{$stored.root_admin_token}"
393
+ send_as: "json"
394
+ body:
395
+ permissions:
396
+ accounts: "R"
397
+ expect:
398
+ status: 200
399
+ body:
400
+ errorCode: number
401
+ errorCodeStr: string
402
+ message: string
403
+
404
+ - name: "Admin account cannot set permissions for another admin account"
405
+ method: "POST"
406
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/permission/{$stored.second_admin_account_id}"
407
+ request_headers:
408
+ - x-api-token: "{$stored.limited_admin_token}"
409
+ send_as: "json"
410
+ body:
411
+ permissions:
412
+ accounts: "CRUD"
413
+ expect:
414
+ status: 403
415
+ body:
416
+ errorCode: number
417
+ errorCodeStr: string
418
+ message: string
419
+
420
+ - name: "Admin account cannot set permissions for the root account"
421
+ method: "POST"
422
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/permission/{$stored.root_admin_account_id}"
423
+ request_headers:
424
+ - x-api-token: "{$stored.limited_admin_token}"
425
+ send_as: "json"
426
+ body:
427
+ permissions:
428
+ accounts: "CRUD"
429
+ expect:
430
+ status: 403
431
+ body:
432
+ errorCode: number
433
+ errorCodeStr: string
434
+ message: string
435
+
436
+ - name: "Root admin deletes account created by limited admin"
437
+ method: "DELETE"
438
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.account_created_by_limited_admin_id}"
439
+ request_headers:
440
+ - x-api-token: "{$stored.root_admin_token}"
441
+ expect:
442
+ status: 200
443
+ body:
444
+ errorCode: number
445
+ errorCodeStr: string
446
+ message: string
447
+
448
+ - name: "Root admin deletes limited admin account"
449
+ method: "DELETE"
450
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.limited_admin_account_id}"
451
+ request_headers:
452
+ - x-api-token: "{$stored.root_admin_token}"
453
+ expect:
454
+ status: 200
455
+ body:
456
+ errorCode: number
457
+ errorCodeStr: string
458
+ message: string
459
+
460
+ - name: "Root admin deletes second admin account"
461
+ method: "DELETE"
462
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.second_admin_account_id}"
463
+ request_headers:
464
+ - x-api-token: "{$stored.root_admin_token}"
465
+ expect:
466
+ status: 200
467
+ body:
468
+ errorCode: number
469
+ errorCodeStr: string
470
+ message: string
471
+
472
+ - name: "Root admin deletes third admin account"
473
+ method: "DELETE"
474
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.third_admin_account_id}"
475
+ request_headers:
476
+ - x-api-token: "{$stored.root_admin_token}"
477
+ expect:
478
+ status: 200
479
+ body:
480
+ errorCode: number
481
+ errorCodeStr: string
482
+ message: string
483
+
484
+ - name: "Root admin deletes managed account"
485
+ method: "DELETE"
486
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.admin_managed_account_id}"
487
+ request_headers:
488
+ - x-api-token: "{$stored.root_admin_token}"
489
+ expect:
490
+ status: 200
491
+ body:
492
+ errorCode: number
493
+ errorCodeStr: string
494
+ message: string
495
+
496
+ - name: "Deleted managed account cannot login"
497
+ method: "POST"
498
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
499
+ send_as: "json"
500
+ body:
501
+ device: "e2e_test_device"
502
+ pseudo: "e2e_admin_updated_{$stored.seed_account_id}"
503
+ password: "e2e_admin_pwd_v2"
504
+ expect:
505
+ status: 401
506
+ body:
507
+ errorCode: number
508
+ errorCodeStr: string
509
+ message: string
@@ -179,7 +179,7 @@ steps:
179
179
 
180
180
  - name: "Register standard test account"
181
181
  method: "POST"
182
- endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create"
182
+ endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=standard"
183
183
  request_headers:
184
184
  - x-api-token: "{$stored.admin_token}"
185
185
  send_as: "json"
@@ -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.3
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.3",
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",