ruby-saml 1.9.0 → 1.12.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 (157) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +30 -14
  3. data/README.md +108 -22
  4. data/changelog.md +38 -0
  5. data/lib/onelogin/ruby-saml/attributes.rb +24 -1
  6. data/lib/onelogin/ruby-saml/authrequest.rb +23 -6
  7. data/lib/onelogin/ruby-saml/idp_metadata_parser.rb +239 -171
  8. data/lib/onelogin/ruby-saml/logging.rb +3 -3
  9. data/lib/onelogin/ruby-saml/logoutrequest.rb +20 -5
  10. data/lib/onelogin/ruby-saml/logoutresponse.rb +25 -9
  11. data/lib/onelogin/ruby-saml/metadata.rb +11 -3
  12. data/lib/onelogin/ruby-saml/response.rb +67 -21
  13. data/lib/onelogin/ruby-saml/saml_message.rb +12 -2
  14. data/lib/onelogin/ruby-saml/setting_error.rb +6 -0
  15. data/lib/onelogin/ruby-saml/settings.rb +73 -7
  16. data/lib/onelogin/ruby-saml/slo_logoutrequest.rb +20 -1
  17. data/lib/onelogin/ruby-saml/slo_logoutresponse.rb +38 -16
  18. data/lib/onelogin/ruby-saml/utils.rb +74 -1
  19. data/lib/onelogin/ruby-saml/version.rb +1 -1
  20. data/lib/xml_security.rb +34 -6
  21. data/ruby-saml.gemspec +15 -7
  22. metadata +36 -278
  23. data/test/certificates/certificate1 +0 -12
  24. data/test/certificates/certificate_without_head_foot +0 -1
  25. data/test/certificates/formatted_certificate +0 -14
  26. data/test/certificates/formatted_chained_certificate +0 -42
  27. data/test/certificates/formatted_private_key +0 -12
  28. data/test/certificates/formatted_rsa_private_key +0 -12
  29. data/test/certificates/invalid_certificate1 +0 -1
  30. data/test/certificates/invalid_certificate2 +0 -1
  31. data/test/certificates/invalid_certificate3 +0 -12
  32. data/test/certificates/invalid_chained_certificate1 +0 -1
  33. data/test/certificates/invalid_private_key1 +0 -1
  34. data/test/certificates/invalid_private_key2 +0 -1
  35. data/test/certificates/invalid_private_key3 +0 -10
  36. data/test/certificates/invalid_rsa_private_key1 +0 -1
  37. data/test/certificates/invalid_rsa_private_key2 +0 -1
  38. data/test/certificates/invalid_rsa_private_key3 +0 -10
  39. data/test/certificates/ruby-saml-2.crt +0 -15
  40. data/test/certificates/ruby-saml.crt +0 -14
  41. data/test/certificates/ruby-saml.key +0 -15
  42. data/test/idp_metadata_parser_test.rb +0 -579
  43. data/test/logging_test.rb +0 -62
  44. data/test/logout_requests/invalid_slo_request.xml +0 -6
  45. data/test/logout_requests/slo_request.xml +0 -4
  46. data/test/logout_requests/slo_request.xml.base64 +0 -1
  47. data/test/logout_requests/slo_request_deflated.xml.base64 +0 -1
  48. data/test/logout_requests/slo_request_with_name_id_format.xml +0 -4
  49. data/test/logout_requests/slo_request_with_session_index.xml +0 -5
  50. data/test/logout_responses/logoutresponse_fixtures.rb +0 -67
  51. data/test/logoutrequest_test.rb +0 -226
  52. data/test/logoutresponse_test.rb +0 -402
  53. data/test/metadata/idp_descriptor.xml +0 -26
  54. data/test/metadata/idp_descriptor_2.xml +0 -56
  55. data/test/metadata/idp_descriptor_3.xml +0 -14
  56. data/test/metadata/idp_descriptor_4.xml +0 -72
  57. data/test/metadata/idp_metadata_different_sign_and_encrypt_cert.xml +0 -72
  58. data/test/metadata/idp_metadata_multi_certs.xml +0 -75
  59. data/test/metadata/idp_metadata_multi_signing_certs.xml +0 -52
  60. data/test/metadata/idp_metadata_same_sign_and_encrypt_cert.xml +0 -71
  61. data/test/metadata/idp_multiple_descriptors.xml +0 -53
  62. data/test/metadata/no_idp_descriptor.xml +0 -21
  63. data/test/metadata_test.rb +0 -331
  64. data/test/request_test.rb +0 -323
  65. data/test/response_test.rb +0 -1619
  66. data/test/responses/adfs_response_sha1.xml +0 -46
  67. data/test/responses/adfs_response_sha256.xml +0 -46
  68. data/test/responses/adfs_response_sha384.xml +0 -46
  69. data/test/responses/adfs_response_sha512.xml +0 -46
  70. data/test/responses/adfs_response_xmlns.xml +0 -45
  71. data/test/responses/attackxee.xml +0 -13
  72. data/test/responses/invalids/duplicated_attributes.xml.base64 +0 -1
  73. data/test/responses/invalids/empty_destination.xml.base64 +0 -1
  74. data/test/responses/invalids/empty_nameid.xml.base64 +0 -1
  75. data/test/responses/invalids/encrypted_new_attack.xml.base64 +0 -1
  76. data/test/responses/invalids/invalid_audience.xml.base64 +0 -1
  77. data/test/responses/invalids/invalid_issuer_assertion.xml.base64 +0 -1
  78. data/test/responses/invalids/invalid_issuer_message.xml.base64 +0 -1
  79. data/test/responses/invalids/invalid_signature_position.xml.base64 +0 -1
  80. data/test/responses/invalids/invalid_subjectconfirmation_inresponse.xml.base64 +0 -1
  81. data/test/responses/invalids/invalid_subjectconfirmation_nb.xml.base64 +0 -1
  82. data/test/responses/invalids/invalid_subjectconfirmation_noa.xml.base64 +0 -1
  83. data/test/responses/invalids/invalid_subjectconfirmation_recipient.xml.base64 +0 -1
  84. data/test/responses/invalids/multiple_assertions.xml.base64 +0 -2
  85. data/test/responses/invalids/multiple_signed.xml.base64 +0 -1
  86. data/test/responses/invalids/no_authnstatement.xml.base64 +0 -1
  87. data/test/responses/invalids/no_conditions.xml.base64 +0 -1
  88. data/test/responses/invalids/no_id.xml.base64 +0 -1
  89. data/test/responses/invalids/no_issuer_assertion.xml.base64 +0 -1
  90. data/test/responses/invalids/no_issuer_response.xml.base64 +0 -1
  91. data/test/responses/invalids/no_nameid.xml.base64 +0 -1
  92. data/test/responses/invalids/no_saml2.xml.base64 +0 -1
  93. data/test/responses/invalids/no_signature.xml.base64 +0 -1
  94. data/test/responses/invalids/no_status.xml.base64 +0 -1
  95. data/test/responses/invalids/no_status_code.xml.base64 +0 -1
  96. data/test/responses/invalids/no_subjectconfirmation_data.xml.base64 +0 -1
  97. data/test/responses/invalids/no_subjectconfirmation_method.xml.base64 +0 -1
  98. data/test/responses/invalids/response_invalid_signed_element.xml.base64 +0 -1
  99. data/test/responses/invalids/response_with_concealed_signed_assertion.xml +0 -51
  100. data/test/responses/invalids/response_with_doubled_signed_assertion.xml +0 -49
  101. data/test/responses/invalids/signature_wrapping_attack.xml.base64 +0 -1
  102. data/test/responses/invalids/status_code_responder.xml.base64 +0 -1
  103. data/test/responses/invalids/status_code_responer_and_msg.xml.base64 +0 -1
  104. data/test/responses/invalids/wrong_spnamequalifier.xml.base64 +0 -1
  105. data/test/responses/no_signature_ns.xml +0 -48
  106. data/test/responses/open_saml_response.xml +0 -56
  107. data/test/responses/response_assertion_wrapped.xml.base64 +0 -93
  108. data/test/responses/response_audience_self_closed_tag.xml.base64 +0 -1
  109. data/test/responses/response_double_status_code.xml.base64 +0 -1
  110. data/test/responses/response_encrypted_attrs.xml.base64 +0 -1
  111. data/test/responses/response_encrypted_nameid.xml.base64 +0 -1
  112. data/test/responses/response_eval.xml +0 -7
  113. data/test/responses/response_no_cert_and_encrypted_attrs.xml +0 -29
  114. data/test/responses/response_node_text_attack.xml.base64 +0 -1
  115. data/test/responses/response_node_text_attack2.xml.base64 +0 -1
  116. data/test/responses/response_node_text_attack3.xml.base64 +0 -1
  117. data/test/responses/response_unsigned_xml_base64 +0 -1
  118. data/test/responses/response_with_ampersands.xml +0 -139
  119. data/test/responses/response_with_ampersands.xml.base64 +0 -93
  120. data/test/responses/response_with_ds_namespace_at_the_root.xml.base64 +0 -1
  121. data/test/responses/response_with_multiple_attribute_statements.xml +0 -72
  122. data/test/responses/response_with_multiple_attribute_values.xml +0 -67
  123. data/test/responses/response_with_retrieval_method.xml +0 -26
  124. data/test/responses/response_with_saml2_namespace.xml.base64 +0 -102
  125. data/test/responses/response_with_signed_assertion.xml.base64 +0 -66
  126. data/test/responses/response_with_signed_assertion_2.xml.base64 +0 -1
  127. data/test/responses/response_with_signed_assertion_3.xml +0 -30
  128. data/test/responses/response_with_signed_message_and_assertion.xml +0 -34
  129. data/test/responses/response_with_undefined_recipient.xml.base64 +0 -1
  130. data/test/responses/response_without_attributes.xml.base64 +0 -79
  131. data/test/responses/response_without_reference_uri.xml.base64 +0 -1
  132. data/test/responses/response_wrapped.xml.base64 +0 -150
  133. data/test/responses/signed_message_encrypted_signed_assertion.xml.base64 +0 -1
  134. data/test/responses/signed_message_encrypted_unsigned_assertion.xml.base64 +0 -1
  135. data/test/responses/signed_nameid_in_atts.xml +0 -47
  136. data/test/responses/signed_unqual_nameid_in_atts.xml +0 -47
  137. data/test/responses/simple_saml_php.xml +0 -71
  138. data/test/responses/starfield_response.xml.base64 +0 -1
  139. data/test/responses/test_sign.xml +0 -43
  140. data/test/responses/unsigned_encrypted_adfs.xml +0 -23
  141. data/test/responses/unsigned_message_aes128_encrypted_signed_assertion.xml.base64 +0 -1
  142. data/test/responses/unsigned_message_aes192_encrypted_signed_assertion.xml.base64 +0 -1
  143. data/test/responses/unsigned_message_aes256_encrypted_signed_assertion.xml.base64 +0 -1
  144. data/test/responses/unsigned_message_des192_encrypted_signed_assertion.xml.base64 +0 -1
  145. data/test/responses/unsigned_message_encrypted_assertion_without_saml_namespace.xml.base64 +0 -1
  146. data/test/responses/unsigned_message_encrypted_signed_assertion.xml.base64 +0 -1
  147. data/test/responses/unsigned_message_encrypted_unsigned_assertion.xml.base64 +0 -1
  148. data/test/responses/valid_response.xml.base64 +0 -1
  149. data/test/responses/valid_response_with_formatted_x509certificate.xml.base64 +0 -1
  150. data/test/responses/valid_response_without_x509certificate.xml.base64 +0 -1
  151. data/test/saml_message_test.rb +0 -56
  152. data/test/settings_test.rb +0 -329
  153. data/test/slo_logoutrequest_test.rb +0 -448
  154. data/test/slo_logoutresponse_test.rb +0 -199
  155. data/test/test_helper.rb +0 -327
  156. data/test/utils_test.rb +0 -254
  157. data/test/xml_security_test.rb +0 -421
