onc_certification_g10_test_kit 7.0.3 → 7.2.0

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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/g10_reference_server_preset.json +1467 -0
  3. data/lib/inferno/ext/bloomer.rb +1 -1
  4. data/lib/inferno/terminology/tasks/process_umls.rb +1 -1
  5. data/lib/onc_certification_g10_test_kit/bulk_data_authorization.rb +73 -67
  6. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu1.rb +1 -2
  7. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu2.rb +7 -1
  8. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_parameters.rb +1 -1
  9. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +10 -2
  10. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +6 -2
  11. data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +7 -3
  12. data/lib/onc_certification_g10_test_kit/configuration_checker.rb +5 -13
  13. data/lib/onc_certification_g10_test_kit/encounter_context_test.rb +3 -3
  14. data/lib/onc_certification_g10_test_kit/export_kick_off_performer.rb +7 -3
  15. data/lib/onc_certification_g10_test_kit/feature.rb +5 -4
  16. data/lib/onc_certification_g10_test_kit/igs/01-us-core-v400.tgz +0 -0
  17. data/lib/onc_certification_g10_test_kit/igs/03-us-core-v311.tgz +0 -0
  18. data/lib/onc_certification_g10_test_kit/igs/04-us-core-610.tgz +0 -0
  19. data/lib/onc_certification_g10_test_kit/metadata.rb +103 -0
  20. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +0 -4
  21. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +8 -4
  22. data/lib/onc_certification_g10_test_kit/patient_context_test.rb +3 -3
  23. data/lib/onc_certification_g10_test_kit/patient_scope_test.rb +1 -1
  24. data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +3 -10
  25. data/lib/onc_certification_g10_test_kit/scope_constants.rb +52 -0
  26. data/lib/onc_certification_g10_test_kit/short_id_map.yml +11 -20
  27. data/lib/onc_certification_g10_test_kit/single_patient_api_group.rb +18 -17
  28. data/lib/onc_certification_g10_test_kit/single_patient_us_core_4_api_group.rb +18 -17
  29. data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +18 -17
  30. data/lib/onc_certification_g10_test_kit/single_patient_us_core_6_api_group.rb +20 -19
  31. data/lib/onc_certification_g10_test_kit/single_patient_us_core_7_api_group.rb +20 -19
  32. data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +108 -65
  33. data/lib/onc_certification_g10_test_kit/smart_asymmetric_launch_group.rb +42 -89
  34. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group.rb +33 -43
  35. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2.rb +32 -54
  36. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2_2.rb +34 -55
  37. data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +103 -146
  38. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group.rb +17 -55
  39. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group_stu2_2.rb +17 -55
  40. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group.rb +17 -55
  41. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group_stu2_2.rb +17 -55
  42. data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_group.rb +33 -68
  43. data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_test.rb +4 -3
  44. data/lib/onc_certification_g10_test_kit/smart_invalid_pkce_group.rb +45 -89
  45. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group.rb +45 -89
  46. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group_stu2.rb +53 -91
  47. data/lib/onc_certification_g10_test_kit/smart_invalid_token_refresh_test.rb +9 -6
  48. data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +86 -278
  49. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group.rb +32 -59
  50. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2.rb +36 -75
  51. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2_2.rb +36 -75
  52. data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +6 -1
  53. data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +90 -118
  54. data/lib/onc_certification_g10_test_kit/smart_v1_scopes_group.rb +62 -116
  55. data/lib/onc_certification_g10_test_kit/tasks/generate_matrix.rb +3 -12
  56. data/lib/onc_certification_g10_test_kit/token_introspection_group.rb +12 -25
  57. data/lib/onc_certification_g10_test_kit/token_introspection_group_stu2_2.rb +12 -14
  58. data/lib/onc_certification_g10_test_kit/token_revocation_group.rb +44 -33
  59. data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +3 -3
  60. data/lib/onc_certification_g10_test_kit/urls.rb +4 -0
  61. data/lib/onc_certification_g10_test_kit/version.rb +2 -1
  62. data/lib/onc_certification_g10_test_kit.rb +119 -65
  63. metadata +20 -68
@@ -1,5 +1,6 @@
1
1
  require_relative 'base_token_refresh_group'
2
2
  require_relative 'patient_context_test'
