sefrone-api-e2e 1.2.4__tar.gz → 1.2.6__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.2.4 → sefrone_api_e2e-1.2.6}/PKG-INFO +1 -1
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/e2e/Scenarios/Auth/1_normal_auth_flow.yaml +0 -38
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/e2e/Scenarios/Auth/4_workspace_endpoints.yaml +3 -1
- sefrone_api_e2e-1.2.6/sefrone_api_e2e/e2e/Scenarios/Auth/8_temporary_passwords_flow.yaml +219 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e.egg-info/PKG-INFO +1 -1
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e.egg-info/SOURCES.txt +2 -1
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/setup.py +1 -1
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/README.md +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/__init__.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/api_e2e_manager.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/e2e/Scenarios/Auth/0_check_features.yaml +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/e2e/Scenarios/Auth/2_account_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/e2e/Scenarios/Auth/3_admin_account_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/e2e/Scenarios/Auth/5_apikey_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/e2e/Scenarios/Auth/6_project_endpoints.yaml +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/e2e/Scenarios/Auth/7_email_2fa_flow.yaml +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/e2e_scenarios_manager.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/env_patch.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/json_mock_server.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/runner_assets.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/runner_email_mock.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/runner_rest_api.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/runner_satim_mock.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/runner_webhook_mock.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e/step_runner.py +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e.egg-info/dependency_links.txt +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e.egg-info/requires.txt +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e.egg-info/top_level.txt +0 -0
- {sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/setup.cfg +0 -0
|
@@ -90,44 +90,6 @@ steps:
|
|
|
90
90
|
ChangeAccountPermissions: string
|
|
91
91
|
ChangeAccountCredentials: string
|
|
92
92
|
|
|
93
|
-
- name: "Get user info using deprecated login check endpoint"
|
|
94
|
-
method: "POST"
|
|
95
|
-
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login/check/{$stored.login_token}"
|
|
96
|
-
expect:
|
|
97
|
-
status: 200
|
|
98
|
-
body:
|
|
99
|
-
errorCode: number
|
|
100
|
-
errorCodeStr: string
|
|
101
|
-
message: string
|
|
102
|
-
response:
|
|
103
|
-
accountId: string
|
|
104
|
-
projectId: string
|
|
105
|
-
project: string
|
|
106
|
-
accountType: string
|
|
107
|
-
credentialType: string
|
|
108
|
-
isActive: boolean
|
|
109
|
-
username: string
|
|
110
|
-
linkedWorkspaces:
|
|
111
|
-
- workspaceId: string
|
|
112
|
-
workspaceName: string
|
|
113
|
-
workspaceDescription: string
|
|
114
|
-
permissions:
|
|
115
|
-
Projects: string
|
|
116
|
-
Workspaces: string
|
|
117
|
-
ListWorkspaces: string
|
|
118
|
-
Accounts: string
|
|
119
|
-
ApiKeys: string
|
|
120
|
-
AuthStats: string
|
|
121
|
-
AccountState: string
|
|
122
|
-
ChangeAccountPermissions: string
|
|
123
|
-
ChangeAccountCredentials: string
|
|
124
|
-
token: string
|
|
125
|
-
tokenExpiryDate: datetime
|
|
126
|
-
assertions:
|
|
127
|
-
- "{{body.response.accountId}} == '{$stored.login_account_id}'"
|
|
128
|
-
- "{{body.response.username}} == 'admin'"
|
|
129
|
-
- "{{body.response.accountType}} == 'root'"
|
|
130
|
-
|
|
131
93
|
- name: "Create guest account"
|
|
132
94
|
skip_if:
|
|
133
95
|
- "GuestAccount not in {$stored.0_check_features.enabled_features}"
|
|
@@ -179,7 +179,9 @@ steps:
|
|
|
179
179
|
|
|
180
180
|
- name: "Register standard test account"
|
|
181
181
|
method: "POST"
|
|
182
|
-
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)"
|
|
182
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/create"
|
|
183
|
+
request_headers:
|
|
184
|
+
- x-api-token: "{$stored.admin_token}"
|
|
183
185
|
send_as: "json"
|
|
184
186
|
body:
|
|
185
187
|
username: "e2e_ws_std_{$stored.seed_account_id}"
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
name: "Temporary Passwords Flow"
|
|
2
|
+
base_url: "http://localhost:$var(API_PUBLIC_PORT)"
|
|
3
|
+
|
|
4
|
+
# This scenario requires the TemporaryCredentials feature to be registered.
|
|
5
|
+
skip_if:
|
|
6
|
+
- "TemporaryCredentials not in {$stored.0_check_features.enabled_features}"
|
|
7
|
+
|
|
8
|
+
steps:
|
|
9
|
+
- name: "Login root admin"
|
|
10
|
+
retry:
|
|
11
|
+
attempts: 10
|
|
12
|
+
delay_seconds: 5
|
|
13
|
+
method: "POST"
|
|
14
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
15
|
+
send_as: "json"
|
|
16
|
+
body:
|
|
17
|
+
device: "e2e_test_device"
|
|
18
|
+
pseudo: "$var(DEFAULT_USERNAME)"
|
|
19
|
+
password: "$var(DEFAULT_PASSWORD)"
|
|
20
|
+
expect:
|
|
21
|
+
status: 200
|
|
22
|
+
body:
|
|
23
|
+
response:
|
|
24
|
+
token: string
|
|
25
|
+
save:
|
|
26
|
+
root_admin_token: "{{body.response.token}}"
|
|
27
|
+
|
|
28
|
+
- name: "Generate unique test suffix"
|
|
29
|
+
randomize:
|
|
30
|
+
seed_id: 8
|
|
31
|
+
|
|
32
|
+
- name: "Create temporary credential"
|
|
33
|
+
method: "POST"
|
|
34
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/temp-credentials/create"
|
|
35
|
+
request_headers:
|
|
36
|
+
- x-api-token: "{$stored.root_admin_token}"
|
|
37
|
+
send_as: "json"
|
|
38
|
+
body:
|
|
39
|
+
password: "e2e_temp_pwd_{$stored.seed_id}"
|
|
40
|
+
label: "e2e temp credential {$stored.seed_id}"
|
|
41
|
+
expiresAt: "$date(+1,end)"
|
|
42
|
+
expect:
|
|
43
|
+
status: 200
|
|
44
|
+
body:
|
|
45
|
+
errorCode: number
|
|
46
|
+
errorCodeStr: string
|
|
47
|
+
message: string
|
|
48
|
+
response:
|
|
49
|
+
id: string
|
|
50
|
+
label: string
|
|
51
|
+
expiresAt: datetime
|
|
52
|
+
createdAt: datetime
|
|
53
|
+
save:
|
|
54
|
+
temp_credential_id: "{{body.response.id}}"
|
|
55
|
+
assertions:
|
|
56
|
+
- "{{body.response.label}} == 'e2e temp credential {$stored.seed_id}'"
|
|
57
|
+
|
|
58
|
+
- name: "List temporary credentials shows the created one"
|
|
59
|
+
method: "GET"
|
|
60
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/temp-credentials/list"
|
|
61
|
+
request_headers:
|
|
62
|
+
- x-api-token: "{$stored.root_admin_token}"
|
|
63
|
+
expect:
|
|
64
|
+
status: 200
|
|
65
|
+
body:
|
|
66
|
+
errorCode: number
|
|
67
|
+
errorCodeStr: string
|
|
68
|
+
message: string
|
|
69
|
+
response:
|
|
70
|
+
- id: string
|
|
71
|
+
label: string
|
|
72
|
+
expiresAt: datetime
|
|
73
|
+
createdAt: datetime
|
|
74
|
+
assertions:
|
|
75
|
+
- "{{body.response.count()}} == 1"
|
|
76
|
+
- "{{body.response[0].id}} == '{$stored.temp_credential_id}'"
|
|
77
|
+
|
|
78
|
+
- name: "Login with original password still works"
|
|
79
|
+
method: "POST"
|
|
80
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
81
|
+
send_as: "json"
|
|
82
|
+
body:
|
|
83
|
+
device: "e2e_test_device"
|
|
84
|
+
pseudo: "$var(DEFAULT_USERNAME)"
|
|
85
|
+
password: "$var(DEFAULT_PASSWORD)"
|
|
86
|
+
expect:
|
|
87
|
+
status: 200
|
|
88
|
+
body:
|
|
89
|
+
response:
|
|
90
|
+
token: string
|
|
91
|
+
|
|
92
|
+
- name: "Login with the temporary password succeeds"
|
|
93
|
+
method: "POST"
|
|
94
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
95
|
+
send_as: "json"
|
|
96
|
+
body:
|
|
97
|
+
device: "e2e_test_device"
|
|
98
|
+
pseudo: "$var(DEFAULT_USERNAME)"
|
|
99
|
+
password: "e2e_temp_pwd_{$stored.seed_id}"
|
|
100
|
+
expect:
|
|
101
|
+
status: 200
|
|
102
|
+
body:
|
|
103
|
+
errorCode: number
|
|
104
|
+
errorCodeStr: string
|
|
105
|
+
message: string
|
|
106
|
+
response:
|
|
107
|
+
token: string
|
|
108
|
+
save:
|
|
109
|
+
temp_login_token: "{{body.response.token}}"
|
|
110
|
+
assertions:
|
|
111
|
+
- "{{body.errorCode}} == 0"
|
|
112
|
+
|
|
113
|
+
- name: "Temporary password token is valid - get account info"
|
|
114
|
+
method: "GET"
|
|
115
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/info/{$stored.temp_login_token}"
|
|
116
|
+
expect:
|
|
117
|
+
status: 200
|
|
118
|
+
body:
|
|
119
|
+
response:
|
|
120
|
+
accountId: string
|
|
121
|
+
username: string
|
|
122
|
+
assertions:
|
|
123
|
+
- "{{body.response.username}} == '$var(DEFAULT_USERNAME)'"
|
|
124
|
+
|
|
125
|
+
- name: "Revoke temporary credential"
|
|
126
|
+
method: "POST"
|
|
127
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/temp-credentials/{$stored.temp_credential_id}/revoke"
|
|
128
|
+
request_headers:
|
|
129
|
+
- x-api-token: "{$stored.temp_login_token}"
|
|
130
|
+
expect:
|
|
131
|
+
status: 200
|
|
132
|
+
body:
|
|
133
|
+
errorCode: number
|
|
134
|
+
errorCodeStr: string
|
|
135
|
+
message: string
|
|
136
|
+
|
|
137
|
+
- name: "List temporary credentials is empty after revoke"
|
|
138
|
+
method: "GET"
|
|
139
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/temp-credentials/list"
|
|
140
|
+
request_headers:
|
|
141
|
+
- x-api-token: "{$stored.temp_login_token}"
|
|
142
|
+
expect:
|
|
143
|
+
status: 200
|
|
144
|
+
body:
|
|
145
|
+
response: []
|
|
146
|
+
assertions:
|
|
147
|
+
- "{{body.response.count()}} == 0"
|
|
148
|
+
|
|
149
|
+
- name: "Login with revoked temporary password fails"
|
|
150
|
+
method: "POST"
|
|
151
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
152
|
+
send_as: "json"
|
|
153
|
+
body:
|
|
154
|
+
device: "e2e_test_device"
|
|
155
|
+
pseudo: "$var(DEFAULT_USERNAME)"
|
|
156
|
+
password: "e2e_temp_pwd_{$stored.seed_id}"
|
|
157
|
+
expect:
|
|
158
|
+
status: 401
|
|
159
|
+
body:
|
|
160
|
+
errorCode: number
|
|
161
|
+
errorCodeStr: string
|
|
162
|
+
message: string
|
|
163
|
+
|
|
164
|
+
- name: "Revoking an already-revoked temporary credential returns not found"
|
|
165
|
+
method: "POST"
|
|
166
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/temp-credentials/{$stored.temp_credential_id}/revoke"
|
|
167
|
+
request_headers:
|
|
168
|
+
- x-api-token: "{$stored.temp_login_token}"
|
|
169
|
+
expect:
|
|
170
|
+
status: 404
|
|
171
|
+
body:
|
|
172
|
+
errorCode: number
|
|
173
|
+
errorCodeStr: string
|
|
174
|
+
message: string
|
|
175
|
+
|
|
176
|
+
- name: "Create an already expired temporary credential"
|
|
177
|
+
method: "POST"
|
|
178
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/temp-credentials/create"
|
|
179
|
+
request_headers:
|
|
180
|
+
- x-api-token: "{$stored.temp_login_token}"
|
|
181
|
+
send_as: "json"
|
|
182
|
+
body:
|
|
183
|
+
password: "e2e_expired_pwd_{$stored.seed_id}"
|
|
184
|
+
label: "e2e expired credential {$stored.seed_id}"
|
|
185
|
+
expiresAt: "$date(-1)"
|
|
186
|
+
expect:
|
|
187
|
+
status: 200
|
|
188
|
+
body:
|
|
189
|
+
response:
|
|
190
|
+
id: string
|
|
191
|
+
save:
|
|
192
|
+
expired_credential_id: "{{body.response.id}}"
|
|
193
|
+
|
|
194
|
+
- name: "Login with an expired temporary password fails"
|
|
195
|
+
method: "POST"
|
|
196
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/login"
|
|
197
|
+
send_as: "json"
|
|
198
|
+
body:
|
|
199
|
+
device: "e2e_test_device"
|
|
200
|
+
pseudo: "$var(DEFAULT_USERNAME)"
|
|
201
|
+
password: "e2e_expired_pwd_{$stored.seed_id}"
|
|
202
|
+
expect:
|
|
203
|
+
status: 401
|
|
204
|
+
body:
|
|
205
|
+
errorCode: number
|
|
206
|
+
errorCodeStr: string
|
|
207
|
+
message: string
|
|
208
|
+
|
|
209
|
+
- name: "Cleanup: revoke expired temporary credential"
|
|
210
|
+
method: "POST"
|
|
211
|
+
endpoint: "/api/v1/apiAuth/account/$var(AUTH_PROJECT_NAME)/temp-credentials/{$stored.expired_credential_id}/revoke"
|
|
212
|
+
request_headers:
|
|
213
|
+
- x-api-token: "{$stored.temp_login_token}"
|
|
214
|
+
expect:
|
|
215
|
+
status: 200
|
|
216
|
+
body:
|
|
217
|
+
errorCode: number
|
|
218
|
+
errorCodeStr: string
|
|
219
|
+
message: string
|
|
@@ -23,4 +23,5 @@ sefrone_api_e2e/e2e/Scenarios/Auth/3_admin_account_endpoints.yaml
|
|
|
23
23
|
sefrone_api_e2e/e2e/Scenarios/Auth/4_workspace_endpoints.yaml
|
|
24
24
|
sefrone_api_e2e/e2e/Scenarios/Auth/5_apikey_endpoints.yaml
|
|
25
25
|
sefrone_api_e2e/e2e/Scenarios/Auth/6_project_endpoints.yaml
|
|
26
|
-
sefrone_api_e2e/e2e/Scenarios/Auth/7_email_2fa_flow.yaml
|
|
26
|
+
sefrone_api_e2e/e2e/Scenarios/Auth/7_email_2fa_flow.yaml
|
|
27
|
+
sefrone_api_e2e/e2e/Scenarios/Auth/8_temporary_passwords_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.2.
|
|
8
|
+
version="1.2.6",
|
|
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
|
{sefrone_api_e2e-1.2.4 → sefrone_api_e2e-1.2.6}/sefrone_api_e2e.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|