@@ -47,6 +47,10 @@ module OneLogin
47
47
  @document = REXML::Document.new(@request)
48
48
  end
49
49
 
50
+ def request_id
51
+ id(document)
52
+ end
53
+
50
54
  # Validates the Logout Request with the default values (soft = true)
51
55
  # @param collect_errors [Boolean] Stop validation when first error appears or keep validating.
52
56
  # @return [Boolean] TRUE if the Logout Request is valid
@@ -280,13 +284,19 @@ module OneLogin
280
284
  :raw_sig_alg => options[:raw_get_params]['SigAlg']
281
285
  )
282
286
 
287
+ expired = false
283
288
  if idp_certs.nil? || idp_certs[:signing].empty?
284
289
  valid = OneLogin::RubySaml::Utils.verify_signature(
285
- :cert => settings.get_idp_cert,
290
+ :cert => idp_cert,
286
291
  :sig_alg => options[:get_params]['SigAlg'],
287
292
  :signature => options[:get_params]['Signature'],
288
293
  :query_string => query_string
289
294
  )
295
+ if valid && settings.security[:check_idp_cert_expiration]
296
+ if OneLogin::RubySaml::Utils.is_cert_expired(idp_cert)
297
+ expired = true
298
+ end
299
+ end
290
300
  else
