onc_certification_g10_test_kit 7.1.0 → 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 (54) hide show
  1. checksums.yaml +4 -4
  2. data/config/presets/g10_reference_server_preset.json +708 -532
  3. data/lib/onc_certification_g10_test_kit/bulk_data_authorization.rb +73 -67
  4. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu1.rb +1 -2
  5. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu2.rb +7 -1
  6. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_parameters.rb +1 -1
  7. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +10 -2
  8. data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +6 -2
  9. data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +4 -0
  10. data/lib/onc_certification_g10_test_kit/configuration_checker.rb +1 -1
  11. data/lib/onc_certification_g10_test_kit/encounter_context_test.rb +3 -3
  12. data/lib/onc_certification_g10_test_kit/export_kick_off_performer.rb +7 -3
  13. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +0 -4
  14. data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +8 -4
  15. data/lib/onc_certification_g10_test_kit/patient_context_test.rb +3 -3
  16. data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +3 -10
  17. data/lib/onc_certification_g10_test_kit/scope_constants.rb +52 -0
  18. data/lib/onc_certification_g10_test_kit/short_id_map.yml +11 -20
  19. data/lib/onc_certification_g10_test_kit/single_patient_api_group.rb +4 -4
  20. data/lib/onc_certification_g10_test_kit/single_patient_us_core_4_api_group.rb +4 -4
  21. data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +4 -4
  22. data/lib/onc_certification_g10_test_kit/single_patient_us_core_6_api_group.rb +4 -4
  23. data/lib/onc_certification_g10_test_kit/single_patient_us_core_7_api_group.rb +4 -4
  24. data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +107 -64
  25. data/lib/onc_certification_g10_test_kit/smart_asymmetric_launch_group.rb +41 -88
  26. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group.rb +31 -41
  27. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2.rb +30 -52
  28. data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2_2.rb +32 -53
  29. data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +99 -142
  30. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group.rb +16 -54
  31. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group_stu2_2.rb +16 -54
  32. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group.rb +16 -54
  33. data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group_stu2_2.rb +16 -54
  34. data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_group.rb +29 -64
  35. data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_test.rb +4 -3
  36. data/lib/onc_certification_g10_test_kit/smart_invalid_pkce_group.rb +39 -83
  37. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group.rb +42 -86
  38. data/lib/onc_certification_g10_test_kit/smart_invalid_token_group_stu2.rb +50 -88
  39. data/lib/onc_certification_g10_test_kit/smart_invalid_token_refresh_test.rb +9 -6
  40. data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +86 -278
  41. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group.rb +30 -57
  42. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2.rb +34 -73
  43. data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2_2.rb +34 -73
  44. data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +6 -1
  45. data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +88 -116
  46. data/lib/onc_certification_g10_test_kit/smart_v1_scopes_group.rb +60 -114
  47. data/lib/onc_certification_g10_test_kit/tasks/generate_matrix.rb +2 -11
  48. data/lib/onc_certification_g10_test_kit/token_introspection_group.rb +12 -25
  49. data/lib/onc_certification_g10_test_kit/token_introspection_group_stu2_2.rb +12 -14
  50. data/lib/onc_certification_g10_test_kit/token_revocation_group.rb +44 -33
  51. data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +3 -3
  52. data/lib/onc_certification_g10_test_kit/version.rb +2 -2
  53. data/lib/onc_certification_g10_test_kit.rb +104 -40
  54. metadata +9 -8
