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.
- checksums.yaml +4 -4
- data/config/presets/g10_reference_server_preset.json +1467 -0
- data/lib/inferno/ext/bloomer.rb +1 -1
- data/lib/inferno/terminology/tasks/process_umls.rb +1 -1
- data/lib/onc_certification_g10_test_kit/bulk_data_authorization.rb +73 -67
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu1.rb +1 -2
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_cancel_stu2.rb +7 -1
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_parameters.rb +1 -1
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_stu1.rb +10 -2
- data/lib/onc_certification_g10_test_kit/bulk_data_group_export_validation.rb +6 -2
- data/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb +7 -3
- data/lib/onc_certification_g10_test_kit/configuration_checker.rb +5 -13
- data/lib/onc_certification_g10_test_kit/encounter_context_test.rb +3 -3
- data/lib/onc_certification_g10_test_kit/export_kick_off_performer.rb +7 -3
- data/lib/onc_certification_g10_test_kit/feature.rb +5 -4
- data/lib/onc_certification_g10_test_kit/igs/01-us-core-v400.tgz +0 -0
- data/lib/onc_certification_g10_test_kit/igs/03-us-core-v311.tgz +0 -0
- data/lib/onc_certification_g10_test_kit/igs/04-us-core-610.tgz +0 -0
- data/lib/onc_certification_g10_test_kit/metadata.rb +103 -0
- data/lib/onc_certification_g10_test_kit/multi_patient_api_stu1.rb +0 -4
- data/lib/onc_certification_g10_test_kit/multi_patient_api_stu2.rb +8 -4
- data/lib/onc_certification_g10_test_kit/patient_context_test.rb +3 -3
- data/lib/onc_certification_g10_test_kit/patient_scope_test.rb +1 -1
- data/lib/onc_certification_g10_test_kit/restricted_resource_type_access_group.rb +3 -10
- data/lib/onc_certification_g10_test_kit/scope_constants.rb +52 -0
- data/lib/onc_certification_g10_test_kit/short_id_map.yml +11 -20
- data/lib/onc_certification_g10_test_kit/single_patient_api_group.rb +18 -17
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_4_api_group.rb +18 -17
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_5_api_group.rb +18 -17
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_6_api_group.rb +20 -19
- data/lib/onc_certification_g10_test_kit/single_patient_us_core_7_api_group.rb +20 -19
- data/lib/onc_certification_g10_test_kit/smart_app_launch_invalid_aud_group.rb +108 -65
- data/lib/onc_certification_g10_test_kit/smart_asymmetric_launch_group.rb +42 -89
- data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group.rb +33 -43
- data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2.rb +32 -54
- data/lib/onc_certification_g10_test_kit/smart_ehr_patient_launch_group_stu2_2.rb +34 -55
- data/lib/onc_certification_g10_test_kit/smart_ehr_practitioner_app_group.rb +103 -146
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group.rb +17 -55
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_group_stu2_2.rb +17 -55
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group.rb +17 -55
- data/lib/onc_certification_g10_test_kit/smart_fine_grained_scopes_us_core_7_group_stu2_2.rb +17 -55
- data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_group.rb +33 -68
- data/lib/onc_certification_g10_test_kit/smart_granular_scope_selection_test.rb +4 -3
- data/lib/onc_certification_g10_test_kit/smart_invalid_pkce_group.rb +45 -89
- data/lib/onc_certification_g10_test_kit/smart_invalid_token_group.rb +45 -89
- data/lib/onc_certification_g10_test_kit/smart_invalid_token_group_stu2.rb +53 -91
- data/lib/onc_certification_g10_test_kit/smart_invalid_token_refresh_test.rb +9 -6
- data/lib/onc_certification_g10_test_kit/smart_limited_app_group.rb +86 -278
- data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group.rb +32 -59
- data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2.rb +36 -75
- data/lib/onc_certification_g10_test_kit/smart_public_standalone_launch_group_stu2_2.rb +36 -75
- data/lib/onc_certification_g10_test_kit/smart_scopes_test.rb +6 -1
- data/lib/onc_certification_g10_test_kit/smart_standalone_patient_app_group.rb +90 -118
- data/lib/onc_certification_g10_test_kit/smart_v1_scopes_group.rb +62 -116
- data/lib/onc_certification_g10_test_kit/tasks/generate_matrix.rb +3 -12
- data/lib/onc_certification_g10_test_kit/token_introspection_group.rb +12 -25
- data/lib/onc_certification_g10_test_kit/token_introspection_group_stu2_2.rb +12 -14
- data/lib/onc_certification_g10_test_kit/token_revocation_group.rb +44 -33
- data/lib/onc_certification_g10_test_kit/unrestricted_resource_type_access_group.rb +3 -3
- data/lib/onc_certification_g10_test_kit/urls.rb +4 -0
- data/lib/onc_certification_g10_test_kit/version.rb +2 -1
- data/lib/onc_certification_g10_test_kit.rb +119 -65
- metadata +20 -68
@@ -1,11 +1,15 @@
|
|
1
|
+
require_relative 'scope_constants'
|
2
|
+
|
1
3
|
module ONCCertificationG10TestKit
|
2
4
|
class SMARTPublicStandaloneLaunchGroupSTU2 < SMARTAppLaunch::StandaloneLaunchGroupSTU2
|
5
|
+
include ScopeConstants
|
6
|
+
|
3
7
|
title 'Public Client Standalone Launch with OpenID Connect'
|
4
8
|
short_title 'Public Client Launch'
|
5
9
|
input_instructions %(
|
6
10
|
Register Inferno as a standalone application using the following information:
|
7
11
|
|
8
|
-
* Redirect URI: `#{
|
12
|
+
* Redirect URI: `#{REDIRECT_URI}`
|
9
13
|
|
10
14
|
Enter in the appropriate scope to enable patient-level access to all
|
11
15
|
relevant resources. In addition, support for the OpenID Connect (openid
|
@@ -22,7 +26,7 @@ module ONCCertificationG10TestKit
|
|
22
26
|
Prior to executing this test, register Inferno as a public standalone
|
23
27
|
application using the following information:
|
24
28
|
|
25
|
-
* Redirect URI: `#{
|
29
|
+
* Redirect URI: `#{REDIRECT_URI}`
|
26
30
|
|
27
31
|
Inferno will act as a public client redirect the tester to the the
|
28
32
|
authorization endpoint so that they may provide any required credentials
|
@@ -38,31 +42,28 @@ module ONCCertificationG10TestKit
|
|
38
42
|
|
39
43
|
config(
|
40
44
|
inputs: {
|
41
|
-
|
42
|
-
name: :
|
43
|
-
title: 'Public Launch
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
patient/Practitioner.rs patient/Procedure.rs patient/Provenance.rs
|
64
|
-
patient/PractitionerRole.rs
|
65
|
-
).gsub(/\s{2,}/, ' ').strip
|
45
|
+
smart_auth_info: {
|
46
|
+
name: :public_smart_auth_info,
|
47
|
+
title: 'Public Launch Credentials',
|
48
|
+
options: {
|
49
|
+
mode: 'auth',
|
50
|
+
components: [
|
51
|
+
{
|
52
|
+
name: :auth_type,
|
53
|
+
default: 'public',
|
54
|
+
locked: true
|
55
|
+
},
|
56
|
+
{
|
57
|
+
name: :auth_request_method,
|
58
|
+
default: 'GET',
|
59
|
+
locked: true
|
60
|
+
},
|
61
|
+
{
|
62
|
+
name: :requested_scopes,
|
63
|
+
default: STANDALONE_SMART_2_SCOPES
|
64
|
+
}
|
65
|
+
]
|
66
|
+
}
|
66
67
|
},
|
67
68
|
url: {
|
68
69
|
title: 'Public Launch FHIR Endpoint',
|
@@ -74,43 +75,19 @@ module ONCCertificationG10TestKit
|
|
74
75
|
state: {
|
75
76
|
name: :public_state
|
76
77
|
},
|
77
|
-
|
78
|
-
|
79
|
-
description: 'OAuth 2.0 Authorize Endpoint provided during the patient standalone launch'
|
80
|
-
},
|
81
|
-
smart_token_url: {
|
82
|
-
title: 'OAuth 2.0 Token Endpoint',
|
83
|
-
description: 'OAuth 2.0 Token Endpoint provided during the patient standalone launch'
|
84
|
-
},
|
85
|
-
smart_credentials: {
|
86
|
-
name: :public_smart_credentials
|
87
|
-
},
|
88
|
-
use_pkce: {
|
89
|
-
default: 'true',
|
90
|
-
locked: true
|
91
|
-
},
|
92
|
-
pkce_code_challenge_method: {
|
93
|
-
locked: true
|
94
|
-
},
|
95
|
-
client_auth_type: {
|
96
|
-
name: :public_client_auth_type,
|
97
|
-
locked: true,
|
98
|
-
default: 'public'
|
78
|
+
patient_id: {
|
79
|
+
name: :public_patient_id
|
99
80
|
}
|
100
81
|
},
|
101
82
|
outputs: {
|
102
83
|
code: { name: :public_code },
|
103
|
-
token_retrieval_time: { name: :public_token_retrieval_time },
|
104
84
|
state: { name: :public_state },
|
105
85
|
id_token: { name: :public_id_token },
|
106
|
-
refresh_token: { name: :public_refresh_token },
|
107
|
-
access_token: { name: :public_access_token },
|
108
|
-
expires_in: { name: :public_expires_in },
|
109
86
|
patient_id: { name: :public_patient_id },
|
110
87
|
encounter_id: { name: :public_encounter_id },
|
111
88
|
received_scopes: { name: :public_received_scopes },
|
112
89
|
intent: { name: :public_intent },
|
113
|
-
|
90
|
+
smart_auth_info: { name: :public_smart_auth_info }
|
114
91
|
},
|
115
92
|
requests: {
|
116
93
|
redirect: { name: :public_redirect },
|
@@ -118,24 +95,7 @@ module ONCCertificationG10TestKit
|
|
118
95
|
}
|
119
96
|
)
|
120
97
|
|
121
|
-
|
122
|
-
:public_client_id,
|
123
|
-
:public_client_secret,
|
124
|
-
:public_requested_scopes,
|
125
|
-
:use_pkce,
|
126
|
-
:pkce_code_challenge_method,
|
127
|
-
:smart_authorization_url,
|
128
|
-
:smart_token_url,
|
129
|
-
:authorization_method,
|
130
|
-
:public_client_auth_type
|
131
|
-
|
132
|
-
test from: :g10_patient_context,
|
133
|
-
config: {
|
134
|
-
inputs: {
|
135
|
-
patient_id: { name: :public_patient_id },
|
136
|
-
smart_credentials: { name: :public_smart_credentials }
|
137
|
-
}
|
138
|
-
}
|
98
|
+
test from: :g10_patient_context
|
139
99
|
|
140
100
|
test do
|
141
101
|
title 'OAuth token exchange response contains OpenID Connect id_token'
|
@@ -155,8 +115,9 @@ module ONCCertificationG10TestKit
|
|
155
115
|
end
|
156
116
|
end
|
157
117
|
|
158
|
-
|
159
|
-
|
160
|
-
|
118
|
+
test from: :well_known_endpoint
|
119
|
+
|
120
|
+
# Move the well-known endpoint test to the beginning
|
121
|
+
children.prepend(children.pop)
|
161
122
|
end
|
162
123
|
end
|
@@ -1,11 +1,15 @@
|
|
1
|
+
require_relative 'scope_constants'
|
2
|
+
|
1
3
|
module ONCCertificationG10TestKit
|
2
4
|
class SMARTPublicStandaloneLaunchGroupTestSTU22 < SMARTAppLaunch::StandaloneLaunchGroupSTU2
|
5
|
+
include ScopeConstants
|
6
|
+
|
3
7
|
title 'Public Client Standalone Launch with OpenID Connect'
|
4
8
|
short_title 'Public Client Launch'
|
5
9
|
input_instructions %(
|
6
10
|
Register Inferno as a standalone application using the following information:
|
7
11
|
|
8
|
-
* Redirect URI: `#{
|
12
|
+
* Redirect URI: `#{REDIRECT_URI}`
|
9
13
|
|
10
14
|
Enter in the appropriate scope to enable patient-level access to all
|
11
15
|
relevant resources. In addition, support for the OpenID Connect (openid
|
@@ -22,7 +26,7 @@ module ONCCertificationG10TestKit
|
|
22
26
|
Prior to executing this test, register Inferno as a public standalone
|
23
27
|
application using the following information:
|
24
28
|
|
25
|
-
* Redirect URI: `#{
|
29
|
+
* Redirect URI: `#{REDIRECT_URI}`
|
26
30
|
|
27
31
|
Inferno will act as a public client redirect the tester to the the
|
28
32
|
authorization endpoint so that they may provide any required credentials
|
@@ -38,31 +42,28 @@ module ONCCertificationG10TestKit
|
|
38
42
|
|
39
43
|
config(
|
40
44
|
inputs: {
|
41
|
-
|
42
|
-
name: :
|
43
|
-
title: 'Public Launch
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
patient/Practitioner.rs patient/Procedure.rs patient/Provenance.rs
|
64
|
-
patient/PractitionerRole.rs
|
65
|
-
).gsub(/\s{2,}/, ' ').strip
|
45
|
+
smart_auth_info: {
|
46
|
+
name: :public_smart_auth_info,
|
47
|
+
title: 'Public Launch Credentials',
|
48
|
+
options: {
|
49
|
+
mode: 'auth',
|
50
|
+
components: [
|
51
|
+
{
|
52
|
+
name: :auth_type,
|
53
|
+
default: 'public',
|
54
|
+
locked: true
|
55
|
+
},
|
56
|
+
{
|
57
|
+
name: :auth_request_method,
|
58
|
+
default: 'GET',
|
59
|
+
locked: true
|
60
|
+
},
|
61
|
+
{
|
62
|
+
name: :requested_scopes,
|
63
|
+
default: STANDALONE_SMART_2_SCOPES
|
64
|
+
}
|
65
|
+
]
|
66
|
+
}
|
66
67
|
},
|
67
68
|
url: {
|
68
69
|
title: 'Public Launch FHIR Endpoint',
|
@@ -74,43 +75,19 @@ module ONCCertificationG10TestKit
|
|
74
75
|
state: {
|
75
76
|
name: :public_state
|
76
77
|
},
|
77
|
-
|
78
|
-
|
79
|
-
description: 'OAuth 2.0 Authorize Endpoint provided during the patient standalone launch'
|
80
|
-
},
|
81
|
-
smart_token_url: {
|
82
|
-
title: 'OAuth 2.0 Token Endpoint',
|
83
|
-
description: 'OAuth 2.0 Token Endpoint provided during the patient standalone launch'
|
84
|
-
},
|
85
|
-
smart_credentials: {
|
86
|
-
name: :public_smart_credentials
|
87
|
-
},
|
88
|
-
use_pkce: {
|
89
|
-
default: 'true',
|
90
|
-
locked: true
|
91
|
-
},
|
92
|
-
pkce_code_challenge_method: {
|
93
|
-
locked: true
|
94
|
-
},
|
95
|
-
client_auth_type: {
|
96
|
-
name: :public_client_auth_type,
|
97
|
-
locked: true,
|
98
|
-
default: 'public'
|
78
|
+
patient_id: {
|
79
|
+
name: :public_patient_id
|
99
80
|
}
|
100
81
|
},
|
101
82
|
outputs: {
|
102
83
|
code: { name: :public_code },
|
103
|
-
token_retrieval_time: { name: :public_token_retrieval_time },
|
104
84
|
state: { name: :public_state },
|
105
85
|
id_token: { name: :public_id_token },
|
106
|
-
refresh_token: { name: :public_refresh_token },
|
107
|
-
access_token: { name: :public_access_token },
|
108
|
-
expires_in: { name: :public_expires_in },
|
109
86
|
patient_id: { name: :public_patient_id },
|
110
87
|
encounter_id: { name: :public_encounter_id },
|
111
88
|
received_scopes: { name: :public_received_scopes },
|
112
89
|
intent: { name: :public_intent },
|
113
|
-
|
90
|
+
smart_auth_info: { name: :public_smart_auth_info }
|
114
91
|
},
|
115
92
|
requests: {
|
116
93
|
redirect: { name: :public_redirect },
|
@@ -118,24 +95,7 @@ module ONCCertificationG10TestKit
|
|
118
95
|
}
|
119
96
|
)
|
120
97
|
|
121
|
-
|
122
|
-
:public_client_id,
|
123
|
-
:public_client_secret,
|
124
|
-
:public_requested_scopes,
|
125
|
-
:use_pkce,
|
126
|
-
:pkce_code_challenge_method,
|
127
|
-
:smart_authorization_url,
|
128
|
-
:smart_token_url,
|
129
|
-
:authorization_method,
|
130
|
-
:public_client_auth_type
|
131
|
-
|
132
|
-
test from: :g10_patient_context,
|
133
|
-
config: {
|
134
|
-
inputs: {
|
135
|
-
patient_id: { name: :public_patient_id },
|
136
|
-
smart_credentials: { name: :public_smart_credentials }
|
137
|
-
}
|
138
|
-
}
|
98
|
+
test from: :g10_patient_context
|
139
99
|
|
140
100
|
test do
|
141
101
|
title 'OAuth token exchange response contains OpenID Connect id_token'
|
@@ -155,8 +115,9 @@ module ONCCertificationG10TestKit
|
|
155
115
|
end
|
156
116
|
end
|
157
117
|
|
158
|
-
|
159
|
-
|
160
|
-
|
118
|
+
test from: :well_known_endpoint
|
119
|
+
|
120
|
+
# Move the well-known endpoint test to the beginning
|
121
|
+
children.prepend(children.pop)
|
161
122
|
end
|
162
123
|
end
|
@@ -8,7 +8,8 @@ module ONCCertificationG10TestKit
|
|
8
8
|
smart-app-launch guide. All scopes requested are expected to be granted.
|
9
9
|
)
|
10
10
|
id :g10_smart_scopes
|
11
|
-
input :
|
11
|
+
input :smart_auth_info, type: 'auth_info'
|
12
|
+
input :received_scopes
|
12
13
|
uses_request :token
|
13
14
|
|
14
15
|
VALID_RESOURCE_TYPES = [
|
@@ -95,6 +96,10 @@ module ONCCertificationG10TestKit
|
|
95
96
|
VALID_RESOURCE_TYPES
|
96
97
|
end
|
97
98
|
|
99
|
+
def requested_scopes
|
100
|
+
smart_auth_info.requested_scopes
|
101
|
+
end
|
102
|
+
|
98
103
|
def required_scope_type
|
99
104
|
config.options[:required_scope_type]
|
100
105
|
end
|