sefrone-api-e2e 1.4.0__tar.gz → 1.4.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.
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/PKG-INFO +1 -1
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Auth/1_normal_auth_flow.yaml +50 -6
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Auth/2_account_endpoints.yaml +202 -170
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Auth/3_admin_account_endpoints.yaml +54 -4
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Auth/4_workspace_endpoints.yaml +1 -1
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Auth/5_apikey_endpoints.yaml +105 -15
- sefrone_api_e2e-1.4.2/sefrone_api_e2e/e2e/Scenarios/Auth/9a_email_identity_and_linked_projects_flow.yaml +236 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e.egg-info/PKG-INFO +1 -1
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e.egg-info/SOURCES.txt +1 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/setup.py +1 -1
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/README.md +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/__init__.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/api_e2e_manager.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Auth/0_check_features.yaml +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Auth/6_project_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Auth/7_email_2fa_flow.yaml +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Auth/8_temporary_passwords_flow.yaml +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Auth/9_project_account_access_control_flow.yaml +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Oidc/1_relying_party_admin.yaml +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Oidc/2_authorization_code_flow.yaml +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Oidc/3_disable_propagation_flow.yaml +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e/Scenarios/Oidc/4_multi_project_isolation.yaml +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/e2e_scenarios_manager.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/env_patch.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/json_mock_server.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/runner_assets.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/runner_csv.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/runner_email_mock.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/runner_excel.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/runner_mysql.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/runner_postgresql.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/runner_rest_api.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/runner_satim_mock.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/runner_webhook_mock.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e/step_runner.py +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e.egg-info/dependency_links.txt +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e.egg-info/requires.txt +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e.egg-info/top_level.txt +0 -0
- {sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/setup.cfg +0 -0
|
@@ -17,13 +17,57 @@ steps:
|
|
|
17
17
|
body:
|
|
18
18
|
response:
|
|
19
19
|
token: string
|
|
20
|
+
projectId: string
|
|
21
|
+
tokenExpiryDate: datetime
|
|
20
22
|
save:
|
|
21
23
|
login_token: "{{body.response.token}}"
|
|
24
|
+
login_project_id: "{{body.response.projectId}}"
|
|
25
|
+
login_token_expiry: "{{body.response.tokenExpiryDate}}"
|
|
26
|
+
|
|
27
|
+
- name: "Extend token expiry"
|
|
28
|
+
method: "POST"
|
|
29
|
+
endpoint: "/api/v1/apiAuth/token/extend"
|
|
30
|
+
request_headers:
|
|
31
|
+
- x-api-token: "{$stored.login_token}"
|
|
32
|
+
expect:
|
|
33
|
+
status: 200
|
|
34
|
+
body:
|
|
35
|
+
errorCode: number
|
|
36
|
+
errorCodeStr: string
|
|
37
|
+
message: string
|
|
38
|
+
response:
|
|
39
|
+
id: string
|
|
40
|
+
accountId: string
|
|
41
|
+
token: string
|
|
42
|
+
expiryDate: datetime
|
|
43
|
+
device: string
|
|
44
|
+
assertions:
|
|
45
|
+
- "{{body.response.token}} == '{$stored.login_token}'"
|
|
46
|
+
- "{{body.response.expiryDate}} > '{$stored.login_token_expiry}'"
|
|
22
47
|
|
|
23
48
|
- name: "Generate unique test suffix"
|
|
24
49
|
randomize:
|
|
25
50
|
seed_id: 8
|
|
26
51
|
|
|
52
|
+
- name: "Create a workspace for this flow"
|
|
53
|
+
skip_if:
|
|
54
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
55
|
+
method: "POST"
|
|
56
|
+
endpoint: "/api/v1/apiAuth/workspace"
|
|
57
|
+
request_headers:
|
|
58
|
+
- x-api-token: "{$stored.login_token}"
|
|
59
|
+
send_as: "json"
|
|
60
|
+
body:
|
|
61
|
+
name: "e2e_auth_ws_{$stored.seed_id}"
|
|
62
|
+
description: "E2E auth flow workspace"
|
|
63
|
+
projectId: "{$stored.login_project_id}"
|
|
64
|
+
expect:
|
|
65
|
+
status: 200
|
|
66
|
+
body:
|
|
67
|
+
errorCode: number
|
|
68
|
+
errorCodeStr: string
|
|
69
|
+
message: string
|
|
70
|
+
|
|
27
71
|
- name: "Get user info"
|
|
28
72
|
method: "GET"
|
|
29
73
|
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/info/{$stored.login_token}"
|
|
@@ -125,9 +169,9 @@ steps:
|
|
|
125
169
|
- name: "Create guest account for workspace"
|
|
126
170
|
skip_if:
|
|
127
171
|
- "GuestAccount not in {$stored.0_check_features.enabled_features}"
|
|
128
|
-
- "
|
|
172
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
129
173
|
method: "POST"
|
|
130
|
-
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace
|
|
174
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_auth_ws_{$stored.seed_id}/guest"
|
|
131
175
|
expect:
|
|
132
176
|
status: 200
|
|
133
177
|
body:
|
|
@@ -153,14 +197,14 @@ steps:
|
|
|
153
197
|
assertions:
|
|
154
198
|
- "{{body.response.accountType}} == 'guest'"
|
|
155
199
|
- "{{body.response.linkedWorkspaces.count()}} == 1"
|
|
156
|
-
- "{{body.response.linkedWorkspaces[0].workspaceName}} == '$
|
|
200
|
+
- "{{body.response.linkedWorkspaces[0].workspaceName}} == 'e2e_auth_ws_{$stored.seed_id}'"
|
|
157
201
|
|
|
158
202
|
- name: "Get same workspace guest account with existing token"
|
|
159
203
|
skip_if:
|
|
160
204
|
- "GuestAccount not in {$stored.0_check_features.enabled_features}"
|
|
161
|
-
- "
|
|
205
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
162
206
|
method: "POST"
|
|
163
|
-
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace
|
|
207
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_auth_ws_{$stored.seed_id}/guest"
|
|
164
208
|
request_headers:
|
|
165
209
|
- x-api-token: "{$stored.workspace_guest_token}"
|
|
166
210
|
expect:
|
|
@@ -186,7 +230,7 @@ steps:
|
|
|
186
230
|
- "{{body.response.accountId}} == '{$stored.workspace_guest_account_id}'"
|
|
187
231
|
- "{{body.response.token}} == '{$stored.workspace_guest_token}'"
|
|
188
232
|
- "{{body.response.linkedWorkspaces.count()}} == 1"
|
|
189
|
-
- "{{body.response.linkedWorkspaces[0].workspaceName}} == '$
|
|
233
|
+
- "{{body.response.linkedWorkspaces[0].workspaceName}} == 'e2e_auth_ws_{$stored.seed_id}'"
|
|
190
234
|
|
|
191
235
|
- name: "Login with wrong password"
|
|
192
236
|
method: "POST"
|
|
@@ -1,170 +1,202 @@
|
|
|
1
|
-
name: "Account Endpoints Flow"
|
|
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
|
-
- name: "
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
method: "
|
|
145
|
-
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
1
|
+
name: "Account Endpoints Flow"
|
|
2
|
+
skip_if:
|
|
3
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
4
|
+
base_url: "http://localhost:$var(API_PUBLIC_PORT)"
|
|
5
|
+
steps:
|
|
6
|
+
- name: "Login admin user"
|
|
7
|
+
retry:
|
|
8
|
+
attempts: 10
|
|
9
|
+
delay_seconds: 5
|
|
10
|
+
method: "POST"
|
|
11
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
12
|
+
send_as: "json"
|
|
13
|
+
body:
|
|
14
|
+
device: "e2e_test_device"
|
|
15
|
+
pseudo: "$var(DEFAULT_USERNAME)"
|
|
16
|
+
password: "$var(DEFAULT_PASSWORD)"
|
|
17
|
+
expect:
|
|
18
|
+
status: 200
|
|
19
|
+
body:
|
|
20
|
+
response:
|
|
21
|
+
token: string
|
|
22
|
+
projectId: string
|
|
23
|
+
save:
|
|
24
|
+
admin_token: "{{body.response.token}}"
|
|
25
|
+
admin_project_id: "{{body.response.projectId}}"
|
|
26
|
+
|
|
27
|
+
- name: "Generate unique test suffix"
|
|
28
|
+
randomize:
|
|
29
|
+
guest_seed_account_id: 8
|
|
30
|
+
|
|
31
|
+
- name: "Create a workspace for this flow"
|
|
32
|
+
method: "POST"
|
|
33
|
+
endpoint: "/api/v1/apiAuth/workspace"
|
|
34
|
+
request_headers:
|
|
35
|
+
- x-api-token: "{$stored.admin_token}"
|
|
36
|
+
send_as: "json"
|
|
37
|
+
body:
|
|
38
|
+
name: "e2e_account_ws_{$stored.guest_seed_account_id}"
|
|
39
|
+
description: "E2E account endpoints workspace"
|
|
40
|
+
projectId: "{$stored.admin_project_id}"
|
|
41
|
+
expect:
|
|
42
|
+
status: 200
|
|
43
|
+
body:
|
|
44
|
+
errorCode: number
|
|
45
|
+
errorCodeStr: string
|
|
46
|
+
message: string
|
|
47
|
+
|
|
48
|
+
- name: "Get created workspace id"
|
|
49
|
+
method: "GET"
|
|
50
|
+
endpoint: "/api/v1/apiAuth/workspace/$var(AUTH_PROJECT_NAME)/e2e_account_ws_{$stored.guest_seed_account_id}"
|
|
51
|
+
request_headers:
|
|
52
|
+
- x-api-token: "{$stored.admin_token}"
|
|
53
|
+
expect:
|
|
54
|
+
status: 200
|
|
55
|
+
body:
|
|
56
|
+
response:
|
|
57
|
+
id: string
|
|
58
|
+
save:
|
|
59
|
+
flow_workspace_id: "{{body.response.id}}"
|
|
60
|
+
|
|
61
|
+
- name: "Create account by workspace"
|
|
62
|
+
method: "POST"
|
|
63
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_account_ws_{$stored.guest_seed_account_id}/create?accountType=standard"
|
|
64
|
+
request_headers:
|
|
65
|
+
- x-api-token: "{$stored.admin_token}"
|
|
66
|
+
send_as: "json"
|
|
67
|
+
body:
|
|
68
|
+
username: "e2e_account_{$stored.guest_seed_account_id}"
|
|
69
|
+
password: "e2e_account_pwd_v1"
|
|
70
|
+
expect:
|
|
71
|
+
status: 200
|
|
72
|
+
body:
|
|
73
|
+
errorCode: number
|
|
74
|
+
errorCodeStr: string
|
|
75
|
+
message: string
|
|
76
|
+
response:
|
|
77
|
+
accountId: string
|
|
78
|
+
projectId: string
|
|
79
|
+
project: string
|
|
80
|
+
accountType: string
|
|
81
|
+
isActive: boolean
|
|
82
|
+
username: string
|
|
83
|
+
linkedWorkspaces:
|
|
84
|
+
- workspaceId: string
|
|
85
|
+
workspaceName: string
|
|
86
|
+
workspaceDescription: string
|
|
87
|
+
save:
|
|
88
|
+
managed_account_id: "{{body.response.accountId}}"
|
|
89
|
+
managed_account_username: "{{body.response.username}}"
|
|
90
|
+
assertions:
|
|
91
|
+
- "{{body.response.accountType}} == 'standard'"
|
|
92
|
+
- "{{body.response.isActive}} == True"
|
|
93
|
+
- "{{body.response.linkedWorkspaces.count()}} == 1"
|
|
94
|
+
- "{{body.response.linkedWorkspaces[0].workspaceName}} == 'e2e_account_ws_{$stored.guest_seed_account_id}'"
|
|
95
|
+
|
|
96
|
+
- name: "Get created account permissions"
|
|
97
|
+
method: "GET"
|
|
98
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/permission/{$stored.managed_account_id}"
|
|
99
|
+
request_headers:
|
|
100
|
+
- x-api-token: "{$stored.admin_token}"
|
|
101
|
+
expect:
|
|
102
|
+
status: 200
|
|
103
|
+
body:
|
|
104
|
+
errorCode: number
|
|
105
|
+
errorCodeStr: string
|
|
106
|
+
message: string
|
|
107
|
+
response:
|
|
108
|
+
accountId: string
|
|
109
|
+
projectId: string
|
|
110
|
+
assertions:
|
|
111
|
+
- "{{body.response.accountId}} == '{$stored.managed_account_id}'"
|
|
112
|
+
|
|
113
|
+
- name: "Update created account by workspace"
|
|
114
|
+
method: "POST"
|
|
115
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_account_ws_{$stored.guest_seed_account_id}/update/{$stored.managed_account_id}"
|
|
116
|
+
request_headers:
|
|
117
|
+
- x-api-token: "{$stored.admin_token}"
|
|
118
|
+
send_as: "json"
|
|
119
|
+
body:
|
|
120
|
+
username: "e2e_updated_{$stored.guest_seed_account_id}"
|
|
121
|
+
expect:
|
|
122
|
+
status: 200
|
|
123
|
+
body:
|
|
124
|
+
errorCode: number
|
|
125
|
+
errorCodeStr: string
|
|
126
|
+
message: string
|
|
127
|
+
|
|
128
|
+
- name: "Set created account credentials by workspace"
|
|
129
|
+
method: "POST"
|
|
130
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_account_ws_{$stored.guest_seed_account_id}/credentials/{$stored.managed_account_id}"
|
|
131
|
+
request_headers:
|
|
132
|
+
- x-api-token: "{$stored.admin_token}"
|
|
133
|
+
send_as: "json"
|
|
134
|
+
body:
|
|
135
|
+
password: "e2e_account_pwd_v2"
|
|
136
|
+
expect:
|
|
137
|
+
status: 200
|
|
138
|
+
body:
|
|
139
|
+
errorCode: number
|
|
140
|
+
errorCodeStr: string
|
|
141
|
+
message: string
|
|
142
|
+
|
|
143
|
+
- name: "Login updated account with new credentials"
|
|
144
|
+
method: "POST"
|
|
145
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
146
|
+
send_as: "json"
|
|
147
|
+
body:
|
|
148
|
+
device: "e2e_test_device"
|
|
149
|
+
pseudo: "e2e_updated_{$stored.guest_seed_account_id}"
|
|
150
|
+
password: "e2e_account_pwd_v2"
|
|
151
|
+
expect:
|
|
152
|
+
status: 200
|
|
153
|
+
body:
|
|
154
|
+
errorCode: number
|
|
155
|
+
errorCodeStr: string
|
|
156
|
+
message: string
|
|
157
|
+
response:
|
|
158
|
+
accountId: string
|
|
159
|
+
token: string
|
|
160
|
+
save:
|
|
161
|
+
managed_account_token: "{{body.response.token}}"
|
|
162
|
+
assertions:
|
|
163
|
+
- "{{body.response.accountId}} == '{$stored.managed_account_id}'"
|
|
164
|
+
|
|
165
|
+
- name: "Delete created account by workspace"
|
|
166
|
+
method: "DELETE"
|
|
167
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_account_ws_{$stored.guest_seed_account_id}/delete/{$stored.managed_account_id}"
|
|
168
|
+
request_headers:
|
|
169
|
+
- x-api-token: "{$stored.admin_token}"
|
|
170
|
+
expect:
|
|
171
|
+
status: 200
|
|
172
|
+
body:
|
|
173
|
+
errorCode: number
|
|
174
|
+
errorCodeStr: string
|
|
175
|
+
message: string
|
|
176
|
+
|
|
177
|
+
- name: "Login should fail for deleted account"
|
|
178
|
+
method: "POST"
|
|
179
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
180
|
+
send_as: "json"
|
|
181
|
+
body:
|
|
182
|
+
device: "e2e_test_device"
|
|
183
|
+
pseudo: "e2e_updated_{$stored.guest_seed_account_id}"
|
|
184
|
+
password: "e2e_account_pwd_v2"
|
|
185
|
+
expect:
|
|
186
|
+
status: 401
|
|
187
|
+
body:
|
|
188
|
+
errorCode: number
|
|
189
|
+
errorCodeStr: string
|
|
190
|
+
message: string
|
|
191
|
+
|
|
192
|
+
- name: "Cleanup: Delete the workspace created for this flow"
|
|
193
|
+
method: "DELETE"
|
|
194
|
+
endpoint: "/api/v1/apiAuth/workspace/{$stored.flow_workspace_id}"
|
|
195
|
+
request_headers:
|
|
196
|
+
- x-api-token: "{$stored.admin_token}"
|
|
197
|
+
expect:
|
|
198
|
+
status: 200
|
|
199
|
+
body:
|
|
200
|
+
errorCode: number
|
|
201
|
+
errorCodeStr: string
|
|
202
|
+
message: string
|
|
@@ -19,9 +19,11 @@ steps:
|
|
|
19
19
|
accountId: string
|
|
20
20
|
accountType: string
|
|
21
21
|
token: string
|
|
22
|
+
projectId: string
|
|
22
23
|
save:
|
|
23
24
|
root_admin_token: "{{body.response.token}}"
|
|
24
25
|
root_admin_account_id: "{{body.response.accountId}}"
|
|
26
|
+
root_admin_project_id: "{{body.response.projectId}}"
|
|
25
27
|
assertions:
|
|
26
28
|
- "{{body.response.accountType}} == 'root'"
|
|
27
29
|
|
|
@@ -154,11 +156,45 @@ steps:
|
|
|
154
156
|
errorCodeStr: string
|
|
155
157
|
message: string
|
|
156
158
|
|
|
159
|
+
- name: "Create a workspace for this flow"
|
|
160
|
+
skip_if:
|
|
161
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
162
|
+
method: "POST"
|
|
163
|
+
endpoint: "/api/v1/apiAuth/workspace"
|
|
164
|
+
request_headers:
|
|
165
|
+
- x-api-token: "{$stored.root_admin_token}"
|
|
166
|
+
send_as: "json"
|
|
167
|
+
body:
|
|
168
|
+
name: "e2e_admin_ws_{$stored.seed_account_id}"
|
|
169
|
+
description: "E2E admin account endpoints workspace"
|
|
170
|
+
projectId: "{$stored.root_admin_project_id}"
|
|
171
|
+
expect:
|
|
172
|
+
status: 200
|
|
173
|
+
body:
|
|
174
|
+
errorCode: number
|
|
175
|
+
errorCodeStr: string
|
|
176
|
+
message: string
|
|
177
|
+
|
|
178
|
+
- name: "Get created workspace id"
|
|
179
|
+
skip_if:
|
|
180
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
181
|
+
method: "GET"
|
|
182
|
+
endpoint: "/api/v1/apiAuth/workspace/$var(AUTH_PROJECT_NAME)/e2e_admin_ws_{$stored.seed_account_id}"
|
|
183
|
+
request_headers:
|
|
184
|
+
- x-api-token: "{$stored.root_admin_token}"
|
|
185
|
+
expect:
|
|
186
|
+
status: 200
|
|
187
|
+
body:
|
|
188
|
+
response:
|
|
189
|
+
id: string
|
|
190
|
+
save:
|
|
191
|
+
flow_workspace_id: "{{body.response.id}}"
|
|
192
|
+
|
|
157
193
|
- name: "Root add workspace link"
|
|
158
194
|
skip_if:
|
|
159
|
-
- "
|
|
195
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
160
196
|
method: "POST"
|
|
161
|
-
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace
|
|
197
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_admin_ws_{$stored.seed_account_id}/link/{$stored.admin_managed_account_id}"
|
|
162
198
|
request_headers:
|
|
163
199
|
- x-api-token: "{$stored.root_admin_token}"
|
|
164
200
|
expect:
|
|
@@ -170,9 +206,9 @@ steps:
|
|
|
170
206
|
|
|
171
207
|
- name: "Root remove workspace link"
|
|
172
208
|
skip_if:
|
|
173
|
-
- "
|
|
209
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
174
210
|
method: "DELETE"
|
|
175
|
-
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace
|
|
211
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_admin_ws_{$stored.seed_account_id}/link/{$stored.admin_managed_account_id}"
|
|
176
212
|
request_headers:
|
|
177
213
|
- x-api-token: "{$stored.root_admin_token}"
|
|
178
214
|
expect:
|
|
@@ -635,3 +671,17 @@ steps:
|
|
|
635
671
|
errorCode: number
|
|
636
672
|
errorCodeStr: string
|
|
637
673
|
message: string
|
|
674
|
+
|
|
675
|
+
- name: "Cleanup: Delete the workspace created for this flow"
|
|
676
|
+
skip_if:
|
|
677
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
678
|
+
method: "DELETE"
|
|
679
|
+
endpoint: "/api/v1/apiAuth/workspace/{$stored.flow_workspace_id}"
|
|
680
|
+
request_headers:
|
|
681
|
+
- x-api-token: "{$stored.root_admin_token}"
|
|
682
|
+
expect:
|
|
683
|
+
status: 200
|
|
684
|
+
body:
|
|
685
|
+
errorCode: number
|
|
686
|
+
errorCodeStr: string
|
|
687
|
+
message: string
|
|
@@ -220,7 +220,7 @@ steps:
|
|
|
220
220
|
|
|
221
221
|
- name: "Standard account cannot get workspace without projects permission"
|
|
222
222
|
method: "GET"
|
|
223
|
-
endpoint: "/api/v1/apiAuth/workspace/$var(AUTH_PROJECT_NAME)
|
|
223
|
+
endpoint: "/api/v1/apiAuth/workspace/$var(AUTH_PROJECT_NAME)/e2e_workspace_updated_{$stored.seed_account_id}"
|
|
224
224
|
request_headers:
|
|
225
225
|
- x-api-token: "{$stored.std_token}"
|
|
226
226
|
expect:
|
|
@@ -19,18 +19,88 @@ steps:
|
|
|
19
19
|
body:
|
|
20
20
|
response:
|
|
21
21
|
token: string
|
|
22
|
+
accountId: string
|
|
23
|
+
projectId: string
|
|
22
24
|
save:
|
|
23
25
|
admin_token: "{{body.response.token}}"
|
|
26
|
+
admin_account_id: "{{body.response.accountId}}"
|
|
27
|
+
admin_project_id: "{{body.response.projectId}}"
|
|
24
28
|
|
|
25
29
|
- name: "Generate unique test suffix"
|
|
26
30
|
randomize:
|
|
27
31
|
seed_account_id: 8
|
|
28
32
|
|
|
33
|
+
- name: "Create a workspace for this flow"
|
|
34
|
+
skip_if:
|
|
35
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
36
|
+
method: "POST"
|
|
37
|
+
endpoint: "/api/v1/apiAuth/workspace"
|
|
38
|
+
request_headers:
|
|
39
|
+
- x-api-token: "{$stored.admin_token}"
|
|
40
|
+
send_as: "json"
|
|
41
|
+
body:
|
|
42
|
+
name: "e2e_apikey_ws_{$stored.seed_account_id}"
|
|
43
|
+
description: "E2E API key endpoints workspace"
|
|
44
|
+
projectId: "{$stored.admin_project_id}"
|
|
45
|
+
expect:
|
|
46
|
+
status: 200
|
|
47
|
+
body:
|
|
48
|
+
errorCode: number
|
|
49
|
+
errorCodeStr: string
|
|
50
|
+
message: string
|
|
51
|
+
|
|
52
|
+
- name: "Get created workspace id"
|
|
53
|
+
skip_if:
|
|
54
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
55
|
+
method: "GET"
|
|
56
|
+
endpoint: "/api/v1/apiAuth/workspace/$var(AUTH_PROJECT_NAME)/e2e_apikey_ws_{$stored.seed_account_id}"
|
|
57
|
+
request_headers:
|
|
58
|
+
- x-api-token: "{$stored.admin_token}"
|
|
59
|
+
expect:
|
|
60
|
+
status: 200
|
|
61
|
+
body:
|
|
62
|
+
response:
|
|
63
|
+
id: string
|
|
64
|
+
save:
|
|
65
|
+
flow_workspace_id: "{{body.response.id}}"
|
|
66
|
+
|
|
67
|
+
# Creating workspace-scoped resources is allowed for root regardless of workspace links, but
|
|
68
|
+
# listing them (ValidateWorkspaceLink) is not - root must actually be linked to the workspace it
|
|
69
|
+
# just created, and the existing admin_token's cached metadata won't reflect a link added after
|
|
70
|
+
# the fact, so a fresh login is required to pick it up.
|
|
71
|
+
- name: "Link admin account to the created workspace"
|
|
72
|
+
skip_if:
|
|
73
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
74
|
+
method: "POST"
|
|
75
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_apikey_ws_{$stored.seed_account_id}/link/{$stored.admin_account_id}"
|
|
76
|
+
request_headers:
|
|
77
|
+
- x-api-token: "{$stored.admin_token}"
|
|
78
|
+
expect:
|
|
79
|
+
status: 200
|
|
80
|
+
|
|
81
|
+
- name: "Re-login root admin to refresh workspace metadata"
|
|
82
|
+
skip_if:
|
|
83
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
84
|
+
method: "POST"
|
|
85
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
86
|
+
send_as: "json"
|
|
87
|
+
body:
|
|
88
|
+
device: "e2e_test_device"
|
|
89
|
+
pseudo: "$var(DEFAULT_USERNAME)"
|
|
90
|
+
password: "$var(DEFAULT_PASSWORD)"
|
|
91
|
+
expect:
|
|
92
|
+
status: 200
|
|
93
|
+
body:
|
|
94
|
+
response:
|
|
95
|
+
token: string
|
|
96
|
+
save:
|
|
97
|
+
admin_token: "{{body.response.token}}"
|
|
98
|
+
|
|
29
99
|
- name: "Create API key at workspace level"
|
|
30
100
|
skip_if:
|
|
31
|
-
- "
|
|
101
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
32
102
|
method: "POST"
|
|
33
|
-
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/workspace
|
|
103
|
+
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/workspace/e2e_apikey_ws_{$stored.seed_account_id}/create"
|
|
34
104
|
request_headers:
|
|
35
105
|
- x-api-token: "{$stored.admin_token}"
|
|
36
106
|
send_as: "json"
|
|
@@ -59,9 +129,9 @@ steps:
|
|
|
59
129
|
|
|
60
130
|
- name: "List API keys by workspace"
|
|
61
131
|
skip_if:
|
|
62
|
-
- "
|
|
132
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
63
133
|
method: "GET"
|
|
64
|
-
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/workspace
|
|
134
|
+
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/workspace/e2e_apikey_ws_{$stored.seed_account_id}/list?begin=0&count=10"
|
|
65
135
|
request_headers:
|
|
66
136
|
- x-api-token: "{$stored.admin_token}"
|
|
67
137
|
expect:
|
|
@@ -84,7 +154,7 @@ steps:
|
|
|
84
154
|
|
|
85
155
|
- name: "Get API key details"
|
|
86
156
|
skip_if:
|
|
87
|
-
- "
|
|
157
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
88
158
|
method: "GET"
|
|
89
159
|
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/info/{$stored.ws_apikey_value}"
|
|
90
160
|
request_headers:
|
|
@@ -200,9 +270,9 @@ steps:
|
|
|
200
270
|
|
|
201
271
|
- name: "Limited admin cannot list API keys without PermApiKeys"
|
|
202
272
|
skip_if:
|
|
203
|
-
- "
|
|
273
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
204
274
|
method: "GET"
|
|
205
|
-
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/workspace
|
|
275
|
+
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/workspace/e2e_apikey_ws_{$stored.seed_account_id}/list?begin=0&count=10"
|
|
206
276
|
request_headers:
|
|
207
277
|
- x-api-token: "{$stored.limited_admin_token}"
|
|
208
278
|
expect:
|
|
@@ -210,9 +280,9 @@ steps:
|
|
|
210
280
|
|
|
211
281
|
- name: "Limited admin cannot create API key without PermApiKeys"
|
|
212
282
|
skip_if:
|
|
213
|
-
- "
|
|
283
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
214
284
|
method: "POST"
|
|
215
|
-
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/workspace
|
|
285
|
+
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/workspace/e2e_apikey_ws_{$stored.seed_account_id}/create"
|
|
216
286
|
request_headers:
|
|
217
287
|
- x-api-token: "{$stored.limited_admin_token}"
|
|
218
288
|
send_as: "json"
|
|
@@ -223,7 +293,7 @@ steps:
|
|
|
223
293
|
|
|
224
294
|
- name: "Limited admin cannot get API key info without PermApiKeys"
|
|
225
295
|
skip_if:
|
|
226
|
-
- "
|
|
296
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
227
297
|
method: "GET"
|
|
228
298
|
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/info/{$stored.ws_apikey_value}"
|
|
229
299
|
request_headers:
|
|
@@ -268,9 +338,9 @@ steps:
|
|
|
268
338
|
|
|
269
339
|
- name: "link limited admin to test workspace"
|
|
270
340
|
skip_if:
|
|
271
|
-
- "
|
|
341
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
272
342
|
method: "POST"
|
|
273
|
-
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace
|
|
343
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_apikey_ws_{$stored.seed_account_id}/link/{$stored.limited_admin_id}"
|
|
274
344
|
request_headers:
|
|
275
345
|
- x-api-token: "{$stored.admin_token}"
|
|
276
346
|
expect:
|
|
@@ -294,9 +364,9 @@ steps:
|
|
|
294
364
|
|
|
295
365
|
- name: "Limited admin can list API keys by workspace with PermApiKeys"
|
|
296
366
|
skip_if:
|
|
297
|
-
- "
|
|
367
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
298
368
|
method: "GET"
|
|
299
|
-
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/workspace
|
|
369
|
+
endpoint: "/api/v1/apiAuth/apiKey/$var(AUTH_PROJECT_NAME)/workspace/e2e_apikey_ws_{$stored.seed_account_id}/list?begin=0&count=10"
|
|
300
370
|
request_headers:
|
|
301
371
|
- x-api-token: "{$stored.limited_admin_token}"
|
|
302
372
|
expect:
|
|
@@ -354,7 +424,7 @@ steps:
|
|
|
354
424
|
|
|
355
425
|
- name: "Cleanup: Delete workspace API key account"
|
|
356
426
|
skip_if:
|
|
357
|
-
- "
|
|
427
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
358
428
|
method: "DELETE"
|
|
359
429
|
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/delete/{$stored.ws_apikey_account_id}"
|
|
360
430
|
request_headers:
|
|
@@ -377,3 +447,23 @@ steps:
|
|
|
377
447
|
- x-api-token: "{$stored.admin_token}"
|
|
378
448
|
expect:
|
|
379
449
|
status: 200
|
|
450
|
+
|
|
451
|
+
- name: "Cleanup: Unlink admin account from the workspace created for this flow"
|
|
452
|
+
skip_if:
|
|
453
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
454
|
+
method: "DELETE"
|
|
455
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/workspace/e2e_apikey_ws_{$stored.seed_account_id}/link/{$stored.admin_account_id}"
|
|
456
|
+
request_headers:
|
|
457
|
+
- x-api-token: "{$stored.admin_token}"
|
|
458
|
+
expect:
|
|
459
|
+
status: 200
|
|
460
|
+
|
|
461
|
+
- name: "Cleanup: Delete the workspace created for this flow"
|
|
462
|
+
skip_if:
|
|
463
|
+
- "Workspaces not in {$stored.0_check_features.enabled_features}"
|
|
464
|
+
method: "DELETE"
|
|
465
|
+
endpoint: "/api/v1/apiAuth/workspace/{$stored.flow_workspace_id}"
|
|
466
|
+
request_headers:
|
|
467
|
+
- x-api-token: "{$stored.admin_token}"
|
|
468
|
+
expect:
|
|
469
|
+
status: 200
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Journey: an account is identified by email across the system. Email is normalized to lowercase on
|
|
2
|
+
# write, and lookups (e.g. login pseudo) are case-insensitive, so a user can log in regardless of the
|
|
3
|
+
# casing they type. The same account can then see which project(s) it is linked to, and with what
|
|
4
|
+
# account type it holds in each — a project link is no longer just an id/name pair.
|
|
5
|
+
name: "Email Identity And Linked Projects Flow"
|
|
6
|
+
base_url: "http://localhost:$var(API_PUBLIC_PORT)"
|
|
7
|
+
skip_if:
|
|
8
|
+
- "Accounts not in {$stored.0_check_features.enabled_features}"
|
|
9
|
+
steps:
|
|
10
|
+
- name: "Login admin"
|
|
11
|
+
retry:
|
|
12
|
+
attempts: 10
|
|
13
|
+
delay_seconds: 5
|
|
14
|
+
method: "POST"
|
|
15
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
16
|
+
send_as: "json"
|
|
17
|
+
body:
|
|
18
|
+
device: "e2e_test_device"
|
|
19
|
+
pseudo: "$var(DEFAULT_USERNAME)"
|
|
20
|
+
password: "$var(DEFAULT_PASSWORD)"
|
|
21
|
+
expect:
|
|
22
|
+
status: 200
|
|
23
|
+
body:
|
|
24
|
+
response:
|
|
25
|
+
token: string
|
|
26
|
+
save:
|
|
27
|
+
admin_token: "{{body.response.token}}"
|
|
28
|
+
|
|
29
|
+
- name: "Generate unique test suffix"
|
|
30
|
+
randomize:
|
|
31
|
+
seed_id: 8
|
|
32
|
+
|
|
33
|
+
- name: "Create standard account with a mixed-case email"
|
|
34
|
+
method: "POST"
|
|
35
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=standard"
|
|
36
|
+
request_headers:
|
|
37
|
+
- x-api-token: "{$stored.admin_token}"
|
|
38
|
+
send_as: "json"
|
|
39
|
+
body:
|
|
40
|
+
username: "e2e_linked_{$stored.seed_id}"
|
|
41
|
+
email: "E2E_Linked_{$stored.seed_id}@EXAMPLE.COM"
|
|
42
|
+
password: "e2e_linked_pwd_v1"
|
|
43
|
+
expect:
|
|
44
|
+
status: 200
|
|
45
|
+
body:
|
|
46
|
+
errorCode: number
|
|
47
|
+
errorCodeStr: string
|
|
48
|
+
message: string
|
|
49
|
+
response:
|
|
50
|
+
accountId: string
|
|
51
|
+
accountType: string
|
|
52
|
+
email: string
|
|
53
|
+
save:
|
|
54
|
+
created_account_id: "{{body.response.accountId}}"
|
|
55
|
+
assertions:
|
|
56
|
+
- "{{body.response.accountType}} == 'standard'"
|
|
57
|
+
- "{{body.response.email}} == 'e2e_linked_{$stored.seed_id}@example.com'"
|
|
58
|
+
|
|
59
|
+
- name: "Creating another account with a different casing of the same email is rejected as a duplicate"
|
|
60
|
+
method: "POST"
|
|
61
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create?accountType=standard"
|
|
62
|
+
request_headers:
|
|
63
|
+
- x-api-token: "{$stored.admin_token}"
|
|
64
|
+
send_as: "json"
|
|
65
|
+
body:
|
|
66
|
+
username: "e2e_linked_dup_{$stored.seed_id}"
|
|
67
|
+
email: "e2e_linked_{$stored.seed_id}@example.com"
|
|
68
|
+
password: "e2e_linked_pwd_v2"
|
|
69
|
+
expect:
|
|
70
|
+
status: 422
|
|
71
|
+
body:
|
|
72
|
+
errorCode: number
|
|
73
|
+
errorCodeStr: string
|
|
74
|
+
message: string
|
|
75
|
+
|
|
76
|
+
- name: "Login using a different casing of the same email"
|
|
77
|
+
method: "POST"
|
|
78
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
79
|
+
send_as: "json"
|
|
80
|
+
body:
|
|
81
|
+
device: "e2e_test_device"
|
|
82
|
+
pseudo: "E2E_LINKED_{$stored.seed_id}@EXAMPLE.COM"
|
|
83
|
+
password: "e2e_linked_pwd_v1"
|
|
84
|
+
expect:
|
|
85
|
+
status: 200
|
|
86
|
+
body:
|
|
87
|
+
response:
|
|
88
|
+
accountId: string
|
|
89
|
+
token: string
|
|
90
|
+
save:
|
|
91
|
+
account_token: "{{body.response.token}}"
|
|
92
|
+
assertions:
|
|
93
|
+
- "{{body.response.accountId}} == '{$stored.created_account_id}'"
|
|
94
|
+
|
|
95
|
+
- name: "Get info - verify linked project carries this account's type"
|
|
96
|
+
method: "GET"
|
|
97
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/info/{$stored.account_token}"
|
|
98
|
+
expect:
|
|
99
|
+
status: 200
|
|
100
|
+
body:
|
|
101
|
+
errorCode: number
|
|
102
|
+
errorCodeStr: string
|
|
103
|
+
message: string
|
|
104
|
+
response:
|
|
105
|
+
accountId: string
|
|
106
|
+
email: string
|
|
107
|
+
linkedProjects:
|
|
108
|
+
- id: string
|
|
109
|
+
name: string
|
|
110
|
+
description: string
|
|
111
|
+
isActive: boolean
|
|
112
|
+
accountType: string
|
|
113
|
+
assertions:
|
|
114
|
+
- "{{body.response.email}} == 'e2e_linked_{$stored.seed_id}@example.com'"
|
|
115
|
+
- "{{body.response.linkedProjects.count()}} >= 1"
|
|
116
|
+
- "{{body.response.linkedProjects[0].name}} == '$var(AUTH_PROJECT_NAME)'"
|
|
117
|
+
- "{{body.response.linkedProjects[0].isActive}} == True"
|
|
118
|
+
- "{{body.response.linkedProjects[0].accountType}} == 'standard'"
|
|
119
|
+
|
|
120
|
+
- name: "Cleanup: deactivate the created account"
|
|
121
|
+
method: "POST"
|
|
122
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/activationState/{$stored.created_account_id}?isActive=false"
|
|
123
|
+
request_headers:
|
|
124
|
+
- x-api-token: "{$stored.admin_token}"
|
|
125
|
+
expect:
|
|
126
|
+
status: 200
|
|
127
|
+
body:
|
|
128
|
+
errorCode: number
|
|
129
|
+
errorCodeStr: string
|
|
130
|
+
message: string
|
|
131
|
+
|
|
132
|
+
- name: "Login should fail for deactivated account"
|
|
133
|
+
method: "POST"
|
|
134
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
135
|
+
send_as: "json"
|
|
136
|
+
body:
|
|
137
|
+
device: "e2e_test_device"
|
|
138
|
+
pseudo: "e2e_linked_{$stored.seed_id}"
|
|
139
|
+
password: "e2e_linked_pwd_v1"
|
|
140
|
+
expect:
|
|
141
|
+
status: 401
|
|
142
|
+
body:
|
|
143
|
+
errorCode: number
|
|
144
|
+
errorCodeStr: string
|
|
145
|
+
message: string
|
|
146
|
+
|
|
147
|
+
# --- Same identity rule for invited 2FA accounts: an account invited under one casing of its
|
|
148
|
+
# email must still be found (not duplicated, not rejected) when the user later logs in typing
|
|
149
|
+
# their email in a different casing. ---
|
|
150
|
+
|
|
151
|
+
- name: "Invite a new 2FA account with a mixed-case email"
|
|
152
|
+
skip_if:
|
|
153
|
+
- "InviteEmail2FA not in {$stored.0_check_features.enabled_features}"
|
|
154
|
+
method: "POST"
|
|
155
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/2fa/invite"
|
|
156
|
+
request_headers:
|
|
157
|
+
- x-api-token: "{$stored.admin_token}"
|
|
158
|
+
send_as: "json"
|
|
159
|
+
body:
|
|
160
|
+
email: "E2E_2fa_Case_{$stored.seed_id}@EXAMPLE.COM"
|
|
161
|
+
accountType: "2fa"
|
|
162
|
+
expect:
|
|
163
|
+
status: 200
|
|
164
|
+
body:
|
|
165
|
+
errorCode: number
|
|
166
|
+
errorCodeStr: string
|
|
167
|
+
message: string
|
|
168
|
+
assertions:
|
|
169
|
+
- "{{body.errorCode}} == 0"
|
|
170
|
+
|
|
171
|
+
- name: "Verify invite email was sent"
|
|
172
|
+
skip_if:
|
|
173
|
+
- "InviteEmail2FA not in {$stored.0_check_features.enabled_features}"
|
|
174
|
+
check_email:
|
|
175
|
+
to: "E2E_2fa_Case_{$stored.seed_id}@EXAMPLE.COM"
|
|
176
|
+
retry:
|
|
177
|
+
attempts: 15
|
|
178
|
+
delay_seconds: 2
|
|
179
|
+
assertions:
|
|
180
|
+
- "{{email.to}} include E2E_2fa_Case_{$stored.seed_id}@EXAMPLE.COM"
|
|
181
|
+
|
|
182
|
+
- name: "Trigger 2FA login with a different casing of the invited email"
|
|
183
|
+
skip_if:
|
|
184
|
+
- "Email2FA not in {$stored.0_check_features.enabled_features}"
|
|
185
|
+
- "InviteEmail2FA not in {$stored.0_check_features.enabled_features}"
|
|
186
|
+
method: "POST"
|
|
187
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/oauth/2fa"
|
|
188
|
+
send_as: "json"
|
|
189
|
+
body:
|
|
190
|
+
email: "e2e_2fa_case_{$stored.seed_id}@example.com"
|
|
191
|
+
device: "e2e_test_device"
|
|
192
|
+
expect:
|
|
193
|
+
status: 200
|
|
194
|
+
body:
|
|
195
|
+
errorCode: number
|
|
196
|
+
errorCodeStr: string
|
|
197
|
+
message: string
|
|
198
|
+
|
|
199
|
+
- name: "Wait for OTP email and extract code"
|
|
200
|
+
skip_if:
|
|
201
|
+
- "Email2FA not in {$stored.0_check_features.enabled_features}"
|
|
202
|
+
- "InviteEmail2FA not in {$stored.0_check_features.enabled_features}"
|
|
203
|
+
check_email:
|
|
204
|
+
to: "e2e_2fa_case_{$stored.seed_id}@example.com"
|
|
205
|
+
retry:
|
|
206
|
+
attempts: 15
|
|
207
|
+
delay_seconds: 2
|
|
208
|
+
assertions:
|
|
209
|
+
- "{{email.to}} include e2e_2fa_case_{$stored.seed_id}@example.com"
|
|
210
|
+
save:
|
|
211
|
+
otp_code:
|
|
212
|
+
from: "{{email.body}}"
|
|
213
|
+
regex: "(?is)otp\\s*code[\\s\\S]{0,4000}?\\b([0-9]{8})\\b"
|
|
214
|
+
|
|
215
|
+
- name: "Verify OTP - login succeeds against the account created by the invite, not a new one"
|
|
216
|
+
skip_if:
|
|
217
|
+
- "Email2FA not in {$stored.0_check_features.enabled_features}"
|
|
218
|
+
- "InviteEmail2FA not in {$stored.0_check_features.enabled_features}"
|
|
219
|
+
method: "GET"
|
|
220
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/oauth/2fa/verify"
|
|
221
|
+
request_query_params:
|
|
222
|
+
email: "e2e_2fa_case_{$stored.seed_id}@example.com"
|
|
223
|
+
code: "{$stored.otp_code}"
|
|
224
|
+
expect:
|
|
225
|
+
status: 200
|
|
226
|
+
body:
|
|
227
|
+
errorCode: number
|
|
228
|
+
errorCodeStr: string
|
|
229
|
+
message: string
|
|
230
|
+
response:
|
|
231
|
+
accountId: string
|
|
232
|
+
accountType: string
|
|
233
|
+
token: string
|
|
234
|
+
assertions:
|
|
235
|
+
- "{{body.errorCode}} == 0"
|
|
236
|
+
- "{{body.response.accountType}} == '2fa'"
|
|
@@ -30,6 +30,7 @@ sefrone_api_e2e/e2e/Scenarios/Auth/6_project_endpoints.yaml
|
|
|
30
30
|
sefrone_api_e2e/e2e/Scenarios/Auth/7_email_2fa_flow.yaml
|
|
31
31
|
sefrone_api_e2e/e2e/Scenarios/Auth/8_temporary_passwords_flow.yaml
|
|
32
32
|
sefrone_api_e2e/e2e/Scenarios/Auth/9_project_account_access_control_flow.yaml
|
|
33
|
+
sefrone_api_e2e/e2e/Scenarios/Auth/9a_email_identity_and_linked_projects_flow.yaml
|
|
33
34
|
sefrone_api_e2e/e2e/Scenarios/Oidc/1_relying_party_admin.yaml
|
|
34
35
|
sefrone_api_e2e/e2e/Scenarios/Oidc/2_authorization_code_flow.yaml
|
|
35
36
|
sefrone_api_e2e/e2e/Scenarios/Oidc/3_disable_propagation_flow.yaml
|
|
@@ -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.4.
|
|
8
|
+
version="1.4.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",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sefrone_api_e2e-1.4.0 → sefrone_api_e2e-1.4.2}/sefrone_api_e2e.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|