@@ -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
220
  ['Inferno Test Name', 65, lambda(&: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],
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(', ')
@@ -63,19 +63,21 @@ module ONCCertificationG10TestKit
63
63
  :well_known_introspection_url,
64
64
  :custom_authorization_header,
65
65
  :optional_introspection_request_params,
66
- :standalone_client_id,
67
- :standalone_client_secret,
68
- :authorization_method,
69
- :use_pkce,
70
- :pkce_code_challenge_method,
71
- :standalone_requested_scopes,
72
- :token_introspection_auth_type,
73
- :client_auth_encryption_method
66
+ :standalone_smart_auth_info
74
67
 
75
68
  config(
76
69
  inputs: {
77
- client_auth_type: {
78
- name: :token_introspection_auth_type
70
+ smart_auth_info: {
71
+ name: :standalone_smart_auth_info,
72
+ title: 'Standalone Launch Credentials',
73
+ options: {
74
+ components: [
75
+ {
76
+ name: :jwks,
77
+ locked: true
78
+ }
79
+ ]
80
+ }
79
81
  }
80
82
  }
81
83
  )
@@ -91,20 +93,5 @@ module ONCCertificationG10TestKit
91
93
  the correct HTTP response is returned but does not validate the contents
92
94
  of the token introspection response.
93
95
  DESCRIPTION
94
-
95
- # The token introspection tests are SMART v2 only, so they use v2 discovery
96
- # and launch groups. g10 needs them for SMART v1 and v2, so this sets the
97
- # original discovery and launch groups to only appear when using SMART v2,
98
- # and adds the v1 groups when using v1.
99
-
100
- groups.first.groups.each do |group|
101
- group.required_suite_options(G10Options::SMART_2_REQUIREMENT)
102
- end
103
-
104
- groups.first.group from: :smart_discovery,
105
- required_suite_options: G10Options::SMART_1_REQUIREMENT
106
-
107
- groups.first.group from: :smart_standalone_launch,
108
- required_suite_options: G10Options::SMART_1_REQUIREMENT
109
96
  end
110
97
  end
@@ -61,19 +61,21 @@ module ONCCertificationG10TestKit
61
61
  :well_known_introspection_url,
62
62
  :custom_authorization_header,
63
63
  :optional_introspection_request_params,
64
- :standalone_client_id,
65
- :standalone_client_secret,
66
- :authorization_method,
67
- :use_pkce,
68
- :pkce_code_challenge_method,
69
- :standalone_requested_scopes,
70
- :token_introspection_auth_type,
71
- :client_auth_encryption_method
64
+ :standalone_smart_auth_info
72
65
 
73
66
  config(
74
67
  inputs: {
75
- client_auth_type: {
76
- name: :token_introspection_auth_type
68
+ smart_auth_info: {
69
+ name: :standalone_smart_auth_info,
70
+ title: 'Standalone Launch Credentials',
71
+ options: {
72
+ components: [
73
+ {
74
+ name: :jwks,
75
+ locked: true
76
+ }
77
+ ]
78
+ }
77
79
  }
78
80
  }
79
81
  )
@@ -89,9 +91,5 @@ module ONCCertificationG10TestKit
89
91
  the correct HTTP response is returned but does not validate the contents
90
92
  of the token introspection response.
91
93
  DESCRIPTION
92
-
93
- groups.first.groups.each do |group|
94
- group.required_suite_options(G10Options::SMART_2_2_REQUIREMENT)
95
- end
96
94
  end
97
95
  end
@@ -11,13 +11,43 @@ module ONCCertificationG10TestKit
11
11
 
12
12
  input_order :token_revocation_attestation,
13
13
  :token_revocation_notes,
14
- :standalone_access_token,
15
- :standalone_refresh_token,
16
14
  :standalone_patient_id,
17
- :url,
18
- :smart_token_url,
19
- :standalone_client_id,
20
- :standalone_client_secret
15
+ :url
16
+
17
+ config(
18
+ inputs: {
19
+ smart_auth_info: {
20
+ title: 'Revoked Bearer Token',
21
+ description: 'Prior to the test, please revoke this bearer token from patient standalone launch.',
22
+ options: {
23
+ mode: 'access',
24
+ components: [
25
+ Inferno::DSL::AuthInfo.default_auth_type_component_without_backend_services,
26
+ {
27
+ name: :client_id,
28
+ locked: true
29
+ },
30
+ {
31
+ name: :client_secret,
32
+ locked: true
33
+ },
34
+ {
35
+ name: :refresh_token,
36
+ optional: false
37
+ },
38
+ {
39
+ name: :token_url,
40
+ optional: false
41
+ },
42
+ {
43
+ name: :jwks,
44
+ locked: true
45
+ }
46
+ ]
47
+ }
48
+ }
49
+ }
50
+ )
21
51
 
22
52
  test do
23
53
  title 'Health IT developer demonstrated the ability of the Health IT Module to revoke tokens within one hour of a patient\'s request.' # rubocop:disable Layout/LineLength
@@ -68,21 +98,18 @@ module ONCCertificationG10TestKit
68
98
  name: :standalone_patient_id,
69
99
  title: 'Patient ID',
70
100
  description: 'Patient ID associated with revoked tokens provided as context in the patient standalone launch. This will be used to verify access is no longer granted using the revoked token.' # rubocop:disable Layout/LineLength
71
- input :access_token,
72
- name: :standalone_access_token,
73
- title: 'Revoked Bearer Token',
74
- description: 'Prior to the test, please revoke this bearer token from patient standalone launch.'
101
+ input :smart_auth_info, type: :auth_info
75
102
 
76
103
  fhir_client :revoked_token do
77
104
  url :url
78
- bearer_token :access_token
105
+ auth_info :smart_auth_info
79
106
  end
80
107
 
81
108
  run do
82
109
  skip_if patient_id.blank?,
83
110
  'Patient ID not provided to test. The patient ID is typically provided ' \
84
111
  'during a SMART launch context.'
85
- skip_if access_token.blank?,
112
+ skip_if smart_auth_info.access_token.blank?,
86
113
  'Bearer token not provided. This test verifies that the bearer token can ' \
87
114
  'no longer be used to access a Patient resource.'
88
115
 
@@ -98,38 +125,22 @@ module ONCCertificationG10TestKit
98
125
  This test checks that refreshing token fails after token revocation.
99
126
  )
100
127
 
101
- input :smart_token_url,
102
- title: 'OAuth 2.0 Token Endpoint',
103
- description: 'OAuth token endpoint provided during the patient standalone launch'
104
- input :refresh_token,
105
- name: :standalone_refresh_token,
106
- title: 'Revoked Refresh Token',
107
- description: 'Prior to the test, please revoke this refresh token from patient standalone launch.'
108
- input :client_id,
109
- name: :standalone_client_id,
110
- title: 'Standalone Client ID',
111
- description: 'Client ID provided during registration of Inferno as a standalone application',
112
- locked: true
113
- input :client_secret,
114
- name: :standalone_client_secret,
115
- title: 'Standalone Client Secret',
116
- description: 'Client Secret provided during registration of Inferno as a standalone application',
117
- locked: true
128
+ input :smart_auth_info, type: :auth_info
118
129
 
119
130
  run do
120
- skip_if refresh_token.blank?,
131
+ skip_if smart_auth_info.refresh_token.blank?,
121
132
  'Refresh token not provided to test.'
122
133
  oauth2_params = {
123
134
  'grant_type' => 'refresh_token',
124
- 'refresh_token' => refresh_token
135
+ 'refresh_token' => smart_auth_info.refresh_token
125
136
  }
126
- client_credentials = "#{client_id}:#{client_secret}"
137
+ client_credentials = "#{smart_auth_info.client_id}:#{smart_auth_info.client_secret}"
127
138
  oauth2_headers = {
128
139
  'Content-Type' => 'application/x-www-form-urlencoded',
129
140
  'Authorization' => "Basic #{Base64.strict_encode64(client_credentials)}"
130
141
  }
131
142
 
132
- post(smart_token_url, body: oauth2_params, headers: oauth2_headers)
143
+ post(smart_auth_info.token_url, body: oauth2_params, headers: oauth2_headers)
133
144
 
134
145
  assert_response_status([400, 401])
135
146
  end
@@ -86,12 +86,12 @@ module ONCCertificationG10TestKit
86
86
  )
87
87
  id :g10_unrestricted_resource_type_access
88
88
 
89
- input :url, :smart_credentials, :patient_id, :received_scopes
90
- input :smart_credentials, type: :oauth_credentials
89
+ input :url, :patient_id, :received_scopes
90
+ input :smart_auth_info, type: 'auth_info'
91
91
 
92
92
  fhir_client do
93
93
  url :url
94
- oauth_credentials :smart_credentials
94
+ oauth_credentials :smart_auth_info
95
95
  end
96
96
 
97
97
  V5_EXCLUDED_RESOURCES = ['RelatedPerson'].freeze
@@ -1,4 +1,4 @@
1
1
  module ONCCertificationG10TestKit
2
- VERSION = '7.1.0'.freeze
3
- LAST_UPDATED = '2025-03-13'.freeze # TODO: update next release
2
+ VERSION = '7.2.0'.freeze
3
+ LAST_UPDATED = '2025-04-08'.freeze # TODO: update next release
4
4
  end
@@ -253,12 +253,6 @@ module ONCCertificationG10TestKit
253
253
  ]