3
+ require_relative 'scope_constants'
3
4
  require_relative 'smart_invalid_token_refresh_test'
4
5
  require_relative 'smart_scopes_test'
5
6
  require_relative 'unauthorized_access_test'
@@ -9,13 +10,15 @@ require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
9
10
 
10
11
  module ONCCertificationG10TestKit
11
12
  class SmartStandalonePatientAppGroup < Inferno::TestGroup
13
+ include ScopeConstants
14
+
12
15
  title 'Standalone Patient App - Full Access'
13
16
  short_title 'Standalone Patient App'
14
17
 
15
18
  input_instructions %(
16
19
  Register Inferno as a standalone application using the following information:
17
20
 
18
- * Redirect URI: `#{SMARTAppLaunch::AppRedirectTest.config.options[:redirect_uri]}`
21
+ * Redirect URI: `#{REDIRECT_URI}`
19
22
 
20
23
  Enter in the appropriate scope to enable patient-level access to all
21
24
  relevant resources. In addition, support for the OpenID Connect (openid
@@ -40,7 +43,7 @@ module ONCCertificationG10TestKit
40
43
  Prior to running the scenario, register Inferno as a confidential client
41
44
  with the following information:
42
45
 
43
- * Redirect URI: `#{SMARTAppLaunch::AppRedirectTest.config.options[:redirect_uri]}`
46
+ * Redirect URI: `#{REDIRECT_URI}`
44
47
 
45
48
  The following implementation specifications are relevant to this scenario:
46
49
 
@@ -56,26 +59,41 @@ module ONCCertificationG10TestKit
56
59
 
57
60
  config(
58
61
  inputs: {
59
- client_secret: {
60
- optional: false,
61
- name: :standalone_client_secret
62
+ smart_auth_info: {
63
+ name: :standalone_smart_auth_info,
64
+ title: 'Standalone Launch Credentials',
65
+ options: {
66
+ mode: 'auth',
67
+ components: [
68
+ {
69
+ name: :auth_type,
70
+ default: 'symmetric',
71
+ locked: true
72
+ },
73
+ {
74
+ name: :auth_request_method,
75
+ default: 'GET',
76
+ locked: true
77
+ },
78
+ {
79
+ name: :use_discovery,
80
+ locked: true
81
+ }
82
+ ]
83
+ }
62
84
  }
63
85
  }
64
86
  )
65
87
 
66
- input_order :url,
67
- :standalone_client_id,
68
- :standalone_client_secret,
69
- :standalone_requested_scopes,
70
- :use_pkce,
71
- :pkce_code_challenge_method,
72
- :standalone_authorization_method,
73
- :client_auth_type,
74
- :client_auth_encryption_method
75
-
76
88
  group from: :smart_discovery do
77
89
  required_suite_options(G10Options::SMART_1_REQUIREMENT)
78
90
 
91
+ config(
92
+ outputs: {
93
+ smart_auth_info: { name: :standalone_smart_auth_info }
94
+ }
95
+ )
96
+
79
97
  test from: 'g10_smart_well_known_capabilities',
80
98
  config: {
81
99
  options: {
@@ -121,6 +139,12 @@ module ONCCertificationG10TestKit
121
139
  group from: :smart_discovery_stu2 do
122
140
  required_suite_options(G10Options::SMART_2_REQUIREMENT)
123
141
 
142
+ config(
143
+ outputs: {
144
+ smart_auth_info: { name: :standalone_smart_auth_info }
145
+ }
146
+ )
147
+
124
148
  test from: 'g10_smart_well_known_capabilities',
125
149
  config: {
126
150
  options: {
@@ -143,6 +167,13 @@ module ONCCertificationG10TestKit
143
167
 
144
168
  group from: :smart_discovery_stu2_2 do # rubocop:disable Naming/VariableNumber
145
169
  required_suite_options(G10Options::SMART_2_2_REQUIREMENT)
170
+
171
+ config(
172
+ outputs: {
173
+ smart_auth_info: { name: :standalone_smart_auth_info }
174
+ }
175
+ )
176
+
146
177
  test from: 'g10_smart_well_known_capabilities',
147
178
  config: {
148
179
  options: {
@@ -194,19 +225,16 @@ module ONCCertificationG10TestKit
194
225
 
195
226
  config(
196
227
  inputs: {
197
- requested_scopes: {
198
- default: %(
199
- launch/patient openid fhirUser offline_access
200
- patient/Medication.read patient/AllergyIntolerance.read
201
- patient/CarePlan.read patient/CareTeam.read patient/Condition.read
202
- patient/Device.read patient/DiagnosticReport.read
203
- patient/DocumentReference.read patient/Encounter.read
204
- patient/Goal.read patient/Immunization.read patient/Location.read
205
- patient/MedicationRequest.read patient/Observation.read
206
- patient/Organization.read patient/Patient.read
207
- patient/Practitioner.read patient/Procedure.read
208
- patient/Provenance.read patient/PractitionerRole.read
209
- ).gsub(/\s{2,}/, ' ').strip
228
+ smart_auth_info: {
229
+ name: :standalone_smart_auth_info,
230
+ options: {
231
+ components: [
232
+ {
233
+ name: :requested_scopes,
234
+ default: STANDALONE_SMART_1_SCOPES
235
+ }
236
+ ]
237
+ }
210
238
  }
211
239
  }
212
240
  )
@@ -214,7 +242,6 @@ module ONCCertificationG10TestKit
214
242
  test from: :g10_smart_scopes do
215
243
  config(
216
244
  inputs: {
217
- requested_scopes: { name: :standalone_requested_scopes },
218
245
  received_scopes: { name: :standalone_received_scopes }
219
246
  },
220
247
  options: {
@@ -236,7 +263,7 @@ module ONCCertificationG10TestKit
236
263
  config: {
237
264
  inputs: {
238
265
  patient_id: { name: :standalone_patient_id },
239
- smart_credentials: { name: :standalone_smart_credentials }
266
+ smart_auth_info: { name: :standalone_smart_auth_info }
240
267
  }
241
268
  }
242
269
 
@@ -257,27 +284,7 @@ module ONCCertificationG10TestKit
257
284
  )
258
285
  end
259
286
 
260
- group from: :smart_standalone_launch_stu2,
261
- config: {
262
- inputs: {
263
- use_pkce: {
264
- default: 'true',
265
- locked: true
266
- },
267
- pkce_code_challenge_method: {
268
- locked: true
269
- },
270
- authorization_method: {
271
- name: :standalone_authorization_method,
272
- default: 'get',
273
- locked: true
274
- },
275
- client_auth_type: {
276
- locked: true,
277
- default: 'confidential_symmetric'
278
- }
279
- }
280
- } do
287
+ group from: :smart_standalone_launch_stu2 do
281
288
  required_suite_options(G10Options::SMART_2_REQUIREMENT)
282
289
 
283
290
  title 'Standalone Launch With Patient Scope'
@@ -308,19 +315,16 @@ module ONCCertificationG10TestKit
308
315
 
309
316
  config(
310
317
  inputs: {
311
- requested_scopes: {
312
- default: %(
313
- launch/patient openid fhirUser offline_access
314
- patient/Medication.rs patient/AllergyIntolerance.rs
315
- patient/CarePlan.rs patient/CareTeam.rs patient/Condition.rs
316
- patient/Device.rs patient/DiagnosticReport.rs
317
- patient/DocumentReference.rs patient/Encounter.rs
318
- patient/Goal.rs patient/Immunization.rs patient/Location.rs
319
- patient/MedicationRequest.rs patient/Observation.rs
320
- patient/Organization.rs patient/Patient.rs
321
- patient/Practitioner.rs patient/Procedure.rs
322
- patient/Provenance.rs patient/PractitionerRole.rs
323
- ).gsub(/\s{2,}/, ' ').strip
318
+ smart_auth_info: {
319
+ name: :standalone_smart_auth_info,
320
+ options: {
321
+ components: [
322
+ {
323
+ name: :requested_scopes,
324
+ default: STANDALONE_SMART_2_SCOPES
325
+ }
326
+ ]
327
+ }
324
328
  }
325
329
  }
326
330
  )
@@ -350,7 +354,7 @@ module ONCCertificationG10TestKit
350
354
  config: {
351
355
  inputs: {
352
356
  patient_id: { name: :standalone_patient_id },
353
- smart_credentials: { name: :standalone_smart_credentials }
357
+ smart_auth_info: { name: :standalone_smart_auth_info }
354
358
  }
355
359
  }
356
360
 
@@ -371,27 +375,7 @@ module ONCCertificationG10TestKit
371
375
  )
372
376
  end
373
377
 
374
- group from: :smart_standalone_launch_stu2_2, # rubocop:disable Naming/VariableNumber
375
- config: {
376
- inputs: {
377
- use_pkce: {
378
- default: 'true',
379
- locked: true
380
- },
381
- pkce_code_challenge_method: {
382
- locked: true
383
- },
384
- authorization_method: {
385
- name: :standalone_authorization_method,
386
- default: 'get',
387
- locked: true
388
- },
389
- client_auth_type: {
390
- locked: true,
391
- default: 'confidential_symmetric'
392
- }
393
- }
394
- } do
378
+ group from: :smart_standalone_launch_stu2_2 do # rubocop:disable Naming/VariableNumber
395
379
  required_suite_options(G10Options::SMART_2_2_REQUIREMENT)
396
380
  title 'Standalone Launch With Patient Scope'
397
381
  description %(
@@ -421,19 +405,16 @@ module ONCCertificationG10TestKit
421
405
 
422
406
  config(
423
407
  inputs: {
424
- requested_scopes: {
425
- default: %(
426
- launch/patient openid fhirUser offline_access
427
- patient/Medication.rs patient/AllergyIntolerance.rs
428
- patient/CarePlan.rs patient/CareTeam.rs patient/Condition.rs
429
- patient/Device.rs patient/DiagnosticReport.rs
430
- patient/DocumentReference.rs patient/Encounter.rs
431
- patient/Goal.rs patient/Immunization.rs patient/Location.rs
432
- patient/MedicationRequest.rs patient/Observation.rs
433
- patient/Organization.rs patient/Patient.rs
434
- patient/Practitioner.rs patient/Procedure.rs
435
- patient/Provenance.rs patient/PractitionerRole.rs
436
- ).gsub(/\s{2,}/, ' ').strip
408
+ smart_auth_info: {
409
+ name: :standalone_smart_auth_info,
410
+ options: {
411
+ components: [
412
+ {
413
+ name: :requested_scopes,
414
+ default: STANDALONE_SMART_2_SCOPES
415
+ }
416
+ ]
417
+ }
437
418
  }
438
419
  }
439
420
  )
@@ -463,7 +444,7 @@ module ONCCertificationG10TestKit
463
444
  config: {
464
445
  inputs: {
465
446
  patient_id: { name: :standalone_patient_id },
466
- smart_credentials: { name: :standalone_smart_credentials }
447
+ smart_auth_info: { name: :standalone_smart_auth_info }
467
448
  }
468
449
  }
469
450
 
@@ -489,9 +470,7 @@ module ONCCertificationG10TestKit
489
470
  config: {
490
471
  inputs: {
491
472
  id_token: { name: :standalone_id_token },
492
- client_id: { name: :standalone_client_id },
493
- requested_scopes: { name: :standalone_requested_scopes },
494
- smart_credentials: { name: :standalone_smart_credentials }
473
+ smart_auth_info: { name: :standalone_smart_auth_info }
495
474
  }
496
475
  }
497
476
 
@@ -501,9 +480,7 @@ module ONCCertificationG10TestKit
501
480
  config: {
502
481
  inputs: {
503
482
  id_token: { name: :standalone_id_token },
504
- client_id: { name: :standalone_client_id },
505
- requested_scopes: { name: :standalone_requested_scopes },
506
- smart_credentials: { name: :standalone_smart_credentials }
483
+ smart_auth_info: { name: :standalone_smart_auth_info }
507
484
  }
508
485
  }
509
486
 
@@ -512,9 +489,7 @@ module ONCCertificationG10TestKit
512
489
  config: {
513
490
  inputs: {
514
491
  id_token: { name: :standalone_id_token },
515
- client_id: { name: :standalone_client_id },
516
- requested_scopes: { name: :standalone_requested_scopes },
517
- smart_credentials: { name: :standalone_smart_credentials }
492
+ smart_auth_info: { name: :standalone_smart_auth_info }
518
493
  }
519
494
  }
520
495
 
@@ -523,9 +498,6 @@ module ONCCertificationG10TestKit
523
498
 
524
499
  config(
525
500
  inputs: {
526
- refresh_token: { name: :standalone_refresh_token },
527
- client_id: { name: :standalone_client_id },
528
- client_secret: { name: :standalone_client_secret },
529
501
  received_scopes: { name: :standalone_received_scopes }
530
502
  },
531
503
  outputs: {
@@ -534,7 +506,7 @@ module ONCCertificationG10TestKit
534
506
  access_token: { name: :standalone_access_token },
535
507
  token_retrieval_time: { name: :standalone_token_retrieval_time },
536
508
  expires_in: { name: :standalone_expires_in },
537
- smart_credentials: { name: :standalone_smart_credentials }
509
+ smart_auth_info: { name: :standalone_smart_auth_info }
538
510
  }
539
511
  )
540
512
 
@@ -542,7 +514,7 @@ module ONCCertificationG10TestKit
542
514
  config(
543
515
  inputs: {
544
516
  patient_id: { name: :standalone_patient_id },
545
- smart_credentials: { name: :standalone_smart_credentials }
517
+ smart_auth_info: { name: :standalone_smart_auth_info }
546
518
  },
547
519
  options: {
548
520
  refresh_test: true
@@ -559,7 +531,7 @@ module ONCCertificationG10TestKit
559
531
  inputs: {
560
532
  received_scopes: { name: :standalone_received_scopes },
561
533
  patient_id: { name: :standalone_patient_id },
562
- smart_credentials: { name: :standalone_smart_credentials }
534
+ smart_auth_info: { name: :standalone_smart_auth_info }
563
535
  }
564
536
  }
565
537
 
@@ -567,12 +539,12 @@ module ONCCertificationG10TestKit
567
539
  id :g10_standalone_credentials_export
568
540
  title 'Set SMART Credentials to Standalone Launch Credentials'
569
541
 
570
- input :standalone_smart_credentials, type: :oauth_credentials
542
+ input :standalone_smart_auth_info, type: :auth_info
571
543
  input :standalone_patient_id
572
- output :smart_credentials, :patient_id
544
+ output :smart_auth_info, :patient_id
573
545
 
574
546
  run do
575
- output smart_credentials: standalone_smart_credentials.to_s,
547
+ output smart_auth_info: standalone_smart_auth_info.to_s,
576
548
  patient_id: standalone_patient_id
577
549
  end
578
550
  end
@@ -15,7 +15,7 @@ module ONCCertificationG10TestKit
15
15
  input_instructions %(
16
16
  Register Inferno as a standalone application using the following information:
17
17
 
18
- * Redirect URI: `#{SMARTAppLaunch::AppRedirectTest.config.options[:redirect_uri]}`
18
+ * Redirect URI: `#{REDIRECT_URI}`
19
19
 
20
20
  Enter in the appropriate v1 scopes to enable patient-level access to all
21
21
  relevant resources. In addition, support for the OpenID Connect (openid
@@ -46,7 +46,7 @@ module ONCCertificationG10TestKit
46
46
  with Inferno used in a previous scenario, or register Inferno with a new
47
47
  `client_id` as a standalone client with the following information:
48
48
 
49
- * Redirect URI: `#{SMARTAppLaunch::AppRedirectTest.config.options[:redirect_uri]}`
49
+ * Redirect URI: `#{REDIRECT_URI}`
50
50
 
51
51
  )
52
52
 
@@ -55,46 +55,67 @@ module ONCCertificationG10TestKit
55
55
 
56
56
  config(
57
57
  inputs: {
58
- client_secret: {
59
- optional: false,
60
- name: :standalone_client_secret
61
- },
62
- requested_scopes: {
63
- name: :v1_requested_scopes,
64
- default: %(
65
- launch/patient openid fhirUser offline_access
66
- patient/Medication.read patient/AllergyIntolerance.read
67
- patient/CarePlan.read patient/CareTeam.read patient/Condition.read
68
- patient/Device.read patient/DiagnosticReport.read
69
- patient/DocumentReference.read patient/Encounter.read
70
- patient/Goal.read patient/Immunization.read patient/Location.read
71
- patient/MedicationRequest.read patient/Observation.read
72
- patient/Organization.read patient/Patient.read
73
- patient/Practitioner.read patient/Procedure.read
74
- patient/Provenance.read patient/PractitionerRole.read
75
- patient/Specimen.read patient/Coverage.read
76
- patient/MedicationDispense.read patient/ServiceRequest.read
77
- ).gsub(/\s{2,}/, ' ').strip
58
+ smart_auth_info: {
59
+ name: :v1_smart_auth_info,
60
+ title: 'Launch with v1 Scopes Credentials',
61
+ options: {
62
+ mode: 'auth',
63
+ components: [
64
+ {
65
+ name: :requested_scopes,
66
+ default: %(
67
+ launch/patient openid fhirUser offline_access
68
+ patient/Medication.read patient/AllergyIntolerance.read
69
+ patient/CarePlan.read patient/CareTeam.read
70
+ patient/Condition.read patient/Device.read
71
+ patient/DiagnosticReport.read patient/DocumentReference.read
72
+ patient/Encounter.read patient/Goal.read
73
+ patient/Immunization.read patient/Location.read
74
+ patient/MedicationRequest.read patient/Observation.read
75
+ patient/Organization.read patient/Patient.read
76
+ patient/Practitioner.read patient/Procedure.read
77
+ patient/Provenance.read patient/PractitionerRole.read
78
+ patient/Specimen.read patient/Coverage.read
79
+ patient/MedicationDispense.read patient/ServiceRequest.read
80
+ ).gsub(/\s{2,}/, ' ').strip
81
+ },
82
+ {
83
+ name: :auth_type,
84
+ default: 'symmetric',
85
+ locked: true
86
+ },
87
+ {
88
+ name: :auth_request_method,
89
+ default: 'GET',
90
+ locked: true
91
+ },
92
+ {
93
+ name: :use_discovery,
94
+ locked: true
95
+ },
96
+ {
97
+ name: :pkce_support,
98
+ default: 'enabled',
99
+ locked: true
100
+ },
101
+ {
102
+ name: :pkce_code_challenge_method,
103
+ default: 'S256',
104
+ locked: true
105
+ }
106
+ ]
107
+ }
78
108
  },
79
- received_scopes: { name: :v1_received_scopes },
80
- smart_credentials: { name: :v1_smart_credentials }
109
+ patient_id: { name: :v1_patient_id },
110
+ received_scopes: { name: :v1_received_scopes }
81
111
  },
82
112
  outputs: {
113
+ smart_auth_info: { name: :v1_smart_auth_info },
83
114
  received_scopes: { name: :v1_received_scopes },
84
115
  patient_id: { name: :v1_patient_id }
85
116
  }
86
117
  )
87
118
 
88
- input_order :url,
89
- :standalone_client_id,
90
- :standalone_client_secret,
91
- :v1_requested_scopes,
92
- :use_pkce,
93
- :pkce_code_challenge_method,
94
- :standalone_authorization_method,
95
- :client_auth_type,
96
- :client_auth_encryption_method
97
-
98
119
  group from: :smart_discovery_stu2 do
99
120
  required_suite_options(G10Options::SMART_2_REQUIREMENT)
100
121
  test from: 'g10_smart_well_known_capabilities',
@@ -140,30 +161,7 @@ module ONCCertificationG10TestKit
140
161
  end
141
162
 
142
163
  group from: :smart_standalone_launch_stu2,
143
- required_suite_options: G10Options::SMART_2_REQUIREMENT,
144
- config: {
145
- inputs: {
146
- use_pkce: {
147
- default: 'true',
148
- locked: true
149
- },
150
- pkce_code_challenge_method: {
151
- locked: true
152
- },
153
- authorization_method: {
154
- name: :standalone_authorization_method,
155
- default: 'get',
156
- locked: true
157
- },
158
- client_auth_type: {
159
- locked: true,
160
- default: 'confidential_symmetric'
161
- }
162
- },
163
- outputs: {
164
- smart_credentials: { name: :v1_smart_credentials }
165
- }
166
- } do
164
+ required_suite_options: G10Options::SMART_2_REQUIREMENT do
167
165
  title 'Standalone Launch With Patient Scope'
168
166
  description %(
169
167
  # Background
@@ -201,20 +199,9 @@ module ONCCertificationG10TestKit
201
199
  )
202
200
  end
203
201
 
204
- test from: :g10_unauthorized_access,
205
- config: {
206
- inputs: {
207
- patient_id: { name: :v1_patient_id }
208
- }
209
- }
202
+ test from: :g10_unauthorized_access
210
203
 
211
- test from: :g10_patient_context,
212
- config: {
213
- inputs: {
214
- patient_id: { name: :v1_patient_id },
215
- smart_credentials: { name: :v1_smart_credentials }
216
- }
217
- }
204
+ test from: :g10_patient_context
218
205
 
219
206
  tests[0].config(
220
207
  outputs: {
@@ -233,30 +220,7 @@ module ONCCertificationG10TestKit
233
220
  )
234
221
  end
235
222
  group from: :smart_standalone_launch_stu2_2, # rubocop:disable Naming/VariableNumber
236
- required_suite_options: G10Options::SMART_2_2_REQUIREMENT,
237
- config: {
238
- inputs: {
239
- use_pkce: {
240
- default: 'true',
241
- locked: true
242
- },
243
- pkce_code_challenge_method: {
244
- locked: true
245
- },
246
- authorization_method: {
247
- name: :standalone_authorization_method,
248
- default: 'get',
249
- locked: true
250
- },
251
- client_auth_type: {
252
- locked: true,
253
- default: 'confidential_symmetric'
254
- }
255
- },
256
- outputs: {
257
- smart_credentials: { name: :v1_smart_credentials }
258
- }
259
- } do
223
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT do
260
224
  title 'Standalone Launch With Patient Scope'
261
225
  description %(
262
226
  # Background
@@ -294,20 +258,9 @@ module ONCCertificationG10TestKit
294
258
  )
295
259
  end
296
260
 
297
- test from: :g10_unauthorized_access,
298
- config: {
299
- inputs: {
300
- patient_id: { name: :v1_patient_id }
301
- }
302
- }
261
+ test from: :g10_unauthorized_access
303
262
 
304
- test from: :g10_patient_context,
305
- config: {
306
- inputs: {
307
- patient_id: { name: :v1_patient_id },
308
- smart_credentials: { name: :v1_smart_credentials }
309
- }
310
- }
263
+ test from: :g10_patient_context
311
264
 
312
265
  tests[0].config(
313
266
  outputs: {
@@ -326,14 +279,7 @@ module ONCCertificationG10TestKit
326
279
  )
327
280
  end
328
281
 
329
- group from: :g10_unrestricted_resource_type_access,
330
- config: {
331
- inputs: {
332
- received_scopes: { name: :v1_received_scopes },
333
- patient_id: { name: :v1_patient_id },
334
- smart_credentials: { name: :v1_smart_credentials }
335
- }
336
- }
282
+ group from: :g10_unrestricted_resource_type_access
337
283
 
338
284
  test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
339
285
  id: :g10_auth_incorrectly_permitted_tls_versions_messages_setup,
@@ -212,22 +212,13 @@ module ONCCertificationG10TestKit
212
212
  workbook.worksheets[2]
213
213
  end
214
214
 
215
- def columns # rubocop:disable Metrics/CyclomaticComplexity
215
+ def columns
216
216
  @columns ||= [
217
217
  ['', 3, ->(_test) { '' }],
218
218
  ['', 3, ->(_test) { '' }],
219
219
  ['Inferno Test ID', 22, ->(test) { test.short_id.to_s }],
220
- ['Inferno Test Name', 65, ->(test) { test.title }],
221
- ['Inferno Test Description', 65, lambda do |test|
222
- description = test.description || ''
223
- natural_indent =
224
- description
225
- .lines
226
- .collect { |l| l.index(/[^ ]/) }
227
- .select { |l| !l.nil? && l.positive? }
228
- .min || 0
229
- description.lines.map { |l| l[natural_indent..] || "\n" }.join.strip
230
- end],
220
+ ['Inferno Test Name', 65, lambda(&:title)],
221
+ ['Inferno Test Description', 65, ->(test) { test.description&.strip }],
231
222
  ['Test Procedure Steps', 30, ->(test) { inferno_to_procedure_map[test.short_id].join(', ') }],
232
223
  ['Standard Version Filter', 30, lambda do |test|
233
224
  applicable_options(test).map(&:value).uniq.join(', ')