udap_security_test_kit 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/lib/udap_security_test_kit/authorization_code_authentication_group.rb +44 -0
- data/lib/udap_security_test_kit/authorization_code_group.rb +103 -0
- data/lib/udap_security_test_kit/authorization_code_received_test.rb +31 -0
- data/lib/udap_security_test_kit/authorization_code_redirect_test.rb +74 -0
- data/lib/udap_security_test_kit/authorization_code_token_exchange_test.rb +103 -0
- data/lib/udap_security_test_kit/authorization_endpoint_field_test.rb +43 -0
- data/lib/udap_security_test_kit/certs/InfernoCA.key +52 -0
- data/lib/udap_security_test_kit/certs/InfernoCA.pem +35 -0
- data/lib/udap_security_test_kit/certs/TestClient.pem +32 -0
- data/lib/udap_security_test_kit/certs/TestClientPrivateKey.key +28 -0
- data/lib/udap_security_test_kit/client_credentials_authentication_group.rb +40 -0
- data/lib/udap_security_test_kit/client_credentials_group.rb +105 -0
- data/lib/udap_security_test_kit/client_credentials_token_exchange_test.rb +130 -0
- data/lib/udap_security_test_kit/common_assertions.rb +16 -0
- data/lib/udap_security_test_kit/default_cert_file_loader.rb +27 -0
- data/lib/udap_security_test_kit/discovery_group.rb +90 -0
- data/lib/udap_security_test_kit/dynamic_client_registration_group.rb +129 -0
- data/lib/udap_security_test_kit/generate_client_certs_test.rb +60 -0
- data/lib/udap_security_test_kit/grant_types_supported_field_test.rb +53 -0
- data/lib/udap_security_test_kit/reg_endpoint_jwt_signing_alg_values_supported_field_test.rb +29 -0
- data/lib/udap_security_test_kit/registration_endpoint_field_test.rb +30 -0
- data/lib/udap_security_test_kit/registration_failure_invalid_contents_test.rb +68 -0
- data/lib/udap_security_test_kit/registration_failure_invalid_jwt_signature_test.rb +70 -0
- data/lib/udap_security_test_kit/registration_success_contents_test.rb +64 -0
- data/lib/udap_security_test_kit/registration_success_test.rb +68 -0
- data/lib/udap_security_test_kit/scopes_supported_field_test.rb +26 -0
- data/lib/udap_security_test_kit/signed_metadata_contents_test.rb +89 -0
- data/lib/udap_security_test_kit/signed_metadata_field_test.rb +31 -0
- data/lib/udap_security_test_kit/signed_metadata_trust_verification_test.rb +54 -0
- data/lib/udap_security_test_kit/software_statement_builder.rb +32 -0
- data/lib/udap_security_test_kit/token_endpoint_auth_methods_supported_field_test.rb +22 -0
- data/lib/udap_security_test_kit/token_endpoint_auth_signing_alg_values_supported_field_test.rb +32 -0
- data/lib/udap_security_test_kit/token_endpoint_field_test.rb +30 -0
- data/lib/udap_security_test_kit/token_exchange_response_body_test.rb +30 -0
- data/lib/udap_security_test_kit/token_exchange_response_headers_test.rb +30 -0
- data/lib/udap_security_test_kit/udap_auth_extensions_required_field_test.rb +38 -0
- data/lib/udap_security_test_kit/udap_auth_extensions_supported_field_test.rb +31 -0
- data/lib/udap_security_test_kit/udap_certifications_required_field_test.rb +45 -0
- data/lib/udap_security_test_kit/udap_certifications_supported_field_test.rb +33 -0
- data/lib/udap_security_test_kit/udap_client_assertion_payload_builder.rb +15 -0
- data/lib/udap_security_test_kit/udap_jwt_builder.rb +30 -0
- data/lib/udap_security_test_kit/udap_jwt_validator.rb +71 -0
- data/lib/udap_security_test_kit/udap_profiles_supported_field_test.rb +47 -0
- data/lib/udap_security_test_kit/udap_request_builder.rb +43 -0
- data/lib/udap_security_test_kit/udap_versions_supported_field_test.rb +21 -0
- data/lib/udap_security_test_kit/udap_x509_certificate.rb +42 -0
- data/lib/udap_security_test_kit/version.rb +3 -0
- data/lib/udap_security_test_kit/well_known_endpoint_test.rb +31 -0
- data/lib/udap_security_test_kit.rb +63 -0
- metadata +124 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
require_relative 'udap_security_test_kit/authorization_code_group'
|
2
|
+
require_relative 'udap_security_test_kit/client_credentials_group'
|
3
|
+
require_relative 'udap_security_test_kit/version'
|
4
|
+
|
5
|
+
module UDAPSecurityTestKit
|
6
|
+
class Suite < Inferno::TestSuite
|
7
|
+
id :udap_security
|
8
|
+
title 'UDAP Security'
|
9
|
+
version VERSION
|
10
|
+
description %(
|
11
|
+
The User Data Access Protocol (UDAP) Security test kit verifies that systems correctly implement the
|
12
|
+
[HL7 UDAP Security IG](http://hl7.org/fhir/us/udap-security/STU1/)
|
13
|
+
for extending OAuth 2.0 using UDAP workflows.
|
14
|
+
|
15
|
+
There are three steps to the UDAP workflow:
|
16
|
+
1. Discovery
|
17
|
+
2. Dynamic Client Registration
|
18
|
+
3. Authorization & Authentication
|
19
|
+
|
20
|
+
These steps are grouped by the OAuth2.0 flow being tested:
|
21
|
+
1. Authorization Code flow, which supports
|
22
|
+
[Consumer-Facing](https://hl7.org/fhir/us/udap-security/STU1/consumer.html) or [Business-to-Business (B2B)](https://hl7.org/fhir/us/udap-security/STU1/b2b.html)
|
23
|
+
use cases
|
24
|
+
2. Client Credentials flow, which only supports the
|
25
|
+
[B2B](https://hl7.org/fhir/us/udap-security/STU1/b2b.html) use case
|
26
|
+
|
27
|
+
Testers may test one or both flows based on their system under test.
|
28
|
+
)
|
29
|
+
|
30
|
+
input_instructions %(
|
31
|
+
This menu will execute tests for both OAuth flows.
|
32
|
+
|
33
|
+
**Discovery Tests**
|
34
|
+
|
35
|
+
#{DiscoveryGroup.discovery_group_input_instructions}
|
36
|
+
|
37
|
+
**Dynamic Client Registration Tests**
|
38
|
+
|
39
|
+
A single logical UDAP client cannot register itself for both `authorization_code` and `client_credentials` grant
|
40
|
+
types.
|
41
|
+
Inferno will therefore represent a distinct logical client for each OAuth flow and requires a unique issuer URI
|
42
|
+
value for each flow's registration step.
|
43
|
+
If the provided client certificate has more than one URI entry in its Subject Alternative Name (SAN) extension,
|
44
|
+
client certificates may be reused for each flow. If not, each auth flow will require its own client certificate.
|
45
|
+
|
46
|
+
Please refer to the [UDAP Dynamic Client Registration IG Section 3.1](https://hl7.org/fhir/us/udap-security/STU1/registration.html#software-statement)
|
47
|
+
entries on `grant_type` and `iss` claims for more details.
|
48
|
+
)
|
49
|
+
|
50
|
+
# cert_file = File.read(File.join(File.dirname(__FILE__), 'udap_security_test_kit/certs/InfernoCA.pem'))
|
51
|
+
|
52
|
+
# cert_file_route_handler = proc { [200, { 'Content-Type' => 'application/x-pem-file' }, [cert_file]] }
|
53
|
+
|
54
|
+
# route(:get, '/inferno_ca.pem', cert_file_route_handler)
|
55
|
+
|
56
|
+
resume_test_route :get, '/redirect' do |request|
|
57
|
+
request.query_parameters['state']
|
58
|
+
end
|
59
|
+
|
60
|
+
group from: :udap_authorization_code_group
|
61
|
+
group from: :udap_client_credentials_group
|
62
|
+
end
|
63
|
+
end
|
metadata
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: udap_security_test_kit
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.9.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Stephen MacVicar
|
8
|
+
- Alisa Wallace
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2024-08-13 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: inferno_core
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 0.4.2
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 0.4.2
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: jwt
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '2.3'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '2.3'
|
42
|
+
description: UDAP Security IG Test Kit
|
43
|
+
email:
|
44
|
+
- inferno@groups.mitre.org
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- LICENSE
|
50
|
+
- lib/udap_security_test_kit.rb
|
51
|
+
- lib/udap_security_test_kit/authorization_code_authentication_group.rb
|
52
|
+
- lib/udap_security_test_kit/authorization_code_group.rb
|
53
|
+
- lib/udap_security_test_kit/authorization_code_received_test.rb
|
54
|
+
- lib/udap_security_test_kit/authorization_code_redirect_test.rb
|
55
|
+
- lib/udap_security_test_kit/authorization_code_token_exchange_test.rb
|
56
|
+
- lib/udap_security_test_kit/authorization_endpoint_field_test.rb
|
57
|
+
- lib/udap_security_test_kit/certs/InfernoCA.key
|
58
|
+
- lib/udap_security_test_kit/certs/InfernoCA.pem
|
59
|
+
- lib/udap_security_test_kit/certs/TestClient.pem
|
60
|
+
- lib/udap_security_test_kit/certs/TestClientPrivateKey.key
|
61
|
+
- lib/udap_security_test_kit/client_credentials_authentication_group.rb
|
62
|
+
- lib/udap_security_test_kit/client_credentials_group.rb
|
63
|
+
- lib/udap_security_test_kit/client_credentials_token_exchange_test.rb
|
64
|
+
- lib/udap_security_test_kit/common_assertions.rb
|
65
|
+
- lib/udap_security_test_kit/default_cert_file_loader.rb
|
66
|
+
- lib/udap_security_test_kit/discovery_group.rb
|
67
|
+
- lib/udap_security_test_kit/dynamic_client_registration_group.rb
|
68
|
+
- lib/udap_security_test_kit/generate_client_certs_test.rb
|
69
|
+
- lib/udap_security_test_kit/grant_types_supported_field_test.rb
|
70
|
+
- lib/udap_security_test_kit/reg_endpoint_jwt_signing_alg_values_supported_field_test.rb
|
71
|
+
- lib/udap_security_test_kit/registration_endpoint_field_test.rb
|
72
|
+
- lib/udap_security_test_kit/registration_failure_invalid_contents_test.rb
|
73
|
+
- lib/udap_security_test_kit/registration_failure_invalid_jwt_signature_test.rb
|
74
|
+
- lib/udap_security_test_kit/registration_success_contents_test.rb
|
75
|
+
- lib/udap_security_test_kit/registration_success_test.rb
|
76
|
+
- lib/udap_security_test_kit/scopes_supported_field_test.rb
|
77
|
+
- lib/udap_security_test_kit/signed_metadata_contents_test.rb
|
78
|
+
- lib/udap_security_test_kit/signed_metadata_field_test.rb
|
79
|
+
- lib/udap_security_test_kit/signed_metadata_trust_verification_test.rb
|
80
|
+
- lib/udap_security_test_kit/software_statement_builder.rb
|
81
|
+
- lib/udap_security_test_kit/token_endpoint_auth_methods_supported_field_test.rb
|
82
|
+
- lib/udap_security_test_kit/token_endpoint_auth_signing_alg_values_supported_field_test.rb
|
83
|
+
- lib/udap_security_test_kit/token_endpoint_field_test.rb
|
84
|
+
- lib/udap_security_test_kit/token_exchange_response_body_test.rb
|
85
|
+
- lib/udap_security_test_kit/token_exchange_response_headers_test.rb
|
86
|
+
- lib/udap_security_test_kit/udap_auth_extensions_required_field_test.rb
|
87
|
+
- lib/udap_security_test_kit/udap_auth_extensions_supported_field_test.rb
|
88
|
+
- lib/udap_security_test_kit/udap_certifications_required_field_test.rb
|
89
|
+
- lib/udap_security_test_kit/udap_certifications_supported_field_test.rb
|
90
|
+
- lib/udap_security_test_kit/udap_client_assertion_payload_builder.rb
|
91
|
+
- lib/udap_security_test_kit/udap_jwt_builder.rb
|
92
|
+
- lib/udap_security_test_kit/udap_jwt_validator.rb
|
93
|
+
- lib/udap_security_test_kit/udap_profiles_supported_field_test.rb
|
94
|
+
- lib/udap_security_test_kit/udap_request_builder.rb
|
95
|
+
- lib/udap_security_test_kit/udap_versions_supported_field_test.rb
|
96
|
+
- lib/udap_security_test_kit/udap_x509_certificate.rb
|
97
|
+
- lib/udap_security_test_kit/version.rb
|
98
|
+
- lib/udap_security_test_kit/well_known_endpoint_test.rb
|
99
|
+
homepage: https://github.com/inferno-framework/udap-security-test-kit
|
100
|
+
licenses:
|
101
|
+
- Apache-2.0
|
102
|
+
metadata:
|
103
|
+
homepage_uri: https://github.com/inferno-framework/udap-security-test-kit
|
104
|
+
source_code_uri: https://github.com/inferno-framework/udap-security-test-kit
|
105
|
+
post_install_message:
|
106
|
+
rdoc_options: []
|
107
|
+
require_paths:
|
108
|
+
- lib
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: 3.1.2
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
requirements: []
|
120
|
+
rubygems_version: 3.3.7
|
121
|
+
signing_key:
|
122
|
+
specification_version: 4
|
123
|
+
summary: UDAP Security IG Test Kit
|
124
|
+
test_files: []
|