291
301
  valid = false
292
302
  idp_certs[:signing].each do |signing_idp_cert|
@@ -297,11 +307,20 @@ module OneLogin
297
307
  :query_string => query_string
298
308
  )
299
309
  if valid
310
+ if settings.security[:check_idp_cert_expiration]
311
+ if OneLogin::RubySaml::Utils.is_cert_expired(signing_idp_cert)
312
+ expired = true
313
+ end
314
+ end
300
315
  break
301
316
  end
302
317
  end
303
318
  end
304
319
 
320
+ if expired
321
+ error_msg = "IdP x509 certificate expired"
322
+ return append_error(error_msg)
323
+ end
305
324
  unless valid
306
325
  return append_error("Invalid Signature on Logout Request")
307
326
  end
@@ -2,6 +2,7 @@ require "onelogin/ruby-saml/logging"
2
2
 
3
3
  require "onelogin/ruby-saml/saml_message"
4
4
  require "onelogin/ruby-saml/utils"
5
+ require "onelogin/ruby-saml/setting_error"
5
6
 
6
7
  # Only supports SAML 2.0
7
8
  module OneLogin
@@ -21,23 +22,30 @@ module OneLogin
21
22
  @uuid = OneLogin::RubySaml::Utils.uuid
22
23
  end
23
24
 
25
+ def response_id
26
+ @uuid
27
+ end
28
+
24
29
  # Creates the Logout Response string.
25
30
  # @param settings [OneLogin::RubySaml::Settings|nil] Toolkit settings
26
31
  # @param request_id [String] The ID of the LogoutRequest sent by this SP to the IdP. That ID will be placed as the InResponseTo in the logout response
27
32
  # @param logout_message [String] The Message to be placed as StatusMessage in the logout response
28
33
  # @param params [Hash] Some extra parameters to be added in the GET for example the RelayState
34
+ # @param logout_status_code [String] The StatusCode to be placed as StatusMessage in the logout response
29
35
  # @return [String] Logout Request string that includes the SAMLRequest
30
36
  #
31
- def create(settings, request_id = nil, logout_message = nil, params = {})
32
- params = create_params(settings, request_id, logout_message, params)
37
+ def create(settings, request_id = nil, logout_message = nil, params = {}, logout_status_code = nil)
38
+ params = create_params(settings, request_id, logout_message, params, logout_status_code)
33
39
  params_prefix = (settings.idp_slo_target_url =~ /\?/) ? '&' : '?'
40
+ url = settings.idp_slo_response_service_url || settings.idp_slo_target_url
34
41
  saml_response = CGI.escape(params.delete("SAMLResponse"))
35
42
  response_params = "#{params_prefix}SAMLResponse=#{saml_response}"
36
43
  params.each_pair do |key, value|
37
44
  response_params << "&#{key.to_s}=#{CGI.escape(value.to_s)}"
38
45
  end
39
46
 
40
- @logout_url = settings.idp_slo_target_url + response_params
47
+ raise SettingError.new "Invalid settings, idp_slo_target_url is not set!" if url.nil? or url.empty?
48
+ @logout_url = url + response_params
41
49
  end
42
50
 
43
51
  # Creates the Get parameters for the logout response.
@@ -45,9 +53,10 @@ module OneLogin
45
53
  # @param request_id [String] The ID of the LogoutRequest sent by this SP to the IdP. That ID will be placed as the InResponseTo in the logout response
46
54
  # @param logout_message [String] The Message to be placed as StatusMessage in the logout response
47
55
  # @param params [Hash] Some extra parameters to be added in the GET for example the RelayState
56
+ # @param logout_status_code [String] The StatusCode to be placed as StatusMessage in the logout response
48
57
  # @return [Hash] Parameters
49
58
  #
50
- def create_params(settings, request_id = nil, logout_message = nil, params = {})
59
+ def create_params(settings, request_id = nil, logout_message = nil, params = {}, logout_status_code = nil)
51
60
  # The method expects :RelayState but sometimes we get 'RelayState' instead.
52
61
  # Based on the HashWithIndifferentAccess value in Rails we could experience
53
62
  # conflicts so this line will solve them.
@@ -58,7 +67,7 @@ module OneLogin
58
67
  params.delete('RelayState')
59
68
  end
60
69
 
61
- response_doc = create_logout_response_xml_doc(settings, request_id, logout_message)
70
+ response_doc = create_logout_response_xml_doc(settings, request_id, logout_message, logout_status_code)
62
71
  response_doc.context[:attribute_quote] = :quote if settings.double_quote_xml_attribute_values
63
72
 
64
73
  response = ""
@@ -94,46 +103,59 @@ module OneLogin
94
103
  # @param settings [OneLogin::RubySaml::Settings|nil] Toolkit settings
95
104
  # @param request_id [String] The ID of the LogoutRequest sent by this SP to the IdP. That ID will be placed as the InResponseTo in the logout response
96
105
  # @param logout_message [String] The Message to be placed as StatusMessage in the logout response
106
+ # @param logout_status_code [String] The StatusCode to be placed as StatusMessage in the logout response
97
107
  # @return [String] The SAMLResponse String.
98
108
  #
99
- def create_logout_response_xml_doc(settings, request_id = nil, logout_message = nil)
109
+ def create_logout_response_xml_doc(settings, request_id = nil, logout_message = nil, logout_status_code = nil)
110
+ document = create_xml_document(settings, request_id, logout_message, logout_status_code)
111
+ sign_document(document, settings)
112
+ end
113
+
114
+ def create_xml_document(settings, request_id = nil, logout_message = nil, status_code = nil)
100
115
  time = Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ')
101
116
 
102
117
  response_doc = XMLSecurity::Document.new
103
118
  response_doc.uuid = uuid
104
119
 
120
+ destination = settings.idp_slo_response_service_url || settings.idp_slo_target_url
121
+
105
122
  root = response_doc.add_element 'samlp:LogoutResponse', { 'xmlns:samlp' => 'urn:oasis:names:tc:SAML:2.0:protocol', "xmlns:saml" => "urn:oasis:names:tc:SAML:2.0:assertion" }
106
123
  root.attributes['ID'] = uuid
107
124
  root.attributes['IssueInstant'] = time
108
125
  root.attributes['Version'] = '2.0'
109
126
  root.attributes['InResponseTo'] = request_id unless request_id.nil?
110
- root.attributes['Destination'] = settings.idp_slo_target_url unless settings.idp_slo_target_url.nil?
127
+ root.attributes['Destination'] = destination unless destination.nil? or destination.empty?
111
128
 
