onc_certification_g10_test_kit 3.0.1 → 3.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.
- checksums.yaml +4 -4
- data/lib/inferno/terminology/expected_manifest.yml +36 -693
- data/lib/inferno/terminology/fhir_package_manager.rb +16 -14
- data/lib/inferno/terminology/loader.rb +24 -2
- data/lib/inferno/terminology/tasks/download_umls.rb +2 -1
- data/lib/inferno/terminology/tasks/expand_value_set_to_file.rb +1 -1
- data/lib/inferno/terminology/tasks/run_umls_jar.rb +2 -1
- data/lib/inferno/terminology/value_set.rb +58 -56
- data/lib/onc_certification_g10_test_kit/base_token_refresh_group.rb +2 -0
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +2 -0
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu2.rb +1 -1
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +7 -4
- data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +2 -11
- data/lib/onc_certification_g10_test_kit/configuration_checker.rb +22 -0
- data/lib/onc_certification_g10_test_kit/export_kick_off_performer.rb +3 -2
- data/lib/onc_certification_g10_test_kit/g10_options.rb +46 -0
- data/lib/onc_certification_g10_test_kit/incorrectly_permitted_tls_versions_messages_setup_test.rb +34 -0
- data/lib/onc_certification_g10_test_kit/limited_scope_grant_test.rb +3 -1
- data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +11 -0
- data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +10 -0
- data/lib/onc_certification_g10_test_kit/onc_program_procedure.yml +1502 -658
- data/lib/onc_certification_g10_test_kit/profile_selector.rb +34 -24
- data/lib/onc_certification_g10_test_kit/resource_access_test.rb +1 -2
- data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +2 -2
- data/lib/onc_certification_g10_test_kit/short_id_manager.rb +46 -0
- data/lib/onc_certification_g10_test_kit/short_id_map.yml +1536 -0
- data/lib/onc_certification_g10_test_kit/single_patient_api_group.rb +7 -0
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_4_api_group.rb +7 -0
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +9 -2
- data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +2 -2
- data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +61 -6
- data/lib/onc_certification_g10_test_kit/smart_invalid_token_refresh_test.rb +37 -0
- data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +3 -2
- data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +4 -2
- data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +60 -4
- data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +7 -4
- data/lib/onc_certification_g10_test_kit/version.rb +1 -1
- data/lib/onc_certification_g10_test_kit/visual_inspection_and_attestations_group.rb +88 -2
- data/lib/onc_certification_g10_test_kit/well_known_capabilities_test.rb +4 -2
- data/lib/onc_certification_g10_test_kit.rb +25 -20
- metadata +15 -10
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
|
2
|
+
|
1
3
|
module ONCCertificationG10TestKit
|
2
4
|
class SinglePatientAPIGroup < Inferno::TestGroup
|
3
5
|
id :g10_single_patient_api
|
@@ -79,6 +81,9 @@ module ONCCertificationG10TestKit
|
|
79
81
|
|
80
82
|
USCoreTestKit::USCoreV311::USCoreTestSuite.groups.each do |group|
|
81
83
|
test_group = group.ancestors[1]
|
84
|
+
|
85
|
+
next if test_group.optional?
|
86
|
+
|
82
87
|
id = test_group.id
|
83
88
|
|
84
89
|
group_config = {}
|
@@ -89,5 +94,7 @@ module ONCCertificationG10TestKit
|
|
89
94
|
|
90
95
|
group(from: id, exclude_optional: true, config: group_config)
|
91
96
|
end
|
97
|
+
|
98
|
+
test from: :g10_incorrectly_permitted_tls_versions_messages_setup
|
92
99
|
end
|
93
100
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
|
2
|
+
|
1
3
|
module ONCCertificationG10TestKit
|
2
4
|
class SinglePatientUSCore4APIGroup < Inferno::TestGroup
|
3
5
|
id :g10_single_patient_us_core_4_api
|
@@ -79,6 +81,9 @@ module ONCCertificationG10TestKit
|
|
79
81
|
|
80
82
|
USCoreTestKit::USCoreV400::USCoreTestSuite.groups.each do |group|
|
81
83
|
test_group = group.ancestors[1]
|
84
|
+
|
85
|
+
next if test_group.optional?
|
86
|
+
|
82
87
|
id = test_group.id
|
83
88
|
|
84
89
|
group_config = {}
|
@@ -89,5 +94,7 @@ module ONCCertificationG10TestKit
|
|
89
94
|
|
90
95
|
group(from: id, exclude_optional: true, config: group_config)
|
91
96
|
end
|
97
|
+
|
98
|
+
test from: :g10_incorrectly_permitted_tls_versions_messages_setup
|
92
99
|
end
|
93
100
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
|
2
|
+
|
1
3
|
module ONCCertificationG10TestKit
|
2
4
|
class SinglePatientUSCore5APIGroup < Inferno::TestGroup
|
3
5
|
id :g10_single_patient_us_core_5_api
|
@@ -6,7 +8,7 @@ module ONCCertificationG10TestKit
|
|
6
8
|
For each of the relevant USCDI data elements provided in the
|
7
9
|
CapabilityStatement, this test executes the [required supported
|
8
10
|
searches](http://hl7.org/fhir/us/core/STU4/CapabilityStatement-us-core-server.html)
|
9
|
-
as defined by the US Core Implementation Guide
|
11
|
+
as defined by the US Core Implementation Guide v5.0.1.
|
10
12
|
|
11
13
|
The test begins by searching by one or more patients, with the expectation
|
12
14
|
that the Bearer token provided to the test grants access to all USCDI
|
@@ -14,7 +16,7 @@ module ONCCertificationG10TestKit
|
|
14
16
|
queries and checks that the results are consistent with the provided
|
15
17
|
search parameters. It then performs a read on each Resource returned and
|
16
18
|
validates the response against the relevant
|
17
|
-
[profile](http://hl7.org/fhir/us/core/
|
19
|
+
[profile](http://hl7.org/fhir/us/core/STU5.0.1/profiles-and-extensions.html)
|
18
20
|
as currently defined in the US Core Implementation Guide.
|
19
21
|
|
20
22
|
All MUST SUPPORT elements must be seen before the test can pass, as well
|
@@ -79,6 +81,9 @@ module ONCCertificationG10TestKit
|
|
79
81
|
|
80
82
|
USCoreTestKit::USCoreV501::USCoreTestSuite.groups.each do |group|
|
81
83
|
test_group = group.ancestors[1]
|
84
|
+
|
85
|
+
next if test_group.optional?
|
86
|
+
|
82
87
|
id = test_group.id
|
83
88
|
|
84
89
|
group_config = {}
|
@@ -89,5 +94,7 @@ module ONCCertificationG10TestKit
|
|
89
94
|
|
90
95
|
group(from: id, exclude_optional: true, config: group_config)
|
91
96
|
end
|
97
|
+
|
98
|
+
test from: :g10_incorrectly_permitted_tls_versions_messages_setup
|
92
99
|
end
|
93
100
|
end
|
@@ -91,7 +91,7 @@ module ONCCertificationG10TestKit
|
|
91
91
|
:smart_authorization_url
|
92
92
|
|
93
93
|
test from: :smart_app_redirect do
|
94
|
-
required_suite_options
|
94
|
+
required_suite_options G10Options::SMART_1_REQUIREMENT
|
95
95
|
|
96
96
|
input :client_secret,
|
97
97
|
name: :standalone_client_secret,
|
@@ -118,7 +118,7 @@ module ONCCertificationG10TestKit
|
|
118
118
|
end
|
119
119
|
|
120
120
|
test from: :smart_app_redirect_stu2 do
|
121
|
-
required_suite_options
|
121
|
+
required_suite_options G10Options::SMART_2_REQUIREMENT
|
122
122
|
|
123
123
|
config(
|
124
124
|
inputs: {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative 'base_token_refresh_group'
|
2
|
+
require_relative 'smart_invalid_token_refresh_test'
|
2
3
|
require_relative 'smart_scopes_test'
|
3
4
|
require_relative 'unauthorized_access_test'
|
4
5
|
require_relative 'well_known_capabilities_test'
|
@@ -59,7 +60,7 @@ module ONCCertificationG10TestKit
|
|
59
60
|
input_order :url, :ehr_client_id, :ehr_client_secret
|
60
61
|
|
61
62
|
group from: :smart_discovery do
|
62
|
-
required_suite_options(
|
63
|
+
required_suite_options(G10Options::SMART_1_REQUIREMENT)
|
63
64
|
|
64
65
|
test from: 'g10_smart_well_known_capabilities',
|
65
66
|
config: {
|
@@ -79,7 +80,7 @@ module ONCCertificationG10TestKit
|
|
79
80
|
end
|
80
81
|
|
81
82
|
group from: :smart_discovery_stu2 do
|
82
|
-
required_suite_options(
|
83
|
+
required_suite_options(G10Options::SMART_2_REQUIREMENT)
|
83
84
|
|
84
85
|
test from: 'g10_smart_well_known_capabilities',
|
85
86
|
config: {
|
@@ -102,7 +103,7 @@ module ONCCertificationG10TestKit
|
|
102
103
|
end
|
103
104
|
|
104
105
|
group from: :smart_ehr_launch do
|
105
|
-
required_suite_options(
|
106
|
+
required_suite_options(G10Options::SMART_1_REQUIREMENT)
|
106
107
|
|
107
108
|
title 'EHR Launch With Practitioner Scope'
|
108
109
|
input :client_secret,
|
@@ -172,7 +173,7 @@ module ONCCertificationG10TestKit
|
|
172
173
|
access_token: { name: :ehr_access_token }
|
173
174
|
}
|
174
175
|
},
|
175
|
-
required_suite_options:
|
176
|
+
required_suite_options: G10Options::US_CORE_5_REQUIREMENT
|
176
177
|
|
177
178
|
test do
|
178
179
|
title 'Launch context contains smart_style_url which links to valid JSON'
|
@@ -220,6 +221,22 @@ module ONCCertificationG10TestKit
|
|
220
221
|
'Token response did not contain `need_patient_banner`'
|
221
222
|
end
|
222
223
|
end
|
224
|
+
|
225
|
+
tests[2].config(
|
226
|
+
outputs: {
|
227
|
+
incorrectly_permitted_tls_versions_messages: {
|
228
|
+
name: :auth_incorrectly_permitted_tls_versions_messages
|
229
|
+
}
|
230
|
+
}
|
231
|
+
)
|
232
|
+
|
233
|
+
tests[5].config(
|
234
|
+
outputs: {
|
235
|
+
incorrectly_permitted_tls_versions_messages: {
|
236
|
+
name: :token_incorrectly_permitted_tls_versions_messages
|
237
|
+
}
|
238
|
+
}
|
239
|
+
)
|
223
240
|
end
|
224
241
|
|
225
242
|
group from: :smart_ehr_launch_stu2,
|
@@ -239,7 +256,7 @@ module ONCCertificationG10TestKit
|
|
239
256
|
}
|
240
257
|
}
|
241
258
|
} do
|
242
|
-
required_suite_options(
|
259
|
+
required_suite_options(G10Options::SMART_2_REQUIREMENT)
|
243
260
|
|
244
261
|
title 'EHR Launch With Practitioner Scope'
|
245
262
|
input :client_secret,
|
@@ -308,7 +325,7 @@ module ONCCertificationG10TestKit
|
|
308
325
|
access_token: { name: :ehr_access_token }
|
309
326
|
}
|
310
327
|
},
|
311
|
-
required_suite_options:
|
328
|
+
required_suite_options: G10Options::US_CORE_5_REQUIREMENT
|
312
329
|
|
313
330
|
test do
|
314
331
|
title 'Launch context contains smart_style_url which links to valid JSON'
|
@@ -356,6 +373,22 @@ module ONCCertificationG10TestKit
|
|
356
373
|
'Token response did not contain `need_patient_banner`'
|
357
374
|
end
|
358
375
|
end
|
376
|
+
|
377
|
+
tests[2].config(
|
378
|
+
outputs: {
|
379
|
+
incorrectly_permitted_tls_versions_messages: {
|
380
|
+
name: :auth_incorrectly_permitted_tls_versions_messages
|
381
|
+
}
|
382
|
+
}
|
383
|
+
)
|
384
|
+
|
385
|
+
tests[5].config(
|
386
|
+
outputs: {
|
387
|
+
incorrectly_permitted_tls_versions_messages: {
|
388
|
+
name: :token_incorrectly_permitted_tls_versions_messages
|
389
|
+
}
|
390
|
+
}
|
391
|
+
)
|
359
392
|
end
|
360
393
|
|
361
394
|
group from: :smart_openid_connect,
|
@@ -399,6 +432,8 @@ module ONCCertificationG10TestKit
|
|
399
432
|
)
|
400
433
|
uses_request :token_refresh
|
401
434
|
end
|
435
|
+
|
436
|
+
test from: :g10_invalid_token_refresh
|
402
437
|
end
|
403
438
|
|
404
439
|
test do
|
@@ -414,5 +449,25 @@ module ONCCertificationG10TestKit
|
|
414
449
|
patient_id: ehr_patient_id
|
415
450
|
end
|
416
451
|
end
|
452
|
+
|
453
|
+
test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
|
454
|
+
id: :g10_auth_incorrectly_permitted_tls_versions_messages_setup,
|
455
|
+
config: {
|
456
|
+
inputs: {
|
457
|
+
incorrectly_permitted_tls_versions_messages: {
|
458
|
+
name: :auth_incorrectly_permitted_tls_versions_messages
|
459
|
+
}
|
460
|
+
}
|
461
|
+
}
|
462
|
+
|
463
|
+
test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
|
464
|
+
id: :g10_token_incorrectly_permitted_tls_versions_messages_setup,
|
465
|
+
config: {
|
466
|
+
inputs: {
|
467
|
+
incorrectly_permitted_tls_versions_messages: {
|
468
|
+
name: :token_incorrectly_permitted_tls_versions_messages
|
469
|
+
}
|
470
|
+
}
|
471
|
+
}
|
417
472
|
end
|
418
473
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module ONCCertificationG10TestKit
|
2
|
+
class SMARTInvalidTokenRefreshTest < Inferno::Test
|
3
|
+
id :g10_invalid_token_refresh
|
4
|
+
title 'Refresh token exchange fails when supplied an invalid refresh token'
|
5
|
+
description %(
|
6
|
+
If the request failed verification or is invalid, the authorization server
|
7
|
+
returns an error response.
|
8
|
+
|
9
|
+
[OAuth 2.0 RFC (6749)](https://www.rfc-editor.org/rfc/rfc6749#section-6)
|
10
|
+
)
|
11
|
+
input :refresh_token, :smart_token_url, :client_id, :received_scopes
|
12
|
+
input :client_secret, optional: true
|
13
|
+
|
14
|
+
run do
|
15
|
+
skip_if refresh_token.blank?, 'No refresh token was received'
|
16
|
+
|
17
|
+
oauth2_params = {
|
18
|
+
'grant_type' => 'refresh_token',
|
19
|
+
'refresh_token' => SecureRandom.uuid
|
20
|
+
}
|
21
|
+
oauth2_headers = { 'Content-Type' => 'application/x-www-form-urlencoded' }
|
22
|
+
|
23
|
+
oauth2_params['scope'] = received_scopes if config.options[:include_scopes]
|
24
|
+
|
25
|
+
if client_secret.present?
|
26
|
+
credentials = Base64.strict_encode64("#{client_id}:#{client_secret}")
|
27
|
+
oauth2_headers['Authorization'] = "Basic #{credentials}"
|
28
|
+
else
|
29
|
+
oauth2_params['client_id'] = client_id
|
30
|
+
end
|
31
|
+
|
32
|
+
post(smart_token_url, body: oauth2_params, headers: oauth2_headers)
|
33
|
+
|
34
|
+
assert_response_status([400, 401])
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require_relative 'g10_options'
|
1
2
|
require_relative 'patient_context_test'
|
2
3
|
require_relative 'limited_scope_grant_test'
|
3
4
|
require_relative 'restricted_resource_type_access_group'
|
@@ -80,7 +81,7 @@ module ONCCertificationG10TestKit
|
|
80
81
|
Sequence](http://hl7.org/fhir/smart-app-launch/1.0.0/index.html#standalone-launch-sequence)
|
81
82
|
)
|
82
83
|
|
83
|
-
required_suite_options
|
84
|
+
required_suite_options G10Options::SMART_1_REQUIREMENT
|
84
85
|
|
85
86
|
config(
|
86
87
|
inputs: {
|
@@ -203,7 +204,7 @@ module ONCCertificationG10TestKit
|
|
203
204
|
Sequence](http://hl7.org/fhir/smart-app-launch/STU2/app-launch.html#launch-app-standalone-launch)
|
204
205
|
)
|
205
206
|
|
206
|
-
required_suite_options
|
207
|
+
required_suite_options G10Options::SMART_2_REQUIREMENT
|
207
208
|
|
208
209
|
config(
|
209
210
|
inputs: {
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module ONCCertificationG10TestKit
|
2
2
|
class SMARTScopesTest < Inferno::Test
|
3
|
+
include G10Options
|
4
|
+
|
3
5
|
title 'Patient-level access with OpenID Connect and Refresh Token scopes used.'
|
4
6
|
description %(
|
5
7
|
The scopes being input must follow the guidelines specified in the
|
@@ -62,13 +64,13 @@ module ONCCertificationG10TestKit
|
|
62
64
|
(PATIENT_COMPARTMENT_RESOURCE_TYPES + ['ServiceRequest']).freeze
|
63
65
|
|
64
66
|
def patient_compartment_resource_types
|
65
|
-
return PATIENT_COMPARTMENT_RESOURCE_TYPES unless
|
67
|
+
return PATIENT_COMPARTMENT_RESOURCE_TYPES unless using_us_core_5?
|
66
68
|
|
67
69
|
V5_PATIENT_COMPARTMENT_RESOURCE_TYPES
|
68
70
|
end
|
69
71
|
|
70
72
|
def valid_resource_types
|
71
|
-
return VALID_RESOURCE_TYPES unless
|
73
|
+
return VALID_RESOURCE_TYPES unless using_us_core_5?
|
72
74
|
|
73
75
|
V5_VALID_RESOURCE_TYPES
|
74
76
|
end
|
@@ -1,9 +1,11 @@
|
|
1
1
|
require_relative 'base_token_refresh_group'
|
2
2
|
require_relative 'patient_context_test'
|
3
|
+
require_relative 'smart_invalid_token_refresh_test'
|
3
4
|
require_relative 'smart_scopes_test'
|
4
5
|
require_relative 'unauthorized_access_test'
|
5
6
|
require_relative 'unrestricted_resource_type_access_group'
|
6
7
|
require_relative 'well_known_capabilities_test'
|
8
|
+
require_relative 'incorrectly_permitted_tls_versions_messages_setup_test'
|
7
9
|
|
8
10
|
module ONCCertificationG10TestKit
|
9
11
|
class SmartStandalonePatientAppGroup < Inferno::TestGroup
|
@@ -55,7 +57,7 @@ module ONCCertificationG10TestKit
|
|
55
57
|
input_order :url, :standalone_client_id, :standalone_client_secret
|
56
58
|
|
57
59
|
group from: :smart_discovery do
|
58
|
-
required_suite_options(
|
60
|
+
required_suite_options(G10Options::SMART_1_REQUIREMENT)
|
59
61
|
|
60
62
|
test from: 'g10_smart_well_known_capabilities',
|
61
63
|
config: {
|
@@ -74,7 +76,7 @@ module ONCCertificationG10TestKit
|
|
74
76
|
end
|
75
77
|
|
76
78
|
group from: :smart_discovery_stu2 do
|
77
|
-
required_suite_options(
|
79
|
+
required_suite_options(G10Options::SMART_2_REQUIREMENT)
|
78
80
|
|
79
81
|
test from: 'g10_smart_well_known_capabilities',
|
80
82
|
config: {
|
@@ -97,7 +99,7 @@ module ONCCertificationG10TestKit
|
|
97
99
|
end
|
98
100
|
|
99
101
|
group from: :smart_standalone_launch do
|
100
|
-
required_suite_options(
|
102
|
+
required_suite_options(G10Options::SMART_1_REQUIREMENT)
|
101
103
|
|
102
104
|
title 'Standalone Launch With Patient Scope'
|
103
105
|
description %(
|
@@ -178,6 +180,22 @@ module ONCCertificationG10TestKit
|
|
178
180
|
smart_credentials: { name: :standalone_smart_credentials }
|
179
181
|
}
|
180
182
|
}
|
183
|
+
|
184
|
+
tests[0].config(
|
185
|
+
outputs: {
|
186
|
+
incorrectly_permitted_tls_versions_messages: {
|
187
|
+
name: :auth_incorrectly_permitted_tls_versions_messages
|
188
|
+
}
|
189
|
+
}
|
190
|
+
)
|
191
|
+
|
192
|
+
tests[3].config(
|
193
|
+
outputs: {
|
194
|
+
incorrectly_permitted_tls_versions_messages: {
|
195
|
+
name: :token_incorrectly_permitted_tls_versions_messages
|
196
|
+
}
|
197
|
+
}
|
198
|
+
)
|
181
199
|
end
|
182
200
|
|
183
201
|
group from: :smart_standalone_launch_stu2,
|
@@ -197,7 +215,7 @@ module ONCCertificationG10TestKit
|
|
197
215
|
}
|
198
216
|
}
|
199
217
|
} do
|
200
|
-
required_suite_options(
|
218
|
+
required_suite_options(G10Options::SMART_2_REQUIREMENT)
|
201
219
|
|
202
220
|
title 'Standalone Launch With Patient Scope'
|
203
221
|
description %(
|
@@ -278,6 +296,22 @@ module ONCCertificationG10TestKit
|
|
278
296
|
smart_credentials: { name: :standalone_smart_credentials }
|
279
297
|
}
|
280
298
|
}
|
299
|
+
|
300
|
+
tests[0].config(
|
301
|
+
outputs: {
|
302
|
+
incorrectly_permitted_tls_versions_messages: {
|
303
|
+
name: :auth_incorrectly_permitted_tls_versions_messages
|
304
|
+
}
|
305
|
+
}
|
306
|
+
)
|
307
|
+
|
308
|
+
tests[3].config(
|
309
|
+
outputs: {
|
310
|
+
incorrectly_permitted_tls_versions_messages: {
|
311
|
+
name: :token_incorrectly_permitted_tls_versions_messages
|
312
|
+
}
|
313
|
+
}
|
314
|
+
)
|
281
315
|
end
|
282
316
|
|
283
317
|
group from: :smart_openid_connect,
|
@@ -322,6 +356,8 @@ module ONCCertificationG10TestKit
|
|
322
356
|
)
|
323
357
|
uses_request :token_refresh
|
324
358
|
end
|
359
|
+
|
360
|
+
test from: :g10_invalid_token_refresh
|
325
361
|
end
|
326
362
|
|
327
363
|
group from: :g10_unrestricted_resource_type_access,
|
@@ -346,5 +382,25 @@ module ONCCertificationG10TestKit
|
|
346
382
|
patient_id: standalone_patient_id
|
347
383
|
end
|
348
384
|
end
|
385
|
+
|
386
|
+
test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
|
387
|
+
id: :g10_auth_incorrectly_permitted_tls_versions_messages_setup,
|
388
|
+
config: {
|
389
|
+
inputs: {
|
390
|
+
incorrectly_permitted_tls_versions_messages: {
|
391
|
+
name: :auth_incorrectly_permitted_tls_versions_messages
|
392
|
+
}
|
393
|
+
}
|
394
|
+
}
|
395
|
+
|
396
|
+
test from: :g10_incorrectly_permitted_tls_versions_messages_setup,
|
397
|
+
id: :g10_token_incorrectly_permitted_tls_versions_messages_setup,
|
398
|
+
config: {
|
399
|
+
inputs: {
|
400
|
+
incorrectly_permitted_tls_versions_messages: {
|
401
|
+
name: :token_incorrectly_permitted_tls_versions_messages
|
402
|
+
}
|
403
|
+
}
|
404
|
+
}
|
349
405
|
end
|
350
406
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require_relative 'g10_options'
|
1
2
|
require_relative 'resource_access_test'
|
2
3
|
|
3
4
|
module ONCCertificationG10TestKit
|
@@ -111,6 +112,8 @@ module ONCCertificationG10TestKit
|
|
111
112
|
(NON_PATIENT_COMPARTMENT_RESOURCES - ['Encounter'] + ['ServiceRequest']).freeze
|
112
113
|
|
113
114
|
test do
|
115
|
+
include G10Options
|
116
|
+
|
114
117
|
title 'Scope granted enables access to all US Core resource types.'
|
115
118
|
description %(
|
116
119
|
This test confirms that the scopes granted during authorization are
|
@@ -118,13 +121,13 @@ module ONCCertificationG10TestKit
|
|
118
121
|
)
|
119
122
|
|
120
123
|
def all_resources
|
121
|
-
return V5_ALL_RESOURCES if
|
124
|
+
return V5_ALL_RESOURCES if using_us_core_5?
|
122
125
|
|
123
126
|
ALL_RESOURCES
|
124
127
|
end
|
125
128
|
|
126
129
|
def non_patient_compartment_resources
|
127
|
-
return V5_NON_PATIENT_COMPARTMENT_RESOURCES if
|
130
|
+
return V5_NON_PATIENT_COMPARTMENT_RESOURCES if using_us_core_5?
|
128
131
|
|
129
132
|
NON_PATIENT_COMPARTMENT_RESOURCES
|
130
133
|
end
|
@@ -335,7 +338,7 @@ module ONCCertificationG10TestKit
|
|
335
338
|
)
|
336
339
|
id :g10_encounter_unrestricted_access
|
337
340
|
|
338
|
-
required_suite_options
|
341
|
+
required_suite_options G10Options::US_CORE_5_REQUIREMENT
|
339
342
|
|
340
343
|
def resource_group
|
341
344
|
USCoreTestKit::USCoreV501::EncounterGroup
|
@@ -349,7 +352,7 @@ module ONCCertificationG10TestKit
|
|
349
352
|
)
|
350
353
|
id :g10_service_request_unrestricted_access
|
351
354
|
|
352
|
-
required_suite_options
|
355
|
+
required_suite_options G10Options::US_CORE_5_REQUIREMENT
|
353
356
|
|
354
357
|
def resource_group
|
355
358
|
USCoreTestKit::USCoreV501::ServiceRequestGroup
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require_relative 'g10_options'
|
2
|
+
|
1
3
|
module ONCCertificationG10TestKit
|
2
4
|
class VisualInspectionAndAttestationsGroup < Inferno::TestGroup
|
3
5
|
title 'Visual Inspection and Attestation'
|
@@ -374,7 +376,7 @@ module ONCCertificationG10TestKit
|
|
374
376
|
)
|
375
377
|
id 'Test11'
|
376
378
|
|
377
|
-
required_suite_options
|
379
|
+
required_suite_options G10Options::US_CORE_3_REQUIREMENT
|
378
380
|
|
379
381
|
input :patient_suffix_attestation,
|
380
382
|
title: 'Health IT developer demonstrates support for the Patient Demographics Suffix USCDI v1 element.',
|
@@ -416,7 +418,7 @@ module ONCCertificationG10TestKit
|
|
416
418
|
)
|
417
419
|
id 'Test12'
|
418
420
|
|
419
|
-
required_suite_options
|
421
|
+
required_suite_options G10Options::US_CORE_3_REQUIREMENT
|
420
422
|
|
421
423
|
input :patient_previous_name_attestation,
|
422
424
|
title: 'Health IT developer demonstrates support for the Patient Demographics Previous Name USCDI v1 element.', # rubocop:disable Layout/LineLength
|
@@ -486,5 +488,89 @@ module ONCCertificationG10TestKit
|
|
486
488
|
pass native_refresh_notes if native_refresh_notes.present?
|
487
489
|
end
|
488
490
|
end
|
491
|
+
|
492
|
+
test do
|
493
|
+
title 'Health IT developer demonstrates the public location of its base URLs'
|
494
|
+
description %(
|
495
|
+
To fulfill the API Maintenance of Certification requirement at §
|
496
|
+
170.404(b)(2), the health IT developer demonstrates the public location
|
497
|
+
of its certified API technology service base URLs.
|
498
|
+
)
|
499
|
+
id :g10_public_url_attestation
|
500
|
+
input :public_url_attestation,
|
501
|
+
title: 'Health IT developer demonstrates the public location of its certified API technology service base URLs', # rubocop:disable Layout/LineLength
|
502
|
+
type: 'radio',
|
503
|
+
default: 'false',
|
504
|
+
options: {
|
505
|
+
list_options: [
|
506
|
+
{
|
507
|
+
label: 'Yes',
|
508
|
+
value: 'true'
|
509
|
+
},
|
510
|
+
{
|
511
|
+
label: 'No',
|
512
|
+
value: 'false'
|
513
|
+
}
|
514
|
+
]
|
515
|
+
}
|
516
|
+
input :public_url_attestation_notes,
|
517
|
+
title: 'Notes, if applicable:',
|
518
|
+
type: 'textarea',
|
519
|
+
optional: true
|
520
|
+
|
521
|
+
run do
|
522
|
+
assert public_url_attestation == 'true',
|
523
|
+
'Health IT developer did not demonstrate the public location of its certified API technology service base URLs.' # rubocop:disable Layout/LineLength
|
524
|
+
pass public_url_attestation_notes if public_url_attestation_notes.present?
|
525
|
+
end
|
526
|
+
end
|
527
|
+
|
528
|
+
test do
|
529
|
+
title 'TLS version 1.2 or above must be enforced'
|
530
|
+
description %(
|
531
|
+
If TLS connections below version 1.2 have been allowed in any previous
|
532
|
+
tests, Health IT developers must document how the Health IT Module
|
533
|
+
enforces TLS version 1.2 or above.
|
534
|
+
|
535
|
+
If no TLS connections below version 1.2 have been allowed, no
|
536
|
+
documentation is necessary and this test will automatically pass.
|
537
|
+
)
|
538
|
+
id :g10_tls_version_attestation
|
539
|
+
input :unique_incorrectly_permitted_tls_versions_messages,
|
540
|
+
title: 'TLS Issues',
|
541
|
+
type: 'textarea',
|
542
|
+
locked: true,
|
543
|
+
optional: true
|
544
|
+
input :tls_documentation_required,
|
545
|
+
title: 'Health IT developers must document how the Health IT Module enforces TLs version 1.2 or above',
|
546
|
+
type: 'radio',
|
547
|
+
default: 'false',
|
548
|
+
locked: true,
|
549
|
+
options: {
|
550
|
+
list_options: [
|
551
|
+
{
|
552
|
+
label: 'Yes',
|
553
|
+
value: 'true'
|
554
|
+
},
|
555
|
+
{
|
556
|
+
label: 'No',
|
557
|
+
value: 'false'
|
558
|
+
}
|
559
|
+
]
|
560
|
+
}
|
561
|
+
input :tls_version_attestation_notes,
|
562
|
+
title: 'Document how TLS version 1.2 or above is enforced, if required:',
|
563
|
+
type: 'textarea',
|
564
|
+
optional: true
|
565
|
+
|
566
|
+
run do
|
567
|
+
if tls_documentation_required == 'true'
|
568
|
+
assert tls_version_attestation_notes.present?,
|
569
|
+
'Health IT developer did not document how the system under test enforces TLS version 1.2 or above'
|
570
|
+
end
|
571
|
+
|
572
|
+
pass tls_version_attestation_notes if tls_version_attestation_notes.present?
|
573
|
+
end
|
574
|
+
end
|
489
575
|
end
|
490
576
|
end
|
@@ -1,5 +1,7 @@
|
|
1
1
|
module ONCCertificationG10TestKit
|
2
2
|
class SMARTWellKnownCapabilitiesTest < Inferno::Test
|
3
|
+
include G10Options
|
4
|
+
|
3
5
|
title 'Well-known configuration declares support for required capabilities'
|
4
6
|
description %(
|
5
7
|
A SMART on FHIR server SHALL convey its capabilities to app developers
|
@@ -21,8 +23,8 @@ module ONCCertificationG10TestKit
|
|
21
23
|
|
22
24
|
required_capabilities = config.options[:required_capabilities] || []
|
23
25
|
|
24
|
-
if
|
25
|
-
required_capabilities
|
26
|
+
if using_us_core_5? && required_capabilities.include?('launch-ehr')
|
27
|
+
required_capabilities += ['context-ehr-encounter']
|
26
28
|
end
|
27
29
|
|
28
30
|
missing_capabilities = required_capabilities - capabilities
|