saml-kit 1.5.1 → 1.5.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55bb650eff422a517582801633097c71478c4294f5cc8a4ff5bd3842545609ff
4
- data.tar.gz: 2b9dfe74c62d2c04cd83453f9a579a4192a854b87124de15e92d49375d31000b
3
+ metadata.gz: 5e5a4419614e649a1902c406bc06769776e4753194126117b2c78c5c5c98cf85
4
+ data.tar.gz: a9a11fa9c29a876a1015743fe91bcea92aa0e4ddb3828112de791e1b03758d8f
5
5
  SHA512:
6
- metadata.gz: b89dcaf5a139f92e8bd641bada1226a738aaaf92a06dbfcf2004f628f4e7f56822ae4aad6276f961bb1cce7b4e9482e388d3b0e24ce90b431ab7fd187d1b3db9
7
- data.tar.gz: a98cb7a584d24fe7a0a7093d6e1028c27d777c2d26a42b621d1d5793adee1bc7e214140a2bcaeb04d14f74ee82519cdbb01ae7fbe774d005f0567a7a07c1739d
6
+ metadata.gz: 82efc3e07b409dc47d3dcb5a7abbea1644d9abc5c9bde5474f883b81ee482aac57be659b4e03972586fbdfa3decdbebb094c62b73d305c4ae0f901dd05fc4d91
7
+ data.tar.gz: e962652a31358fe3fefc0efb0fcbf4c15ff81c8668ace790da14990c03069b5b9e4c97a765b4d30eadd332533a8e3c564d8db51071e4667a1fd09de6940dbe60
data/CHANGELOG.md CHANGED
@@ -1,12 +1,29 @@
1
- Version 1.5.1
2
-
3
1
  # Changelog
4
2
  All notable changes to this project will be documented in this file.
5
3
 
6
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
7
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
6
 