254
254
 
255
255
  config(
256
- inputs: {
257
- client_auth_encryption_method: {
258
- title: 'Client Authentication Encryption Method',
259
- locked: true
260
- }
261
- },
262
256
  options: {
263
257
  post_authorization_uri: "#{Inferno::Application['base_url']}/custom/smart_stu2/post_auth",
264
258
  incorrectly_permitted_tls_version_message_type: 'warning'
@@ -337,7 +331,24 @@ module ONCCertificationG10TestKit
337
331
 
338
332
  group from: 'g10_smart_standalone_patient_app'
339
333
 
340
- group from: 'g10_smart_limited_app'
334
+ group from: 'g10_smart_limited_app' do
335
+ # This has to be configured here, otherwise the `smart_auth_info` config
336
+ # will get clobbered and will use `standalone_smart_auth_info` instead of
337
+ # `limited_smart_auth_info`
338
+ groups
339
+ .select { |group| group.id.include? 'smart_standalone_launch' }
340
+ .flat_map(&:tests)
341
+ .select { |test| test.id.include? 'g10_patient_context' }
342
+ .each do |test|
343
+ test
344
+ .config(
345
+ inputs: {
346
+ patient_id: { name: :limited_patient_id },
347
+ smart_auth_info: { name: :limited_smart_auth_info }
348
+ }
349
+ )
350
+ end
351
+ end
341
352
 
342
353
  group from: 'g10_smart_ehr_practitioner_app'
343
354
 
@@ -387,14 +398,6 @@ module ONCCertificationG10TestKit
387
398
  )
388
399
  end
389
400
 
390
- config(
391
- inputs: {
392
- client_auth_encryption_method: {
393
- locked: false
394
- }
395
- }
396
- )
397
-
398
401
  group from: :g10_public_standalone_launch,
399
402
  required_suite_options: G10Options::SMART_1_REQUIREMENT,
400
403
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
@@ -406,6 +409,7 @@ module ONCCertificationG10TestKit
406
409
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
407
410
 
408
411
  group from: :g10_token_revocation
412
+
409
413
  group from: :g10_smart_invalid_aud,
410
414
  config: { options: { redirect_message_proc: default_redirect_message_proc } }
411
415
 
@@ -445,34 +449,94 @@ module ONCCertificationG10TestKit
445
449
  required_suite_options: G10Options::SMART_2_2_REQUIREMENT
446
450
 
447
451
  group from: :g10_smart_v1_scopes,
448
- required_suite_options: G10Options::SMART_2_REQUIREMENT,
449
- config: {
450
- inputs: {
451
- client_auth_encryption_method: { locked: true }
452
- }
453
- }
452
+ required_suite_options: G10Options::SMART_2_REQUIREMENT
454
453
  group from: :g10_smart_v1_scopes,
455
454
  id: :g10_smart_v1_scopes_stu2_2, # rubocop:disable Naming/VariableNumber
456
- required_suite_options: G10Options::SMART_2_2_REQUIREMENT,
457
- config: {
458
- inputs: {
459
- client_auth_encryption_method: { locked: true }
460
- }
461
- }
455
+ required_suite_options: G10Options::SMART_2_2_REQUIREMENT
456
+
457
+ group from: :g10_smart_fine_grained_scopes, exclude_optional: true do
458
+ required_suite_options G10Options::SMART_2_REQUIREMENT.merge(G10Options::US_CORE_6_REQUIREMENT)
459
+ groups.first.config(
460
+ inputs: {
461
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
462
+ },
463
+ outputs: {
464
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
465
+ }
466
+ )
467
+
468
+ groups.last.config(
469
+ inputs: {
470
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
471
+ },
472
+ outputs: {
473
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
474
+ }
475
+ )
476
+ end
462
477
 
463
- group from: :g10_smart_fine_grained_scopes,
464
- required_suite_options: G10Options::SMART_2_REQUIREMENT.merge(G10Options::US_CORE_6_REQUIREMENT),
465
- exclude_optional: true
466
- group from: :g10_smart_fine_grained_scopes_stu2_2, # rubocop:disable Naming/VariableNumber
467
- required_suite_options: G10Options::SMART_2_2_REQUIREMENT.merge(G10Options::US_CORE_6_REQUIREMENT),
468
- exclude_optional: true
469
-
470
- group from: :g10_us_core_7_smart_fine_grained_scopes,
471
- required_suite_options: G10Options::SMART_2_REQUIREMENT.merge(G10Options::US_CORE_7_REQUIREMENT),
472
- exclude_optional: true
473
- group from: :g10_us_core_7_smart_fine_grained_scopes_stu2_2, # rubocop:disable Naming/VariableNumber
474
- required_suite_options: G10Options::SMART_2_2_REQUIREMENT.merge(G10Options::US_CORE_7_REQUIREMENT),
475
- exclude_optional: true
478
+ group from: :g10_smart_fine_grained_scopes_stu2_2, exclude_optional: true do # rubocop:disable Naming/VariableNumber
479
+ required_suite_options G10Options::SMART_2_2_REQUIREMENT.merge(G10Options::US_CORE_6_REQUIREMENT)
480
+ groups.first.config(
481
+ inputs: {
482
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
483
+ },
484
+ outputs: {
485
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
486
+ }
487
+ )
488
+
489
+ groups.last.config(
490
+ inputs: {
491
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
492
+ },
493
+ outputs: {
494
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
495
+ }
496
+ )
497
+ end
498
+
499
+ group from: :g10_us_core_7_smart_fine_grained_scopes, exclude_optional: true do
500
+ required_suite_options G10Options::SMART_2_REQUIREMENT.merge(G10Options::US_CORE_7_REQUIREMENT)
501
+ groups.first.config(
502
+ inputs: {
503
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
504
+ },
505
+ outputs: {
506
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
507
+ }
508
+ )
509
+
510
+ groups.last.config(
511
+ inputs: {
512
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
513
+ },
514
+ outputs: {
515
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
516
+ }
517
+ )
518
+ end
519
+
520
+ group from: :g10_us_core_7_smart_fine_grained_scopes_stu2_2, exclude_optional: true do # rubocop:disable Naming/VariableNumber
521
+ required_suite_options G10Options::SMART_2_2_REQUIREMENT.merge(G10Options::US_CORE_7_REQUIREMENT)
522
+ groups.first.config(
523
+ inputs: {
524
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
525
+ },
526
+ outputs: {
527
+ smart_auth_info: { name: :granular_scopes_1_auth_info }
528
+ }
529
+ )
530
+
531
+ groups.last.config(
532
+ inputs: {
533
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
534
+ },
535
+ outputs: {
536
+ smart_auth_info: { name: :granular_scopes_2_auth_info }
537
+ }
538
+ )
539
+ end
476
540
 
477
541
  group from: :g10_smart_granular_scope_selection,
478
542
  required_suite_options: G10Options::SMART_2_REQUIREMENT.merge(G10Options::US_CORE_6_REQUIREMENT)