112
- if settings.issuer != nil
129
+ if settings.sp_entity_id != nil
113
130
  issuer = root.add_element "saml:Issuer"
114
- issuer.text = settings.issuer
131
+ issuer.text = settings.sp_entity_id
115
132
  end
116
133
 
117
- # add success message
134
+ # add status
118
135
  status = root.add_element 'samlp:Status'
119
136
 
120
- # success status code
121
- status_code = status.add_element 'samlp:StatusCode'
122
- status_code.attributes['Value'] = 'urn:oasis:names:tc:SAML:2.0:status:Success'
137
+ # status code
138
+ status_code ||= 'urn:oasis:names:tc:SAML:2.0:status:Success'
139
+ status_code_elem = status.add_element 'samlp:StatusCode'
140
+ status_code_elem.attributes['Value'] = status_code
123
141
 
124
- # success status message
142
+ # status message
125
143
  logout_message ||= 'Successfully Signed Out'
126
144
  status_message = status.add_element 'samlp:StatusMessage'
127
145
  status_message.text = logout_message
128
146
 
147
+ response_doc
148
+ end
149
+
150
+ def sign_document(document, settings)
129
151
  # embed signature
130
152
  if settings.security[:logout_responses_signed] && settings.private_key && settings.certificate && settings.security[:embed_sign]
131
153
  private_key = settings.get_sp_key
132
154
  cert = settings.get_sp_cert
133
- response_doc.sign_document(private_key, cert, settings.security[:signature_method], settings.security[:digest_method])
155
+ document.sign_document(private_key, cert, settings.security[:signature_method], settings.security[:digest_method])
134
156
  end
135
157
 
136
- response_doc
158
+ document
137
159
  end
138
160
 
139
161
  end
@@ -3,6 +3,7 @@ if RUBY_VERSION < '1.9'
3
3
  else
4
4
  require 'securerandom'
5
5
  end
6
+ require "openssl"
6
7
 
7
8
  module OneLogin
8
9
  module RubySaml
@@ -14,6 +15,61 @@ module OneLogin
14
15
 
15
16
  DSIG = "http://www.w3.org/2000/09/xmldsig#"
16
17
  XENC = "http://www.w3.org/2001/04/xmlenc#"