9
- ## [Unreleased]
7
+ ## [1.5.2](https://github.com/mokhan-ca/saml-kit/compare/v1.5.1...v1.5.2) (2026-11-25)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * decrypt a copy of the document ([85d58df](https://github.com/mokhan-ca/saml-kit/commit/85d58df05790895f04cfd9deba84467ba8b20a8b))
13
+ * link the gem to its repository and changelog ([354e379](https://github.com/mokhan-ca/saml-kit/commit/354e379f9337a72e217fb866000578d57cb3c41d))
14
+ * read the name id of a refused document ([ad135e2](https://github.com/mokhan-ca/saml-kit/commit/ad135e2fc4363cdd12fb72e24d6659783f72b117))
15
+ * read to_h from the nokogiri tree ([e09dae7](https://github.com/mokhan-ca/saml-kit/commit/e09dae7bfa43cc417dcf764046cb291cbb66e875))
16
+ * read xml of any encoding as utf-8 ([52bce6b](https://github.com/mokhan-ca/saml-kit/commit/52bce6be2579064c3b483fedb93e668b7e08a83e))
17
+ * report an unreadable certificate as missing ([ab68ac9](https://github.com/mokhan-ca/saml-kit/commit/ab68ac9fd3ccaec67c8ac77ef8de0b27cea08106))
18
+ * require a registered key when a Response is signed ([72f79de](https://github.com/mokhan-ca/saml-kit/commit/72f79de169c14febe07549881a655f46c3acaa9c))
19
+ * require an identity provider to issue a Response ([3a8c0c1](https://github.com/mokhan-ca/saml-kit/commit/3a8c0c126aff30c1a9911e835ca1c6e59d2d38ca))
20
+ * require nokogiri 1.19.1 ([46c101b](https://github.com/mokhan-ca/saml-kit/commit/46c101b40cfcad5e1cfd98a6b2f202a74ba90245))
21
+ * require the same issuer on a Response and its Assertion ([a9236ec](https://github.com/mokhan-ca/saml-kit/commit/a9236ec85430864c3910606ded5b6f10a179cad2))
22
+ * require valid utf-8 in a decrypted Assertion ([a79113a](https://github.com/mokhan-ca/saml-kit/commit/a79113a382a9ba2ed0bd249d0eed2a6ef271d3dc))
23
+ * require well formed xml without a document type ([69aa755](https://github.com/mokhan-ca/saml-kit/commit/69aa7550a6128f769cc4f7882c5631251c77f3e4))
24
+ * require xml-kit 0.7 ([7eb7705](https://github.com/mokhan-ca/saml-kit/commit/7eb77058bf14712b5b9982c7df611c01186c8acf))
25
+ * return both descriptors from CompositeMetadata ([8f4dcdc](https://github.com/mokhan-ca/saml-kit/commit/8f4dcdc1d55e3c458f1403c31cf9e132d57b4041))
26
+ * translate each error of a refused document ([bae0d41](https://github.com/mokhan-ca/saml-kit/commit/bae0d4110950c986d64288aa697e79f8a7893cc6))
10
27
 
11
28
  ## [1.5.1] - 2026-08-18
12
29
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,24 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- saml-kit (1.5.1)
4
+ saml-kit (1.5.2)
5
5
  activemodel (>= 5.1)
6
6
  base64 (~> 0.1)
7
7
  cgi (~> 0.1)
8
8
  forwardable (~> 1.0)
9
9
  logger (~> 1.0)
10
10
  net-hippie (~> 1.0)
11
- nokogiri (~> 1.0)
11
+ nokogiri (~> 1.19, >= 1.19.1)
12
12
  securerandom (~> 0.1)
13
13
  uri (~> 1.0)
14
- xml-kit (~> 0.4)
14
+ xml-kit (~> 0.7)
15
15
 
16
16
  GEM
17
17
  remote: https://rubygems.org/
18
18
  specs:
19
- activemodel (8.1.3.1)
20
- activesupport (= 8.1.3.1)
21
- activesupport (8.1.3.1)
19
+ activemodel (8.1.4.1)
20
+ activesupport (= 8.1.4.1)
21
+ activesupport (8.1.4.1)
22
22
  base64
23
23
  bigdecimal
24
24
  concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -31,7 +31,7 @@ GEM
31
31
  securerandom (>= 0.3)
32
32
  tzinfo (~> 2.0, >= 2.0.5)
33
33
  uri (>= 0.13.1)
34
- addressable (2.9.0)
34
+ addressable (2.10.0)
35
35
  public_suffix (>= 2.0.2, < 8.0)
36
36
  ast (2.4.3)
37
37
  base64 (0.3.0)
@@ -40,8 +40,8 @@ GEM
40
40
  benchmark-trend (0.4.0)
41
41
  bigdecimal (4.1.2)
42
42
  builder (3.3.0)
43
- bundler-audit (0.9.2)
44
- bundler (>= 1.2.0, < 3)
43
+ bundler-audit (0.9.3)
44
+ bundler (>= 1.2.0)
45
45
  thor (~> 1.0)
46
46
  cgi (0.5.2)
47
47
  concurrent-ruby (1.3.8)
@@ -75,24 +75,24 @@ GEM
75
75
  prism (~> 1.5)
76
76
  net-hippie (1.2.0)
77
77
  logger (~> 1.0)
78
- nokogiri (1.19.4)
78
+ nokogiri (1.19.7)
79
79
  mini_portile2 (~> 2.8.2)
80
80
  racc (~> 1.4)
81
- nokogiri (1.19.4-aarch64-linux-gnu)
81
+ nokogiri (1.19.7-aarch64-linux-gnu)
82
82
  racc (~> 1.4)
83
- nokogiri (1.19.4-aarch64-linux-musl)
83
+ nokogiri (1.19.7-aarch64-linux-musl)
84
84
  racc (~> 1.4)
85
- nokogiri (1.19.4-arm-linux-gnu)
85
+ nokogiri (1.19.7-arm-linux-gnu)
86
86
  racc (~> 1.4)
87
- nokogiri (1.19.4-arm-linux-musl)
87
+ nokogiri (1.19.7-arm-linux-musl)
88
88
  racc (~> 1.4)
89
- nokogiri (1.19.4-arm64-darwin)
89
+ nokogiri (1.19.7-arm64-darwin)
90
90
  racc (~> 1.4)
91
- nokogiri (1.19.4-x86_64-darwin)
91
+ nokogiri (1.19.7-x86_64-darwin)
92
92
  racc (~> 1.4)
93
- nokogiri (1.19.4-x86_64-linux-gnu)
93
+ nokogiri (1.19.7-x86_64-linux-gnu)
94
94
  racc (~> 1.4)
95
- nokogiri (1.19.4-x86_64-linux-musl)
95
+ nokogiri (1.19.7-x86_64-linux-musl)
96
96
  racc (~> 1.4)
97
97
  parallel (1.26.3)
98
98
  parser (3.3.7.3)
@@ -150,7 +150,6 @@ GEM
150
150
  rubocop-rspec (3.5.0)
151
151
  lint_roller (~> 1.1)
152
152
  rubocop (~> 1.72, >= 1.72.1)
153
- ruby-prof (1.7.1)
154
153
  ruby-progressbar (1.13.0)
155
154
  securerandom (0.4.1)
156
155
  simplecov (0.22.0)
@@ -172,10 +171,10 @@ GEM
172
171
  addressable (>= 2.8.0)
173
172
  crack (>= 0.3.2)
174
173
  hashdiff (>= 0.4.0, < 2.0.0)
175
- xml-kit (0.6.0)
174
+ xml-kit (0.7.0)
176
175
  activemodel (>= 4.2.0)
177
176
  builder (~> 3.2)
178
- nokogiri (~> 1.10)
177
+ nokogiri (~> 1.19, >= 1.19.1)
179
178
  tilt (>= 1.4.1)
180
179
  xmldsig (~> 0.6)
181
180
  xmldsig (0.7.0)
@@ -193,7 +192,6 @@ PLATFORMS
193
192
  x86_64-linux-musl
194
193
 
195
194
  DEPENDENCIES
196
- bundler (~> 2.0)
197
195
  bundler-audit (~> 0.6)
198
196
  erb (~> 4.0)
199
197
  ffaker (~> 2.7)
@@ -203,10 +201,9 @@ DEPENDENCIES
203
201
  rspec-benchmark (~> 0.3)
204
202
  rubocop (~> 1.0)
205
203
  rubocop-rspec (~> 3.0)
206
- ruby-prof
207
204
  saml-kit!
208
205
  simplecov (~> 0.15)
209
206
  webmock (~> 3.1)
210
207
 
211
208
  BUNDLED WITH
212
- 2.6.6
209
+ 4.0.17
data/LICENSE.txt CHANGED
@@ -1,6 +1,7 @@
1
1
  The MIT License (MIT)
2
2
 
3
3
  Copyright (c) 2017 mo khan
4
+ Copyright (c) 2026 2809074 Alberta Ltd.
4
5
 
5
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
7
  of this software and associated documentation files (the "Software"), to deal
@@ -6,6 +6,7 @@ module Saml
6
6
  # element nested in a Response element
7
7
  # of a SAML document.
8
8
  class Assertion < Document
9
+ include Assertable
9
10
  extend Forwardable
10
11
  XPATH = [
11
12
  '/samlp:Response/saml:Assertion',
@@ -25,10 +26,9 @@ module Saml
25
26
  node, configuration: Saml::Kit.configuration, private_keys: []
26
27
  )
27
28
  @name = 'Assertion'
28
- @to_nokogiri = node.is_a?(String) ? Nokogiri::XML(node).root : node
29
+ @to_nokogiri = node.is_a?(String) ? Parser.parse(node).root : node
29
30
  @configuration = configuration
30
31
  @occurred_at = Time.current
31
- @cannot_decrypt = false
32
32
  @encrypted = false
33
33
  keys = configuration.private_keys(use: :encryption) + private_keys
34
34
  decrypt(::Xml::Kit::Decryption.new(private_keys: keys.uniq))
@@ -105,16 +105,24 @@ module Saml
105
105
  end
106
106
 
107
107
  def decrypt(decryptor)
108
- encrypted_assertion = at_xpath('./xmlenc:EncryptedData')
109
- @encrypted = encrypted_assertion.present?
110
- return unless @encrypted
108
+ encrypted_data = at_xpath('./xmlenc:EncryptedData')
109
+ @encrypted = encrypted_data.present?
110
+ return unless encrypted?
111
111
 
112
- @to_nokogiri = decryptor.decrypt_node(encrypted_assertion)
112
+ node = decryptor.decrypt_node(copy(encrypted_data))
113
+ raise EncodingError, 'plaintext is not valid UTF-8' unless node.to_s.valid_encoding?
114
+
115
+ @to_nokogiri = node
113
116
  rescue StandardError => error
114
117
  @cannot_decrypt = true
115
118
  Saml::Kit.logger.error(error)
116
119
  end
117
120
 
121
+ def copy(node)
122
+ position = node.document.xpath('//*').index(node)
123
+ node.document.dup.xpath('//*')[position]
124
+ end
125
+
118
126
  def must_match_issuer
119
127
  return if audiences.empty? || audiences.include?(configuration.entity_id)
120
128
 
@@ -14,10 +14,9 @@ module Saml
14
14
 
15
15
  def initialize(xml)
16
16
  super('IDPSSODescriptor', xml)
17
- @metadatum = [
18
- Saml::Kit::ServiceProviderMetadata.new(xml),
19
- Saml::Kit::IdentityProviderMetadata.new(xml),
20
- ]
17
+ @service_provider = Saml::Kit::ServiceProviderMetadata.new(xml)
18
+ @identity_provider = Saml::Kit::IdentityProviderMetadata.new(xml)
19
+ @metadatum = [@service_provider, @identity_provider]
21
20
  end
22
21
 
23
22
  def organization
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Saml
4
+ module Kit
5
+ module Assertable
6
+ def provider
7
+ metadata = super
8
+ metadata.respond_to?(:identity_provider) ? metadata.identity_provider : metadata
9
+ end
10
+ end
11
+ end
12
+ end
@@ -16,7 +16,7 @@ module Saml
16
16
 
17
17
  # Returns the SAML document returned as a Hash.
18
18
  def to_h
19
- @to_h ||= Hash.from_xml(to_s) || {}
19
+ @to_h ||= XmlHash.from(at_xpath('descendant-or-self::*'))
20
20
  end
21
21
 
22
22
  # Returns the XML document as a String.
@@ -39,7 +39,7 @@ module Saml
39
39
 
40
40
  # @!visibility private
41
41
  def to_nokogiri
42
- @to_nokogiri ||= Nokogiri::XML(to_s)
42
+ @to_nokogiri ||= Parser.parse(to_s)
43
43
  end
44
44
 
45
45
  # @!visibility private
@@ -77,7 +77,7 @@ module Saml
77
77
  saml: Namespaces::ASSERTION,
78
78
  samlp: Namespaces::PROTOCOL,
79
79
  }
80
- element = Nokogiri::XML(xml).at_xpath(XPATH, namespaces)
80
+ element = Parser.parse(xml).at_xpath(XPATH, namespaces)
81
81
  constructor = CONSTRUCTORS[element.name].try(:call) || InvalidDocument
82
82
  constructor.new(xml, configuration: configuration)
83
83
  rescue StandardError => error
@@ -14,6 +14,8 @@ module Saml
14
14
  super(xml, name: 'InvalidDocument')
15
15
  end
16
16
 
17
+ def name_id; end
18
+
17
19
  def to_h
18
20
  super
19
21
  rescue StandardError
@@ -15,16 +15,26 @@ en:
15
15
  AuthnRequest:
16
16
  invalid: "must contain AuthnRequest."
17
17
  invalid_fingerprint: "is not registered."
18
+ invalid_version: "must be 2.0."
18
19
  unregistered: "is unregistered."
19
20
  IDPSSODescriptor:
20
21
  invalid: "must contain IDPSSODescriptor."
21
22
  invalid_signature: "invalid signature."
22
23
  InvalidDocument:
23
24
  invalid: "must contain valid SAMLRequest"
25
+ invalid_fingerprint: "is not registered."
26
+ invalid_version: "must be 2.0."
27
+ unregistered: "is unregistered."
24
28
  LogoutRequest:
29
+ invalid: "must contain LogoutRequest."
25
30
  invalid_fingerprint: "is not registered."
31
+ invalid_version: "must be 2.0."
26
32
  unregistered: "is unregistered."
27
33
  LogoutResponse:
34
+ invalid: "must contain LogoutResponse."
35
+ invalid_fingerprint: "is not registered."
36
+ invalid_response_to: "must match request id."
37
+ invalid_version: "must be 2.0."
28
38
  unregistered: "is unregistered."
29
39
  NullAssertion:
30
40
  invalid: "is missing."
@@ -35,6 +45,7 @@ en:
35
45
  invalid_version: "must be 2.0."
36
46
  unregistered: "must originate from registered identity provider."
37
47
  must_contain_single_assertion: "must contain a single Assertion."
48
+ must_match_assertion_issuer: "must match the Assertion issuer."
38
49
  unsigned: "must be signed."
39
50
  Signature:
40
51
  certificate: "Not valid before %{not_before}. Not valid after %{not_after}."
@@ -3,12 +3,22 @@
3
3
  module Saml
4
4
  module Kit
5
5
  class Parser
6
+ def self.parse(content)
7
+ document = Nokogiri::XML(content, &:strict)
8
+ raise Nokogiri::XML::SyntaxError, 'DOCTYPE is not allowed' if document.internal_subset
9
+
10
+ document.tap { |x| x.encoding &&= 'UTF-8' }
11
+ rescue Nokogiri::XML::SyntaxError => error
12
+ Saml::Kit.logger.error(error)
13
+ Nokogiri::XML::Document.new
14
+ end
15
+
6
16
  # Creates a `{Saml::Kit::Metadata}` object from a raw XML [String].
7
17
  #
8
18
  # @param content [String] the raw metadata XML.
9
19
  # @return [Saml::Kit::Metadata] the metadata document or subclass.
10
20
  def metadata_from(content)
11
- document = Nokogiri::XML(content)
21
+ document = self.class.parse(content)
12
22
  return unless document.at_xpath('/md:EntityDescriptor', XmlParseable::NAMESPACES)
13
23
 
14
24
  xpath = '/md:EntityDescriptor/md:SPSSODescriptor'
@@ -6,6 +6,7 @@ module Saml
6
6
  # parsing a SAML Response document.
7
7
  # {include:file:spec/examples/response_spec.rb}
8
8
  class Response < Document
9
+ include Assertable
9
10
  include Respondable
10
11
  extend Forwardable
11
12
 
@@ -13,6 +14,7 @@ module Saml
13
14
 
14
15
  validate :must_be_valid_assertion
15
16
  validate :must_contain_single_assertion
17
+ validate :must_match_assertion_issuer
16
18
 
17
19
  def initialize(
18
20
  xml,
@@ -53,7 +55,9 @@ module Saml
53
55
  end
54
56
 
55
57
  def signature_trusted?
56
- super || (assertion.signed? && assertion.trusted?)
58
+ return super if signed?
59
+
60
+ assertion.signed? && assertion.trusted?
57
61
  end
58
62
 
59
63
  def must_be_valid_assertion
@@ -65,11 +69,23 @@ module Saml
65
69
  end
66
70
 
67
71
  def must_contain_single_assertion
68
- return if assertion_nodes.count <= 1
72
+ return if assertion_nodes.empty? || assertion.search(Assertion::XPATH).one?
69
73
 
70
74
  errors.add(:base, error_message(:must_contain_single_assertion))
71
75
  end
72
76
 
77
+ # SAML 2.0 Profiles 4.1.4.2, Errata E17 and E26
78
+ def must_match_assertion_issuer
79
+ return unless assertion.decryptable?
80
+ return if issuer == assertion.issuer || issuer_omitted?
81
+
82
+ errors.add(:issuer, error_message(:must_match_assertion_issuer))
83
+ end
84
+
85
+ def issuer_omitted?
86
+ issuer.nil? && !signed? && !assertion.encrypted?
87
+ end
88
+
73
89
  def assertion_nodes
74
90
  search(Saml::Kit::Assertion::XPATH)
75
91
  end
@@ -32,6 +32,8 @@ module Saml
32
32
  attribute.text.casecmp('true').zero?
33
33
  end
34
34
 
35
+ def identity_provider; end
36
+
35
37
  # @!visibility private
36
38
  def self.builder_class
37
39
  Saml::Kit::Builders::ServiceProviderMetadata
@@ -30,7 +30,10 @@ module Saml
30
30
 
31
31
  value = at_xpath('./ds:KeyInfo/ds:X509Data/ds:X509Certificate').try(:text)
32
32
  @certificate =
33
- value.nil? ? nil : ::Xml::Kit::Certificate.new(value, use: :signing)
33
+ value.nil? ? nil : ::Xml::Kit::Certificate.new(value, use: :signing).tap(&:active?)
34
+ rescue StandardError => error
35
+ Saml::Kit.logger.error(error)
36
+ @certificate = nil
34
37
  end
35
38
 
36
39
  # Returns true when the fingerprint of the certificate matches one of
@@ -80,7 +83,7 @@ module Saml
80
83
 
81
84
  # Returns the XML Hash.
82
85
  def to_h
83
- @to_h ||= present? ? Hash.from_xml(to_xml)['Signature'] : {}
86
+ @to_h ||= present? ? XmlHash.from(node)['Signature'] : {}
84
87
  end
85
88
 
86
89
  def present?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Saml
4
4
  module Kit
5
- VERSION = '1.5.1'
5
+ VERSION = '1.5.2'
6
6
  end
7
7
  end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Saml
4
+ module Kit
5
+ module XmlHash
6
+ class << self
7
+ def from(element)
8
+ ActiveSupport::XmlMini.with_backend(self) { Hash.from_xml(element) } || {}
9
+ end
10
+
11
+ def parse(element)
12
+ element.nil? ? {} : { element.name => collapse(element) }
13
+ end
14
+
15
+ private
16
+
17
+ def collapse(element)
18
+ (attributes(element) + children(element) + texts(element))
19
+ .group_by(&:first)
20
+ .transform_values { |pairs| pairs.one? ? pairs.first.last : pairs.map(&:last) }
21
+ end
22
+
23
+ def attributes(element)
24
+ namespaces = element.namespace_definitions.map { |x| [['xmlns', x.prefix], x.href] }
25
+ attributes = element.attribute_nodes.map { |x| [[x.namespace&.prefix, x.name], x.value] }
26
+ (namespaces + attributes).map { |name, value| [name.compact.join(':'), value] }
27
+ end
28
+
29
+ def children(element)
30
+ element.element_children.map { |x| [x.name, collapse(x)] }
31
+ end
32
+
33
+ def texts(element)
34
+ text = element.xpath('text()').map(&:content).join
35
+ text.blank? && (text.empty? || element.element_children.any?) ? [] : [['__content__', text]]
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
data/lib/saml/kit.rb CHANGED
@@ -17,6 +17,7 @@ require 'securerandom'
17
17
  require 'uri'
18
18
  require 'xml/kit'
19
19
 
20
+ require 'saml/kit/concerns/assertable'
20
21
  require 'saml/kit/concerns/buildable'
21
22
  require 'saml/kit/concerns/requestable'
22
23
  require 'saml/kit/concerns/respondable'
@@ -53,6 +54,7 @@ require 'saml/kit/identity_provider_metadata'
53
54
  require 'saml/kit/invalid_document'
54
55
  require 'saml/kit/service_provider_metadata'
55
56
  require 'saml/kit/signature'
57
+ require 'saml/kit/xml_hash'
56
58
 
57
59
  I18n.load_path +=
58
60
  Dir[File.expand_path('kit/locales/*.yml', File.dirname(__FILE__))]
@@ -0,0 +1,11 @@
1
+ {
2
+ "packages": {
3
+ ".": {
4
+ "release-type": "ruby",
5
+ "package-name": "saml-kit",
6
+ "version-file": "lib/saml/kit/version.rb",
7
+ "bump-minor-pre-major": true,
8
+ "include-component-in-tag": false
9
+ }
10
+ }
11
+ }
data/saml-kit.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
 
13
13
  spec.summary = 'A simple toolkit for working with SAML.'
14
14
  spec.description = 'A simple toolkit for working with SAML.'
15
- spec.homepage = 'https://github.com/xlgmokha/saml-kit'
15
+ spec.homepage = 'https://github.com/mokhan-ca/saml-kit'
16
16
  spec.license = 'MIT'
17
17
  spec.required_ruby_version = '>= 3.2.0'
18
18
 
@@ -24,6 +24,10 @@ Gem::Specification.new do |spec|
24
24
  ) && !f.match(%r{^spec/examples.*/})
25
25
  end
26
26
  spec.metadata['yard.run'] = 'yri'
27
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
28
+ spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/CHANGELOG.md"
29
+ spec.metadata['rubygems_mfa_required'] = 'true'
30
+ spec.metadata['source_code_uri'] = spec.homepage
27
31
  spec.bindir = 'exe'
28
32
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
33
  spec.require_paths = ['lib']
@@ -34,11 +38,10 @@ Gem::Specification.new do |spec|
34
38
  spec.add_dependency 'forwardable', '~> 1.0'
35
39
  spec.add_dependency 'logger', '~> 1.0'
36
40
  spec.add_dependency 'net-hippie', '~> 1.0'
37
- spec.add_dependency 'nokogiri', '~> 1.0'
41
+ spec.add_dependency 'nokogiri', '~> 1.19', '>= 1.19.1'
38
42
  spec.add_dependency 'securerandom', '~> 0.1'
39
43
  spec.add_dependency 'uri', '~> 1.0'
40
- spec.add_dependency 'xml-kit', '~> 0.4'
41
- spec.add_development_dependency 'bundler', '~> 2.0'
44
+ spec.add_dependency 'xml-kit', '~> 0.7'
42
45
  spec.add_development_dependency 'bundler-audit', '~> 0.6'
43
46
  spec.add_development_dependency 'erb', '~> 4.0'
44
47
  spec.add_development_dependency 'ffaker', '~> 2.7'
@@ -48,7 +51,6 @@ Gem::Specification.new do |spec|
48
51
  spec.add_development_dependency 'rspec-benchmark', '~> 0.3'
49
52
  spec.add_development_dependency 'rubocop', '~> 1.0'
50
53
  spec.add_development_dependency 'rubocop-rspec', '~> 3.0'
51
- spec.add_development_dependency 'ruby-prof'
52
54
  spec.add_development_dependency 'simplecov', '~> 0.15'
53
55
  spec.add_development_dependency 'webmock', '~> 3.1'
54
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saml-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mo khan
@@ -99,14 +99,20 @@ dependencies:
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '1.0'
102
+ version: '1.19'
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: 1.19.1
103
106
  type: :runtime
104
107
  prerelease: false
105
108
  version_requirements: !ruby/object:Gem::Requirement
106
109
  requirements:
107
110
  - - "~>"
108
111
  - !ruby/object:Gem::Version
109
- version: '1.0'
112
+ version: '1.19'
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: 1.19.1
110
116
  - !ruby/object:Gem::Dependency
111
117
  name: securerandom
112
118
  requirement: !ruby/object:Gem::Requirement
@@ -141,28 +147,14 @@ dependencies:
141
147
  requirements:
142
148
  - - "~>"
143
149
  - !ruby/object:Gem::Version
144
- version: '0.4'
150
+ version: '0.7'
145
151
  type: :runtime
146
152
  prerelease: false
147
153
  version_requirements: !ruby/object:Gem::Requirement
148
154
  requirements:
149
155
  - - "~>"
150
156
  - !ruby/object:Gem::Version
151
- version: '0.4'
152
- - !ruby/object:Gem::Dependency
153
- name: bundler
154
- requirement: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: '2.0'
159
- type: :development
160
- prerelease: false
161
- version_requirements: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - "~>"
164
- - !ruby/object:Gem::Version
165
- version: '2.0'
157
+ version: '0.7'
166
158
  - !ruby/object:Gem::Dependency
167
159
  name: bundler-audit
168
160
  requirement: !ruby/object:Gem::Requirement
@@ -289,20 +281,6 @@ dependencies:
289
281
  - - "~>"
290
282
  - !ruby/object:Gem::Version
291
283
  version: '3.0'
292
- - !ruby/object:Gem::Dependency
293
- name: ruby-prof
294
- requirement: !ruby/object:Gem::Requirement
295
- requirements:
296
- - - ">="
297
- - !ruby/object:Gem::Version
298
- version: '0'
299
- type: :development
300
- prerelease: false
301
- version_requirements: !ruby/object:Gem::Requirement
302
- requirements:
303
- - - ">="
304
- - !ruby/object:Gem::Version
305
- version: '0'
306
284
  - !ruby/object:Gem::Dependency
307
285
  name: simplecov
308
286
  requirement: !ruby/object:Gem::Requirement
@@ -382,6 +360,7 @@ files:
382
360
  - lib/saml/kit/builders/templates/response.builder
383
361
  - lib/saml/kit/builders/templates/service_provider_metadata.builder
384
362
  - lib/saml/kit/composite_metadata.rb
363
+ - lib/saml/kit/concerns/assertable.rb
385
364
  - lib/saml/kit/concerns/buildable.rb
386
365
  - lib/saml/kit/concerns/requestable.rb
387
366
  - lib/saml/kit/concerns/respondable.rb
@@ -415,6 +394,7 @@ files:
415
394
  - lib/saml/kit/signature.rb
416
395
  - lib/saml/kit/signature_reference.rb
417
396
  - lib/saml/kit/version.rb
397
+ - lib/saml/kit/xml_hash.rb
418
398
  - lib/saml/kit/xsd/MetadataExchange.xsd
419
399
  - lib/saml/kit/xsd/oasis-200401-wss-wssecurity-secext-1.0.xsd
420
400
  - lib/saml/kit/xsd/oasis-200401-wss-wssecurity-utility-1.0.xsd
@@ -434,6 +414,7 @@ files:
434
414
  - lib/saml/kit/xsd/xenc-schema.xsd
435
415
  - lib/saml/kit/xsd/xml.xsd
436
416
  - lib/saml/kit/xsd/xmldsig-core-schema.xsd
417
+ - release-please-config.json
437
418
  - saml-kit.gemspec
438
419
  - spec/examples/authentication_request_spec.rb
439
420
  - spec/examples/identity_provider_metadata_spec.rb
@@ -443,11 +424,15 @@ files:
443
424
  - spec/examples/principal.rb
444
425
  - spec/examples/response_spec.rb
445
426
  - spec/examples/service_provider_metadata_spec.rb
446
- homepage: https://github.com/xlgmokha/saml-kit
427
+ homepage: https://github.com/mokhan-ca/saml-kit
447
428
  licenses:
448
429
  - MIT
449
430
  metadata:
450
431
  yard.run: yri
432
+ allowed_push_host: https://rubygems.org
433
+ changelog_uri: https://github.com/mokhan-ca/saml-kit/blob/main/CHANGELOG.md
434
+ rubygems_mfa_required: 'true'
435
+ source_code_uri: https://github.com/mokhan-ca/saml-kit
451
436
  rdoc_options: []
452
437
  require_paths:
453
438
  - lib
@@ -462,7 +447,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
462
447
  - !ruby/object:Gem::Version
463
448
  version: '0'
464
449
  requirements: []
465
- rubygems_version: 4.0.18
450
+ rubygems_version: 4.0.20
466
451
  specification_version: 4
467
452
  summary: A simple toolkit for working with SAML.
468
453
  test_files: []