@@ -60,6 +60,8 @@ Feature: admin/initial_state
6060 And run the command "config:app:delete libresign footer_template" with result code 0
6161 And run the command "config:app:delete libresign config_path" with result code 0
6262 And run the command "config:app:delete libresign tsa_password" with result code 0
63+ And sending "delete" to ocs "/apps/libresign/api/v1/admin/tsa"
64+ And the response should have a status code 200
6365 And the following libresign app config is set
6466 | certificate_engine | openssl |
6567 | certificate_policies_oid | |
@@ -76,10 +78,6 @@ Feature: admin/initial_state
7678 | signature_render_mode | GRAPHIC_AND_DESCRIPTION |
7779 | signature_width | 350 |
7880 | template_font_size | 10 |
79- | tsa_url | |
80- | tsa_policy_oid | |
81- | tsa_auth_type | none |
82- | tsa_username | |
8381 | docmdp_level | 2 |
8482 | policy .signature_flow .system | none |
8583 | signing_mode | sync |
@@ -112,10 +110,6 @@ Feature: admin/initial_state
112110 And the response should contain the initial state "libresign-config_path" with the following values:
113111 """
114112
115- """
116- And the response should contain the initial state "libresign-legal_information" with the following values:
117- """
118-
119113 """
120114 And the response should contain the initial state "libresign-signature_available_variables" json that match with:
121115 | key | value |
@@ -124,10 +118,6 @@ Feature: admin/initial_state
124118 | (jq )has ("{{ServerSignatureDate }}") | true |
125119 | (jq )has ("{{SignerCommonName }}") | true |
126120 | (jq )has ("{{SignerIP }}") | false |
127- And the response should contain the initial state "libresign-signature_background_type" with the following values:
128- """
129- default
130- """
131121 And the response should contain the initial state "libresign-signature_preview_zoom_level" with the following values:
132122 """
133123 100
@@ -160,32 +150,21 @@ Feature: admin/initial_state
160150 """
161151 JSignPdf
162152 """
163- And the response should contain the initial state "libresign-tsa_url" with the following values:
164- """
165-
166- """
167- And the response should contain the initial state "libresign-tsa_policy_oid" with the following values:
168- """
169-
170- """
171- And the response should contain the initial state "libresign-tsa_auth_type" with the following values:
172- """
173- none
174- """
175- And the response should contain the initial state "libresign-tsa_username" with the following values:
176- """
177-
178- """
179- And the response should contain the initial state "libresign-tsa_password" with the following values:
180- """
181- "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"
182- """
183153 And the response should contain the initial state "libresign-effective_policies" json that match with:
184- | key | value |
185- | (jq ).policies .docmdp .effectiveValue | 2 |
186- | (jq ).policies .signature_flow .policyKey | signature_flow |
187- | (jq ).policies .signature_flow .effectiveValue | none |
188- | (jq ).policies .signature_flow .allowedValues | ["none ","parallel ","ordered_numeric "] |
154+ | key | value |
155+ | (jq ).policies .docmdp .effectiveValue | 2 |
156+ | (jq ).policies .legal_information .effectiveValue | |
157+ | (jq ).policies .signature_flow .policyKey | signature_flow |
158+ | (jq ).policies .signature_flow .effectiveValue | none |
159+ | (jq ).policies .signature_flow .allowedValues | ["none ","parallel ","ordered_numeric "] |
160+ | (jq ).policies .signature_background_type .effectiveValue | default |
161+ | (jq ).policies .identification_documents .effectiveValue | false |
162+ | (jq )(.policies .approval_group .effectiveValue \| fromjson \| .[0 ]) | admin |
163+ | (jq ).policies .envelope_enabled .effectiveValue | true |
164+ | (jq ).policies .show_confetti_after_signing .effectiveValue | true |
165+ | (jq ).policies .tsa_settings .policyKey | tsa_settings |
166+ | (jq ).policies .tsa_settings .sourceScope | system |
167+ | (jq )(.policies .tsa_settings .effectiveValue \| fromjson ).auth_type | none |
189168 And the response should contain the initial state "libresign-signing_mode" with the following values:
190169 """
191170 sync
@@ -194,26 +173,10 @@ Feature: admin/initial_state
194173 """
195174 local
196175 """
197- And the response should contain the initial state "libresign-identification_documents" with the following values:
198- """
199- false
200- """
201- And the response should contain the initial state "libresign-approval_group" with the following values:
202- """
203- ["admin"]
204- """
205- And the response should contain the initial state "libresign-envelope_enabled" with the following values:
206- """
207- true
208- """
209176 And the response should contain the initial state "libresign-parallel_workers" with the following values:
210177 """
211178 "4"
212179 """
213- And the response should contain the initial state "libresign-show_confetti_after_signing" with the following values:
214- """
215- true
216- """
217180 And the response should contain the initial state "libresign-crl_external_validation_enabled" with the following values:
218181 """
219182 true
@@ -240,10 +203,6 @@ Feature: admin/initial_state
240203 | signature_text_template | Issuer : {{IssuerCommonName }} |
241204 | signature_width | 420 |
242205 | template_font_size | 12 .5 |
243- | tsa_url | https ://tsa .example .test /tsr |
244- | tsa_policy_oid | 1 .2 .3 |
245- | tsa_auth_type | basic |
246- | tsa_username | signer |
247206 | tsa_password | topsecret |
248207 | docmdp_level | 0 |
249208 | policy .signature_flow .system | ordered_numeric |
@@ -255,6 +214,13 @@ Feature: admin/initial_state
255214 | parallel_workers | 9 |
256215 | show_confetti_after_signing | false |
257216 | crl_external_validation_enabled | false |
217+ And sending "post" to ocs "/apps/libresign/api/v1/admin/tsa"
218+ | tsa_url | https ://tsa .example .test /tsr |
219+ | tsa_policy_oid | 1 .2 .3 |
220+ | tsa_auth_type | basic |
221+ | tsa_username | signer |
222+ | tsa_password | topsecret |
223+ And the response should have a status code 200
258224 And sending "post" to ocs "/apps/libresign/api/v1/admin/footer-template"
259225 | template | Custom footer for {{ uuid }} |
260226 | width | 610 |
@@ -281,18 +247,10 @@ Feature: admin/initial_state
281247 """
282248 "/tmp"
283249 """
284- And the response should contain the initial state "libresign-legal_information" with the following values:
285- """
286- Custom legal information
287- """
288250 And the response should contain the initial state "libresign-signature_text_parsed" with the following values:
289251 """
290252 Issuer: Acme Cooperative
291253 """
292- And the response should contain the initial state "libresign-signature_background_type" with the following values:
293- """
294- deleted
295- """
296254 And the response should contain the initial state "libresign-signature_preview_zoom_level" with the following values:
297255 """
298256 125
@@ -321,32 +279,25 @@ Feature: admin/initial_state
321279 """
322280 PhpNative
323281 """
324- And the response should contain the initial state "libresign-tsa_url" with the following values:
325- """
326- "https:\/\/tsa.example.test\/tsr"
327- """
328- And the response should contain the initial state "libresign-tsa_policy_oid" with the following values:
329- """
330- 1.2.3
331- """
332- And the response should contain the initial state "libresign-tsa_auth_type" with the following values:
333- """
334- basic
335- """
336- And the response should contain the initial state "libresign-tsa_username" with the following values:
337- """
338- signer
339- """
340- And the response should contain the initial state "libresign-tsa_password" with the following values:
341- """
342- topsecret
343- """
344282 And the response should contain the initial state "libresign-effective_policies" json that match with:
345- | key | value |
346- | (jq ).policies .docmdp .effectiveValue | 0 |
347- | (jq ).policies .signature_flow .policyKey | signature_flow |
348- | (jq ).policies .signature_flow .effectiveValue | ordered_numeric |
349- | (jq ).policies .signature_flow .allowedValues | ["ordered_numeric "] |
283+ | key | value |
284+ | (jq ).policies .docmdp .effectiveValue | 0 |
285+ | (jq ).policies .legal_information .effectiveValue | Custom legal information |
286+ | (jq ).policies .signature_flow .policyKey | signature_flow |
287+ | (jq ).policies .signature_flow .effectiveValue | ordered_numeric |
288+ | (jq ).policies .signature_flow .allowedValues | ["ordered_numeric "] |
289+ | (jq ).policies .signature_background_type .effectiveValue | deleted |
290+ | (jq ).policies .identification_documents .effectiveValue | true |
291+ | (jq )(.policies .approval_group .effectiveValue \| fromjson \| .[0 ]) | admin |
292+ | (jq )(.policies .approval_group .effectiveValue \| fromjson \| .[1 ]) | staff |
293+ | (jq ).policies .envelope_enabled .effectiveValue | false |
294+ | (jq ).policies .show_confetti_after_signing .effectiveValue | false |
295+ | (jq ).policies .tsa_settings .policyKey | tsa_settings |
296+ | (jq ).policies .tsa_settings .sourceScope | global |
297+ | (jq )(.policies .tsa_settings .effectiveValue \| fromjson ).url | https ://tsa .example .test /tsr |
298+ | (jq )(.policies .tsa_settings .effectiveValue \| fromjson ).policy_oid | 1 .2 .3 |
299+ | (jq )(.policies .tsa_settings .effectiveValue \| fromjson ).auth_type | basic |
300+ | (jq )(.policies .tsa_settings .effectiveValue \| fromjson ).username | signer |
350301 And the response should contain the initial state "libresign-signing_mode" with the following values:
351302 """
352303 async
@@ -355,26 +306,10 @@ Feature: admin/initial_state
355306 """
356307 external
357308 """
358- And the response should contain the initial state "libresign-identification_documents" with the following values:
359- """
360- true
361- """
362- And the response should contain the initial state "libresign-approval_group" with the following values:
363- """
364- ["admin","staff"]
365- """
366- And the response should contain the initial state "libresign-envelope_enabled" with the following values:
367- """
368- false
369- """
370309 And the response should contain the initial state "libresign-parallel_workers" with the following values:
371310 """
372311 "9"
373312 """
374- And the response should contain the initial state "libresign-show_confetti_after_signing" with the following values:
375- """
376- false
377- """
378313 And the response should contain the initial state "libresign-crl_external_validation_enabled" with the following values:
379314 """
380315 false
@@ -395,10 +330,6 @@ Feature: admin/initial_state
395330 | signature_render_mode | GRAPHIC_AND_DESCRIPTION |
396331 | signature_width | 350 |
397332 | template_font_size | 10 |
398- | tsa_url | |
399- | tsa_policy_oid | |
400- | tsa_auth_type | none |
401- | tsa_username | |
402333 | docmdp_level | 2 |
403334 | policy .signature_flow .system | none |
404335 | signing_mode | sync |
@@ -409,6 +340,8 @@ Feature: admin/initial_state
409340 | parallel_workers | 4 |
410341 | show_confetti_after_signing | true |
411342 | crl_external_validation_enabled | true |
343+ And sending "delete" to ocs "/apps/libresign/api/v1/admin/tsa"
344+ And the response should have a status code 200
412345 And run the command "config:app:delete libresign signature_text_template" with result code 0
413346 And run the command "config:app:delete libresign footer_template" with result code 0
414347 And run the command "config:app:delete libresign config_path" with result code 0
0 commit comments