18
+ DURATION_FORMAT = %r(^(-?)P(?:(?:(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?)|(?:(\d+)W))$)
19
+
20
+ # Checks if the x509 cert provided is expired
21
+ #
22
+ # @param cert [Certificate] The x509 certificate
23
+ #
24
+ def self.is_cert_expired(cert)
25
+ if cert.is_a?(String)
26
+ cert = OpenSSL::X509::Certificate.new(cert)
27
+ end
28
+
29
+ return cert.not_after < Time.now
30
+ end
31
+
32
+ # Interprets a ISO8601 duration value relative to a given timestamp.
33
+ #
34
+ # @param duration [String] The duration, as a string.
35
+ # @param timestamp [Integer] The unix timestamp we should apply the
36
+ # duration to. Optional, default to the
37
+ # current time.
38
+ #
39
+ # @return [Integer] The new timestamp, after the duration is applied.
40
+ #
41
+ def self.parse_duration(duration, timestamp=Time.now.utc)
42
+ matches = duration.match(DURATION_FORMAT)
43
+
44
+ if matches.nil?
45
+ raise Exception.new("Invalid ISO 8601 duration")
46
+ end
47
+
48
+ durYears = matches[2].to_i
49
+ durMonths = matches[3].to_i
50
+ durDays = matches[4].to_i
51
+ durHours = matches[5].to_i
52
+ durMinutes = matches[6].to_i
53
+ durSeconds = matches[7].to_f
54
+ durWeeks = matches[8].to_i
55
+
56
+ if matches[1] == "-"
57
+ durYears = -durYears
58
+ durMonths = -durMonths
59
+ durDays = -durDays
60
+ durHours = -durHours
61
+ durMinutes = -durMinutes
62
+ durSeconds = -durSeconds
63
+ durWeeks = -durWeeks
64
+ end
65
+
66
+ initial_datetime = Time.at(timestamp).utc.to_datetime
67
+ final_datetime = initial_datetime.next_year(durYears)
68
+ final_datetime = final_datetime.next_month(durMonths)
69
+ final_datetime = final_datetime.next_day((7*durWeeks) + durDays)
70
+ final_timestamp = final_datetime.to_time.utc.to_i + (durHours * 3600) + (durMinutes * 60) + durSeconds
71
+ return final_timestamp
72
+ end
17
73
 
18
74
  # Return a properly formatted x509 certificate
19
75
  #
@@ -22,7 +78,11 @@ module OneLogin
22
78
  #
23
79
  def self.format_cert(cert)
24
80
  # don't try to format an encoded certificate or if is empty or nil
25
- return cert if cert.nil? || cert.empty? || cert.match(/\x0d/)
81
+ if cert.respond_to?(:ascii_only?)
82
+ return cert if cert.nil? || cert.empty? || !cert.ascii_only?
83
+ else
84
+ return cert if cert.nil? || cert.empty? || cert.match(/\x0d/)
85
+ end
26
86
 
27
87
  if cert.scan(/BEGIN CERTIFICATE/).length > 1
28
88
  formatted_cert = []
@@ -236,6 +296,9 @@ module OneLogin
236
296
  when 'http://www.w3.org/2001/04/xmlenc#aes128-cbc' then cipher = OpenSSL::Cipher.new('AES-128-CBC').decrypt
237
297
  when 'http://www.w3.org/2001/04/xmlenc#aes192-cbc' then cipher = OpenSSL::Cipher.new('AES-192-CBC').decrypt
238
298
  when 'http://www.w3.org/2001/04/xmlenc#aes256-cbc' then cipher = OpenSSL::Cipher.new('AES-256-CBC').decrypt
299
+ when 'http://www.w3.org/2009/xmlenc11#aes128-gcm' then auth_cipher = OpenSSL::Cipher.new('AES-128-GCM').decrypt
300
+ when 'http://www.w3.org/2009/xmlenc11#aes192-gcm' then auth_cipher = OpenSSL::Cipher.new('AES-192-GCM').decrypt
301
+ when 'http://www.w3.org/2009/xmlenc11#aes256-gcm' then auth_cipher = OpenSSL::Cipher.new('AES-256-GCM').decrypt
239
302
  when 'http://www.w3.org/2001/04/xmlenc#rsa-1_5' then rsa = symmetric_key
240
303
  when 'http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p' then oaep = symmetric_key
241
304
  end
@@ -246,6 +309,16 @@ module OneLogin
246
309
  cipher.padding, cipher.key, cipher.iv = 0, symmetric_key, cipher_text[0..iv_len-1]
247
310
  assertion_plaintext = cipher.update(data)
248
311
  assertion_plaintext << cipher.final
312
+ elsif auth_cipher
313
+ iv_len, text_len, tag_len = auth_cipher.iv_len, cipher_text.length, 16
314
+ data = cipher_text[iv_len..text_len-1-tag_len]
315
+ auth_cipher.padding = 0
316
+ auth_cipher.key = symmetric_key
317
+ auth_cipher.iv = cipher_text[0..iv_len-1]
318
+ auth_cipher.auth_data = ''
319
+ auth_cipher.auth_tag = cipher_text[text_len-tag_len..-1]
320
+ assertion_plaintext = auth_cipher.update(data)
321
+ assertion_plaintext << auth_cipher.final
249
322
  elsif rsa
250
323
  rsa.private_decrypt(cipher_text)
251
324
  elsif oaep
@@ -1,5 +1,5 @@
1
1
  module OneLogin
2
2
  module RubySaml
3
- VERSION = '1.9.0'
3
+ VERSION = '1.12.0'
4
4
  end
5
5
  end
data/lib/xml_security.rb CHANGED
@@ -212,7 +212,7 @@ module XMLSecurity
212
212
  begin
213
213
  cert = OpenSSL::X509::Certificate.new(cert_text)
214
214
  rescue OpenSSL::X509::CertificateError => _e
215
- return append_error("Certificate Error", soft)
215
+ return append_error("Document Certificate Error", soft)
216
216
  end
217
217
 
218
218
  if options[:fingerprint_alg]
@@ -224,7 +224,6 @@ module XMLSecurity
224
224
 
225
225
  # check cert matches registered idp cert
226
226
  if fingerprint != idp_cert_fingerprint.gsub(/[^a-zA-Z0-9]/,"").downcase
227
- @errors << "Fingerprint mismatch"
228
227
  return append_error("Fingerprint mismatch", soft)
229
228
  end
230
229
  else
@@ -241,7 +240,7 @@ module XMLSecurity
241
240
  validate_signature(base64_cert, soft)
242
241
  end
243
242
 
244
- def validate_document_with_cert(idp_cert)
243
+ def validate_document_with_cert(idp_cert, soft = true)
245
244
  # get cert from response
246
245
  cert_element = REXML::XPath.first(
247
246
  self,
@@ -255,12 +254,12 @@ module XMLSecurity
255
254
  begin
256
255
  cert = OpenSSL::X509::Certificate.new(cert_text)
257
256
  rescue OpenSSL::X509::CertificateError => _e
258
- return append_error("Certificate Error", soft)
257
+ return append_error("Document Certificate Error", soft)
259
258
  end
260
259
 
261
260
  # check saml response cert matches provided idp cert
262
261
  if idp_cert.to_pem != cert.to_pem
263
- return false
262
+ return append_error("Certificate of the Signature element does not match provided certificate", soft)
264
263
  end
265
264
  else
266
265
  base64_cert = Base64.encode64(idp_cert.to_pem)
@@ -326,6 +325,9 @@ module XMLSecurity
326
325
  '//ds:CanonicalizationMethod',
327
326
  { "ds" => DSIG }
328
327
  )
328
+
329
+ canon_algorithm = process_transforms(ref, canon_algorithm)
330
+
329
331
  canon_hashed_element = hashed_element.canonicalize(canon_algorithm, inclusive_namespaces)
330
332
 
331
333
  digest_algorithm = algorithm(REXML::XPath.first(
@@ -342,7 +344,6 @@ module XMLSecurity
342
344
  digest_value = Base64.decode64(OneLogin::RubySaml::Utils.element_text(encoded_digest_value))
343
345
 
344
346
  unless digests_match?(hash, digest_value)
345
- @errors << "Digest mismatch"
346
347
  return append_error("Digest mismatch", soft)
347
348
  end
348
349
 
@@ -360,6 +361,33 @@ module XMLSecurity
360
361
 
361
362
  private
362
363
 
364
+ def process_transforms(ref, canon_algorithm)
365
+ transforms = REXML::XPath.match(
366
+ ref,
367
+ "//ds:Transforms/ds:Transform",
368
+ { "ds" => DSIG }
369
+ )
370
+
371
+ transforms.each do |transform_element|
372
+ if transform_element.attributes && transform_element.attributes["Algorithm"]
373
+ algorithm = transform_element.attributes["Algorithm"]
374
+ case algorithm
375
+ when "http://www.w3.org/TR/2001/REC-xml-c14n-20010315",
376
+ "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
377
+ canon_algorithm = Nokogiri::XML::XML_C14N_1_0
378
+ when "http://www.w3.org/2006/12/xml-c14n11",
379
+ "http://www.w3.org/2006/12/xml-c14n11#WithComments"
380
+ canon_algorithm = Nokogiri::XML::XML_C14N_1_1
381
+ when "http://www.w3.org/2001/10/xml-exc-c14n#",
382
+ "http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
383
+ canon_algorithm = Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0
384
+ end
385
+ end
386
+ end
387
+
388
+ canon_algorithm
389
+ end
390
+
363
391
  def digests_match?(hash, digest_value)
364
392
  hash == digest_value
365
393
  end
data/ruby-saml.gemspec CHANGED
@@ -15,31 +15,39 @@ Gem::Specification.new do |s|
15
15
  "LICENSE",
16
16
  "README.md"
17
17
  ]
18
- s.files = `git ls-files`.split("\n")
19
- s.homepage = %q{http://github.com/onelogin/ruby-saml}
20
- s.rubyforge_project = %q{http://www.rubygems.org/gems/ruby-saml}
18
+ s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ s.homepage = %q{https://github.com/onelogin/ruby-saml}
21
20
  s.rdoc_options = ["--charset=UTF-8"]
22
21
  s.require_paths = ["lib"]
23
22
  s.rubygems_version = %q{1.3.7}
24
23
  s.required_ruby_version = '>= 1.8.7'
25
24
  s.summary = %q{SAML Ruby Tookit}
26
- s.test_files = `git ls-files test/*`.split("\n")
27
25
 
28
26
  # Because runtime dependencies are determined at build time, we cannot make
29
27
  # Nokogiri's version dependent on the Ruby version, even though we would
30
28
  # have liked to constrain Ruby 1.8.7 to install only the 1.5.x versions.
31
29
  if defined?(JRUBY_VERSION)
32
- s.add_runtime_dependency('nokogiri', '>= 1.6.0')
33
- s.add_runtime_dependency('jruby-openssl', '>= 0.9.8') if JRUBY_VERSION < '9.2.0.0'
30
+ if JRUBY_VERSION < '9.2.0.0'
31
+ s.add_runtime_dependency('nokogiri', '>= 1.8.2', '<= 1.8.5')
32
+ s.add_runtime_dependency('jruby-openssl', '>= 0.9.8')
33
+ s.add_runtime_dependency('json', '< 2.3.0')
34
+ else
35
+ s.add_runtime_dependency('nokogiri', '>= 1.8.2')
36
+ end
34
37
  elsif RUBY_VERSION < '1.9'
35
38
  s.add_runtime_dependency('uuid')
36
39
  s.add_runtime_dependency('nokogiri', '<= 1.5.11')
37
40
  elsif RUBY_VERSION < '2.1'
38
41
  s.add_runtime_dependency('nokogiri', '>= 1.5.10', '<= 1.6.8.1')
42
+ s.add_runtime_dependency('json', '< 2.3.0')
43
+ elsif RUBY_VERSION < '2.3'
44
+ s.add_runtime_dependency('nokogiri', '>= 1.9.1', '<= 1.10.0')
39
45
  else
40
- s.add_runtime_dependency('nokogiri', '>= 1.5.10')
46
+ s.add_runtime_dependency('nokogiri', '>= 1.10.5')
47
+ s.add_runtime_dependency('rexml')
41
48
  end
42
49
 
50
+ s.add_development_dependency('coveralls')
43
51
  s.add_development_dependency('minitest', '~> 5.5')
44
52
  s.add_development_dependency('mocha', '~> 0.14')
45
53
  s.add_development_dependency('rake', '~> 10')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-saml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OneLogin LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-03 00:00:00.000000000 Z
11
+ date: 2021-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -16,14 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.5.10
19
+ version: 1.10.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.5.10
26
+ version: 1.10.5
27
+ - !ruby/object:Gem::Dependency
28
+ name: rexml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: coveralls
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: minitest
29
57
  requirement: !ruby/object:Gem::Requirement
@@ -166,6 +194,7 @@ files:
166
194
  - lib/onelogin/ruby-saml/metadata.rb
167
195
  - lib/onelogin/ruby-saml/response.rb
168
196
  - lib/onelogin/ruby-saml/saml_message.rb
197
+ - lib/onelogin/ruby-saml/setting_error.rb
169
198
  - lib/onelogin/ruby-saml/settings.rb
170
199
  - lib/onelogin/ruby-saml/slo_logoutrequest.rb
171
200
  - lib/onelogin/ruby-saml/slo_logoutresponse.rb
@@ -187,142 +216,7 @@ files:
187
216
  - lib/schemas/xmldsig-core-schema.xsd
188
217
  - lib/xml_security.rb
189
218
  - ruby-saml.gemspec
190
- - test/certificates/certificate1
191
- - test/certificates/certificate_without_head_foot
192
- - test/certificates/formatted_certificate
193
- - test/certificates/formatted_chained_certificate
194
- - test/certificates/formatted_private_key
195
- - test/certificates/formatted_rsa_private_key
196
- - test/certificates/invalid_certificate1
197
- - test/certificates/invalid_certificate2
198
- - test/certificates/invalid_certificate3
199
- - test/certificates/invalid_chained_certificate1
200
- - test/certificates/invalid_private_key1
201
- - test/certificates/invalid_private_key2
202
- - test/certificates/invalid_private_key3
203
- - test/certificates/invalid_rsa_private_key1
204
- - test/certificates/invalid_rsa_private_key2
205
- - test/certificates/invalid_rsa_private_key3
206
- - test/certificates/ruby-saml-2.crt
207
- - test/certificates/ruby-saml.crt
208
- - test/certificates/ruby-saml.key
209
- - test/idp_metadata_parser_test.rb
210
- - test/logging_test.rb
211
- - test/logout_requests/invalid_slo_request.xml
212
- - test/logout_requests/slo_request.xml
213
- - test/logout_requests/slo_request.xml.base64
214
- - test/logout_requests/slo_request_deflated.xml.base64
215
- - test/logout_requests/slo_request_with_name_id_format.xml
216
- - test/logout_requests/slo_request_with_session_index.xml
217
- - test/logout_responses/logoutresponse_fixtures.rb
218
- - test/logoutrequest_test.rb
219
- - test/logoutresponse_test.rb
220
- - test/metadata/idp_descriptor.xml
221
- - test/metadata/idp_descriptor_2.xml
222
- - test/metadata/idp_descriptor_3.xml
223
- - test/metadata/idp_descriptor_4.xml
224
- - test/metadata/idp_metadata_different_sign_and_encrypt_cert.xml
225
- - test/metadata/idp_metadata_multi_certs.xml
226
- - test/metadata/idp_metadata_multi_signing_certs.xml
227
- - test/metadata/idp_metadata_same_sign_and_encrypt_cert.xml
228
- - test/metadata/idp_multiple_descriptors.xml
229
- - test/metadata/no_idp_descriptor.xml
230
- - test/metadata_test.rb
231
- - test/request_test.rb
232
- - test/response_test.rb
233
- - test/responses/adfs_response_sha1.xml
234
- - test/responses/adfs_response_sha256.xml
235
- - test/responses/adfs_response_sha384.xml
236
- - test/responses/adfs_response_sha512.xml
237
- - test/responses/adfs_response_xmlns.xml
238
- - test/responses/attackxee.xml
239
- - test/responses/invalids/duplicated_attributes.xml.base64
240
- - test/responses/invalids/empty_destination.xml.base64
241
- - test/responses/invalids/empty_nameid.xml.base64
242
- - test/responses/invalids/encrypted_new_attack.xml.base64
243
- - test/responses/invalids/invalid_audience.xml.base64
244
- - test/responses/invalids/invalid_issuer_assertion.xml.base64
245
- - test/responses/invalids/invalid_issuer_message.xml.base64
246
- - test/responses/invalids/invalid_signature_position.xml.base64
247
- - test/responses/invalids/invalid_subjectconfirmation_inresponse.xml.base64
248
- - test/responses/invalids/invalid_subjectconfirmation_nb.xml.base64
249
- - test/responses/invalids/invalid_subjectconfirmation_noa.xml.base64
250
- - test/responses/invalids/invalid_subjectconfirmation_recipient.xml.base64
251
- - test/responses/invalids/multiple_assertions.xml.base64
252
- - test/responses/invalids/multiple_signed.xml.base64
253
- - test/responses/invalids/no_authnstatement.xml.base64
254
- - test/responses/invalids/no_conditions.xml.base64
255
- - test/responses/invalids/no_id.xml.base64
256
- - test/responses/invalids/no_issuer_assertion.xml.base64
257
- - test/responses/invalids/no_issuer_response.xml.base64
258
- - test/responses/invalids/no_nameid.xml.base64
259
- - test/responses/invalids/no_saml2.xml.base64
260
- - test/responses/invalids/no_signature.xml.base64
261
- - test/responses/invalids/no_status.xml.base64
262
- - test/responses/invalids/no_status_code.xml.base64
263
- - test/responses/invalids/no_subjectconfirmation_data.xml.base64
264
- - test/responses/invalids/no_subjectconfirmation_method.xml.base64
265
- - test/responses/invalids/response_invalid_signed_element.xml.base64
266
- - test/responses/invalids/response_with_concealed_signed_assertion.xml
267
- - test/responses/invalids/response_with_doubled_signed_assertion.xml
268
- - test/responses/invalids/signature_wrapping_attack.xml.base64
269
- - test/responses/invalids/status_code_responder.xml.base64
270
- - test/responses/invalids/status_code_responer_and_msg.xml.base64
271
- - test/responses/invalids/wrong_spnamequalifier.xml.base64
272
- - test/responses/no_signature_ns.xml
273
- - test/responses/open_saml_response.xml
274
- - test/responses/response_assertion_wrapped.xml.base64
275
- - test/responses/response_audience_self_closed_tag.xml.base64
276
- - test/responses/response_double_status_code.xml.base64
277
- - test/responses/response_encrypted_attrs.xml.base64
278
- - test/responses/response_encrypted_nameid.xml.base64
279
- - test/responses/response_eval.xml
280
- - test/responses/response_no_cert_and_encrypted_attrs.xml
281
- - test/responses/response_node_text_attack.xml.base64
282
- - test/responses/response_node_text_attack2.xml.base64
283
- - test/responses/response_node_text_attack3.xml.base64
284
- - test/responses/response_unsigned_xml_base64
285
- - test/responses/response_with_ampersands.xml
286
- - test/responses/response_with_ampersands.xml.base64
287
- - test/responses/response_with_ds_namespace_at_the_root.xml.base64
288
- - test/responses/response_with_multiple_attribute_statements.xml
289
- - test/responses/response_with_multiple_attribute_values.xml
290
- - test/responses/response_with_retrieval_method.xml
291
- - test/responses/response_with_saml2_namespace.xml.base64
292
- - test/responses/response_with_signed_assertion.xml.base64
293
- - test/responses/response_with_signed_assertion_2.xml.base64
294
- - test/responses/response_with_signed_assertion_3.xml
295
- - test/responses/response_with_signed_message_and_assertion.xml
296
- - test/responses/response_with_undefined_recipient.xml.base64
297
- - test/responses/response_without_attributes.xml.base64
298
- - test/responses/response_without_reference_uri.xml.base64
299
- - test/responses/response_wrapped.xml.base64
300
- - test/responses/signed_message_encrypted_signed_assertion.xml.base64
301
- - test/responses/signed_message_encrypted_unsigned_assertion.xml.base64
302
- - test/responses/signed_nameid_in_atts.xml
303
- - test/responses/signed_unqual_nameid_in_atts.xml
304
- - test/responses/simple_saml_php.xml
305
- - test/responses/starfield_response.xml.base64
306
- - test/responses/test_sign.xml
307
- - test/responses/unsigned_encrypted_adfs.xml
308
- - test/responses/unsigned_message_aes128_encrypted_signed_assertion.xml.base64
309
- - test/responses/unsigned_message_aes192_encrypted_signed_assertion.xml.base64
310
- - test/responses/unsigned_message_aes256_encrypted_signed_assertion.xml.base64
311
- - test/responses/unsigned_message_des192_encrypted_signed_assertion.xml.base64
312
- - test/responses/unsigned_message_encrypted_assertion_without_saml_namespace.xml.base64
313
- - test/responses/unsigned_message_encrypted_signed_assertion.xml.base64
314
- - test/responses/unsigned_message_encrypted_unsigned_assertion.xml.base64
315
- - test/responses/valid_response.xml.base64
316
- - test/responses/valid_response_with_formatted_x509certificate.xml.base64
317
- - test/responses/valid_response_without_x509certificate.xml.base64
318
- - test/saml_message_test.rb
319
- - test/settings_test.rb
320
- - test/slo_logoutrequest_test.rb
321
- - test/slo_logoutresponse_test.rb
322
- - test/test_helper.rb
323
- - test/utils_test.rb
324
- - test/xml_security_test.rb
325
- homepage: http://github.com/onelogin/ruby-saml
219
+ homepage: https://github.com/onelogin/ruby-saml
326
220
  licenses:
327
221
  - MIT
328
222
  metadata: {}
@@ -342,144 +236,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
342
236
  - !ruby/object:Gem::Version
343
237
  version: '0'
344
238
  requirements: []
345
- rubyforge_project: http://www.rubygems.org/gems/ruby-saml
346
- rubygems_version: 2.4.8
239
+ rubygems_version: 3.0.8
347
240
  signing_key:
348
241
  specification_version: 4
349
242
  summary: SAML Ruby Tookit
350
- test_files:
351
- - test/certificates/certificate1
352
- - test/certificates/certificate_without_head_foot
353
- - test/certificates/formatted_certificate
354
- - test/certificates/formatted_chained_certificate
355
- - test/certificates/formatted_private_key
356
- - test/certificates/formatted_rsa_private_key
357
- - test/certificates/invalid_certificate1
358
- - test/certificates/invalid_certificate2
359
- - test/certificates/invalid_certificate3
360
- - test/certificates/invalid_chained_certificate1
361
- - test/certificates/invalid_private_key1
362
- - test/certificates/invalid_private_key2
363
- - test/certificates/invalid_private_key3
364
- - test/certificates/invalid_rsa_private_key1
365
- - test/certificates/invalid_rsa_private_key2
366
- - test/certificates/invalid_rsa_private_key3
367
- - test/certificates/ruby-saml-2.crt
368
- - test/certificates/ruby-saml.crt
369
- - test/certificates/ruby-saml.key
370
- - test/idp_metadata_parser_test.rb
371
- - test/logging_test.rb
372
- - test/logout_requests/invalid_slo_request.xml
373
- - test/logout_requests/slo_request.xml
374
- - test/logout_requests/slo_request.xml.base64
375
- - test/logout_requests/slo_request_deflated.xml.base64
376
- - test/logout_requests/slo_request_with_name_id_format.xml
377
- - test/logout_requests/slo_request_with_session_index.xml
378
- - test/logout_responses/logoutresponse_fixtures.rb
379
- - test/logoutrequest_test.rb
380
- - test/logoutresponse_test.rb
381
- - test/metadata/idp_descriptor.xml
382
- - test/metadata/idp_descriptor_2.xml
383
- - test/metadata/idp_descriptor_3.xml
384
- - test/metadata/idp_descriptor_4.xml
385
- - test/metadata/idp_metadata_different_sign_and_encrypt_cert.xml
386
- - test/metadata/idp_metadata_multi_certs.xml
387
- - test/metadata/idp_metadata_multi_signing_certs.xml
388
- - test/metadata/idp_metadata_same_sign_and_encrypt_cert.xml
389
- - test/metadata/idp_multiple_descriptors.xml
390
- - test/metadata/no_idp_descriptor.xml
391
- - test/metadata_test.rb
392
- - test/request_test.rb
393
- - test/response_test.rb
394
- - test/responses/adfs_response_sha1.xml
395
- - test/responses/adfs_response_sha256.xml
396
- - test/responses/adfs_response_sha384.xml
397
- - test/responses/adfs_response_sha512.xml
398
- - test/responses/adfs_response_xmlns.xml
399
- - test/responses/attackxee.xml
400
- - test/responses/invalids/duplicated_attributes.xml.base64
401
- - test/responses/invalids/empty_destination.xml.base64
402
- - test/responses/invalids/empty_nameid.xml.base64
403
- - test/responses/invalids/encrypted_new_attack.xml.base64
404
- - test/responses/invalids/invalid_audience.xml.base64
405
- - test/responses/invalids/invalid_issuer_assertion.xml.base64
406
- - test/responses/invalids/invalid_issuer_message.xml.base64
407
- - test/responses/invalids/invalid_signature_position.xml.base64
408
- - test/responses/invalids/invalid_subjectconfirmation_inresponse.xml.base64
409
- - test/responses/invalids/invalid_subjectconfirmation_nb.xml.base64
410
- - test/responses/invalids/invalid_subjectconfirmation_noa.xml.base64
411
- - test/responses/invalids/invalid_subjectconfirmation_recipient.xml.base64
412
- - test/responses/invalids/multiple_assertions.xml.base64
413
- - test/responses/invalids/multiple_signed.xml.base64
414
- - test/responses/invalids/no_authnstatement.xml.base64
415
- - test/responses/invalids/no_conditions.xml.base64
416
- - test/responses/invalids/no_id.xml.base64
417
- - test/responses/invalids/no_issuer_assertion.xml.base64
418
- - test/responses/invalids/no_issuer_response.xml.base64
419
- - test/responses/invalids/no_nameid.xml.base64
420
- - test/responses/invalids/no_saml2.xml.base64
421
- - test/responses/invalids/no_signature.xml.base64
422
- - test/responses/invalids/no_status.xml.base64
423
- - test/responses/invalids/no_status_code.xml.base64
424
- - test/responses/invalids/no_subjectconfirmation_data.xml.base64
425
- - test/responses/invalids/no_subjectconfirmation_method.xml.base64
426
- - test/responses/invalids/response_invalid_signed_element.xml.base64
427
- - test/responses/invalids/response_with_concealed_signed_assertion.xml
428
- - test/responses/invalids/response_with_doubled_signed_assertion.xml
429
- - test/responses/invalids/signature_wrapping_attack.xml.base64
430
- - test/responses/invalids/status_code_responder.xml.base64
431
- - test/responses/invalids/status_code_responer_and_msg.xml.base64
432
- - test/responses/invalids/wrong_spnamequalifier.xml.base64
433
- - test/responses/no_signature_ns.xml
434
- - test/responses/open_saml_response.xml
435
- - test/responses/response_assertion_wrapped.xml.base64
436
- - test/responses/response_audience_self_closed_tag.xml.base64
437
- - test/responses/response_double_status_code.xml.base64
438
- - test/responses/response_encrypted_attrs.xml.base64
439
- - test/responses/response_encrypted_nameid.xml.base64
440
- - test/responses/response_eval.xml
441
- - test/responses/response_no_cert_and_encrypted_attrs.xml
442
- - test/responses/response_node_text_attack.xml.base64
443
- - test/responses/response_node_text_attack2.xml.base64
444
- - test/responses/response_node_text_attack3.xml.base64
445
- - test/responses/response_unsigned_xml_base64
446
- - test/responses/response_with_ampersands.xml
447
- - test/responses/response_with_ampersands.xml.base64
448
- - test/responses/response_with_ds_namespace_at_the_root.xml.base64
449
- - test/responses/response_with_multiple_attribute_statements.xml
450
- - test/responses/response_with_multiple_attribute_values.xml
451
- - test/responses/response_with_retrieval_method.xml
452
- - test/responses/response_with_saml2_namespace.xml.base64
453
- - test/responses/response_with_signed_assertion.xml.base64
454
- - test/responses/response_with_signed_assertion_2.xml.base64
455
- - test/responses/response_with_signed_assertion_3.xml
456
- - test/responses/response_with_signed_message_and_assertion.xml
457
- - test/responses/response_with_undefined_recipient.xml.base64
458
- - test/responses/response_without_attributes.xml.base64
459
- - test/responses/response_without_reference_uri.xml.base64
460
- - test/responses/response_wrapped.xml.base64
461
- - test/responses/signed_message_encrypted_signed_assertion.xml.base64
462
- - test/responses/signed_message_encrypted_unsigned_assertion.xml.base64
463
- - test/responses/signed_nameid_in_atts.xml
464
- - test/responses/signed_unqual_nameid_in_atts.xml
465
- - test/responses/simple_saml_php.xml
466
- - test/responses/starfield_response.xml.base64
467
- - test/responses/test_sign.xml
468
- - test/responses/unsigned_encrypted_adfs.xml
469
- - test/responses/unsigned_message_aes128_encrypted_signed_assertion.xml.base64
470
- - test/responses/unsigned_message_aes192_encrypted_signed_assertion.xml.base64
471
- - test/responses/unsigned_message_aes256_encrypted_signed_assertion.xml.base64
472
- - test/responses/unsigned_message_des192_encrypted_signed_assertion.xml.base64
473
- - test/responses/unsigned_message_encrypted_assertion_without_saml_namespace.xml.base64
474
- - test/responses/unsigned_message_encrypted_signed_assertion.xml.base64
475
- - test/responses/unsigned_message_encrypted_unsigned_assertion.xml.base64
476
- - test/responses/valid_response.xml.base64
477
- - test/responses/valid_response_with_formatted_x509certificate.xml.base64
478
- - test/responses/valid_response_without_x509certificate.xml.base64
479
- - test/saml_message_test.rb
480
- - test/settings_test.rb
481
- - test/slo_logoutrequest_test.rb
482
- - test/slo_logoutresponse_test.rb
483
- - test/test_helper.rb
484
- - test/utils_test.rb
485
- - test/xml_security_test.rb
243
+ test_files: []