Comparing changes

v1.0.29 v1.0.30
13 commits 13 files changed

Commits

1198851 upgrade to bundler 2.0 mo 2019-04-08 00:42:33
d745b37 bump ruby versions in CI mo 2019-04-08 00:35:51
b83fa6f bump to version 1.0.30 mo 2019-04-08 00:31:02
927d70d specify preferred exception name mo 2019-04-08 00:30:05
9015a2f decouple for deprecated class mo 2019-04-08 00:22:59
4908e36 use encrypt_data_for mo 2019-02-05 18:03:38
3aefdba add a CHANGELOG mo 2019-02-04 18:22:56
9839799 install bundler < 2 mo 2019-01-06 03:14:17
853ac83 fix travis rubygems issue mo 2019-01-06 01:52:30
915cd89 remove curly braces mo 2018-12-23 20:47:04
bin/cibuild
@@ -17,5 +17,5 @@ export RUBY_HEAP_SLOTS_INCREMENT=400000
 export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
 
 ruby -v
-gem install bundler --no-ri --no-rdoc --conservative
+gem install bundler --conservative
 bin/test
bin/setup
@@ -3,4 +3,4 @@ set -euo pipefail
 IFS=$'\n\t'
 set -vx
 
-bundle check || bundle install --jobs $(nproc)
+bundle check || bundle install --jobs "$(sysctl -n hw.ncpu || nproc)"
lib/saml/kit/builders/templates/encrypted_assertion.builder
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 xml.EncryptedAssertion xmlns: Saml::Kit::Namespaces::ASSERTION do
-  encryption_for(xml: xml) do |xml|
+  encrypt_data_for(xml: xml) do |xml|
     render assertion, xml: xml
   end
 end
lib/saml/kit/builders/templates/logout_request.builder
@@ -2,7 +2,7 @@
 
 xml.instruct!
 xml.LogoutRequest logout_request_options do
-  xml.Issuer({ xmlns: Saml::Kit::Namespaces::ASSERTION }, issuer)
+  xml.Issuer(issuer, xmlns: Saml::Kit::Namespaces::ASSERTION)
   signature_for(reference_id: id, xml: xml)
   xml.NameID name_id_options, user.name_id_for(name_id_format)
 end
lib/saml/kit/version.rb
@@ -2,6 +2,6 @@
 
 module Saml
   module Kit
-    VERSION = '1.0.29'.freeze
+    VERSION = '1.0.30'.freeze
   end
 end
spec/saml/kit/assertion_spec.rb
@@ -207,7 +207,7 @@ RSpec.describe Saml::Kit::Assertion do
       document = Nokogiri::XML(altered)
       assertion = document.at_xpath('/samlp:Response/saml:Assertion', Saml::Kit::Document::NAMESPACES)
       key_pair = Xml::Kit::KeyPair.generate(use: :encryption)
-      encrypted = Xml::Kit::Encryption.new(assertion.to_xml, key_pair.public_key).to_xml
+      encrypted = Xml::Kit::EncryptedData.new(assertion.to_xml, asymmetric_cipher: Xml::Kit::Crypto::RsaCipher.new('', key_pair.private_key)).to_xml
       response = Saml::Kit::Response.new(encrypted, configuration: configuration)
       expect(response.assertion([key_pair.private_key])).to be_invalid
     end
.gitignore
@@ -1,6 +1,5 @@
 /.bundle/
 /.yardoc
-/Gemfile.lock
 /_yardoc/
 /coverage/
 /doc/
.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: ruby:2.5
+image: ruby:2.6
 
 before_script:
   - apt-get update && apt-get install -y locales
.rubocop.yml
@@ -79,6 +79,9 @@ Naming/FileName:
   Exclude:
     - 'lib/saml-kit.rb'
 
+Naming/RescuedExceptionsVariableName:
+  PreferredName: error
+
 Style/Documentation:
   Enabled: false
 
.travis.yml
@@ -5,8 +5,11 @@ language: ruby
 rvm:
   - 2.2.10
   - 2.3.8
-  - 2.4.5
-  - 2.5.3
+  - 2.4.6
+  - 2.5.5
+  - 2.6.2
+before_install:
+  - "gem install bundler -v '~> 1.0'"
 before_script:
   - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
   - chmod +x ./cc-test-reporter
CHANGELOG.md
@@ -0,0 +1,124 @@
+Version 1.0.30
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+- nil
+
+## [1.0.30] - 2019-04-07
+### Changed
+- change xml-kit dependency to minimum 0.3.0
+- use `encrypt_data_for` instead of `encryption_for`.
+
+## [1.0.29] - 2018-12-04
+### Changed
+- change xml-kit dependency to ~> 0.2.
+
+## [1.0.28] - 2018-12-04
+### Changed
+- Parse attribute arrays from SAML assertion.
+
+## [1.0.27] - 2018-11-08
+### Changed
+- Evict expired key pairs from configuration.
+
+## [1.0.26] - 2018-10-22
+### Changed
+- Forward destination, issuer, now, embed\_signature to assertion.
+
+## [1.0.25] - 2018-10-17
+### Changed
+- Allow multi valued attributes in response assertion.
+
+## [1.0.24] - 2018-09-18
+### Added
+- Parse ID from assertion.
+- Parse version from assertion.
+- Parse version from assertion.
+- Add missing English translations.
+
+### Changed
+- Moved backing fields from response builder to assertion.
+
+## [1.0.23] - 2018-08-23
+### Added
+- Add NotOnOrAfter attribute to SubjectConfirmationData.
+
+## [1.0.22] - 2018-08-13
+### Added
+- Allow using a custom NameID Format in Assertion.
+
+## [1.0.21] - 2018-08-13
+### Changed
+- Use net/hippie instead of net/http.
+
+### Removed
+- remove optional NotOnOrAfter attribute from SubjectConfirmationData.
+
+## [1.0.20] - 2018-08-11
+### Changed
+- Synchronize NotOnOrAfter between AuthnStatement and SubjectConfirmationData.
+
+### Removed
+- Removed optional SessionNotOnOrAfter attribute from AuthnStatement.
+
+[Unreleased]: https://github.com/saml-kit/saml-kit/compare/v1.0.30...HEAD
+[1.0.30]: https://github.com/saml-kit/saml-kit/compare/v1.0.29...v1.0.30
+[1.0.29]: https://github.com/saml-kit/saml-kit/compare/v1.0.28...v1.0.29
+[1.0.28]: https://github.com/saml-kit/saml-kit/compare/v1.0.27...v1.0.28
+[1.0.27]: https://github.com/saml-kit/saml-kit/compare/v1.0.26...v1.0.27
+[1.0.26]: https://github.com/saml-kit/saml-kit/compare/v1.0.25...v1.0.26
+[1.0.25]: https://github.com/saml-kit/saml-kit/compare/v1.0.24...v1.0.25
+[1.0.24]: https://github.com/saml-kit/saml-kit/compare/v1.0.23...v1.0.24
+[1.0.23]: https://github.com/saml-kit/saml-kit/compare/v1.0.22...v1.0.23
+[1.0.22]: https://github.com/saml-kit/saml-kit/compare/v1.0.21...v1.0.22
+[1.0.21]: https://github.com/saml-kit/saml-kit/compare/v1.0.20...v1.0.21
+[1.0.20]: https://github.com/saml-kit/saml-kit/compare/v1.0.19...v1.0.20
+[1.0.19]: https://github.com/saml-kit/saml-kit/compare/v1.0.18...v1.0.19
+[1.0.18]: https://github.com/saml-kit/saml-kit/compare/v1.0.17...v1.0.18
+[1.0.17]: https://github.com/saml-kit/saml-kit/compare/v1.0.16...v1.0.17
+[1.0.16]: https://github.com/saml-kit/saml-kit/compare/v1.0.15...v1.0.16
+[1.0.15]: https://github.com/saml-kit/saml-kit/compare/v1.0.14...v1.0.15
+[1.0.14]: https://github.com/saml-kit/saml-kit/compare/v1.0.13...v1.0.14
+[1.0.13]: https://github.com/saml-kit/saml-kit/compare/v1.0.12...v1.0.13
+[1.0.12]: https://github.com/saml-kit/saml-kit/compare/v1.0.11...v1.0.12
+[1.0.11]: https://github.com/saml-kit/saml-kit/compare/v1.0.10...v1.0.11
+[1.0.10]: https://github.com/saml-kit/saml-kit/compare/v1.0.9...v1.0.10
+[1.0.9]: https://github.com/saml-kit/saml-kit/compare/v1.0.8...v1.0.9
+[1.0.8]: https://github.com/saml-kit/saml-kit/compare/v1.0.7...v1.0.8
+[1.0.7]: https://github.com/saml-kit/saml-kit/compare/v1.0.6...v1.0.7
+[1.0.6]: https://github.com/saml-kit/saml-kit/compare/v1.0.5...v1.0.6
+[1.0.5]: https://github.com/saml-kit/saml-kit/compare/v1.0.4...v1.0.5
+[1.0.4]: https://github.com/saml-kit/saml-kit/compare/v1.0.3...v1.0.4
+[1.0.3]: https://github.com/saml-kit/saml-kit/compare/v1.0.2...v1.0.3
+[1.0.2]: https://github.com/saml-kit/saml-kit/compare/v1.0.1...v1.0.2
+[1.0.1]: https://github.com/saml-kit/saml-kit/compare/v1.0.0...v1.0.1
+[1.0.0]: https://github.com/saml-kit/saml-kit/compare/v0.3.6...v1.0.0
+[0.3.6]: https://github.com/saml-kit/saml-kit/compare/v0.3.5...v0.3.6
+[0.3.5]: https://github.com/saml-kit/saml-kit/compare/v0.3.4...v0.3.5
+[0.3.4]: https://github.com/saml-kit/saml-kit/compare/v0.3.3...v0.3.4
+[0.3.3]: https://github.com/saml-kit/saml-kit/compare/v0.3.2...v0.3.3
+[0.3.2]: https://github.com/saml-kit/saml-kit/compare/v0.3.1...v0.3.2
+[0.3.1]: https://github.com/saml-kit/saml-kit/compare/v0.3.0...v0.3.1
+[0.3.0]: https://github.com/saml-kit/saml-kit/compare/v0.2.18...v0.3.0
+[0.2.18]: https://github.com/saml-kit/saml-kit/compare/v0.2.17...v0.2.18
+[0.2.17]: https://github.com/saml-kit/saml-kit/compare/v0.2.16...v0.2.17
+[0.2.16]: https://github.com/saml-kit/saml-kit/compare/v0.2.15...v0.2.16
+[0.2.15]: https://github.com/saml-kit/saml-kit/compare/v0.2.14...v0.2.15
+[0.2.14]: https://github.com/saml-kit/saml-kit/compare/v0.2.13...v0.2.14
+[0.2.13]: https://github.com/saml-kit/saml-kit/compare/v0.2.12...v0.2.13
+[0.2.12]: https://github.com/saml-kit/saml-kit/compare/v0.2.11...v0.2.12
+[0.2.11]: https://github.com/saml-kit/saml-kit/compare/v0.2.10...v0.2.11
+[0.2.10]: https://github.com/saml-kit/saml-kit/compare/v0.2.9...v0.2.10
+[0.2.9]: https://github.com/saml-kit/saml-kit/compare/v0.2.8...v0.2.9
+[0.2.8]: https://github.com/saml-kit/saml-kit/compare/v0.2.7...v0.2.8
+[0.2.7]: https://github.com/saml-kit/saml-kit/compare/v0.2.6...v0.2.7
+[0.2.6]: https://github.com/saml-kit/saml-kit/compare/v0.2.5...v0.2.6
+[0.2.5]: https://github.com/saml-kit/saml-kit/compare/v0.2.4...v0.2.5
+[0.2.4]: https://github.com/saml-kit/saml-kit/compare/v0.2.3...v0.2.4
+[0.2.3]: https://github.com/saml-kit/saml-kit/compare/v0.2.2...v0.2.3
+[0.2.2]: https://github.com/saml-kit/saml-kit/compare/v0.2.1...v0.2.2
+[0.2.1]: https://github.com/saml-kit/saml-kit/compare/v0.1.0...v0.2.1
Gemfile.lock
@@ -0,0 +1,123 @@
+PATH
+  remote: .
+  specs:
+    saml-kit (1.0.30)
+      activemodel (>= 4.2.0)
+      net-hippie (~> 0.1)
+      xml-kit (>= 0.3.0, < 1.0.0)
+
+GEM
+  remote: https://rubygems.org/
+  specs:
+    activemodel (5.2.3)
+      activesupport (= 5.2.3)
+    activesupport (5.2.3)
+      concurrent-ruby (~> 1.0, >= 1.0.2)
+      i18n (>= 0.7, < 2)
+      minitest (~> 5.1)
+      tzinfo (~> 1.1)
+    addressable (2.6.0)
+      public_suffix (>= 2.0.2, < 4.0)
+    ast (2.4.0)
+    benchmark-perf (0.4.0)
+    benchmark-trend (0.2.0)
+    builder (3.2.3)
+    bundler-audit (0.6.1)
+      bundler (>= 1.2.0, < 3)
+      thor (~> 0.18)
+    concurrent-ruby (1.1.5)
+    crack (0.4.3)
+      safe_yaml (~> 1.0.0)
+    diff-lcs (1.3)
+    docile (1.3.1)
+    ffaker (2.11.0)
+    hashdiff (0.3.8)
+    i18n (1.5.1)
+      concurrent-ruby (~> 1.0)
+    jaro_winkler (1.5.2)
+    json (2.2.0)
+    mini_portile2 (2.4.0)
+    minitest (5.11.3)
+    net-hippie (0.2.5)
+    nokogiri (1.9.1)
+      mini_portile2 (~> 2.4.0)
+    parallel (1.17.0)
+    parser (2.6.2.1)
+      ast (~> 2.4.0)
+    psych (3.1.0)
+    public_suffix (3.0.3)
+    rainbow (3.0.0)
+    rake (10.5.0)
+    rspec (3.8.0)
+      rspec-core (~> 3.8.0)
+      rspec-expectations (~> 3.8.0)
+      rspec-mocks (~> 3.8.0)
+    rspec-benchmark (0.4.0)
+      benchmark-perf (~> 0.4.0)
+      benchmark-trend (~> 0.2.0)
+      rspec (>= 3.0.0, < 4.0.0)
+    rspec-core (3.8.0)
+      rspec-support (~> 3.8.0)
+    rspec-expectations (3.8.2)
+      diff-lcs (>= 1.2.0, < 2.0)
+      rspec-support (~> 3.8.0)
+    rspec-mocks (3.8.0)
+      diff-lcs (>= 1.2.0, < 2.0)
+      rspec-support (~> 3.8.0)
+    rspec-support (3.8.0)
+    rubocop (0.67.2)
+      jaro_winkler (~> 1.5.1)
+      parallel (~> 1.10)
+      parser (>= 2.5, != 2.5.1.1)
+      psych (>= 3.1.0)
+      rainbow (>= 2.2.2, < 4.0)
+      ruby-progressbar (~> 1.7)
+      unicode-display_width (>= 1.4.0, < 1.6)
+    rubocop-rspec (1.32.0)
+      rubocop (>= 0.60.0)
+    ruby-prof (0.17.0)
+    ruby-progressbar (1.10.0)
+    safe_yaml (1.0.5)
+    simplecov (0.16.1)
+      docile (~> 1.1)
+      json (>= 1.8, < 3)
+      simplecov-html (~> 0.10.0)
+    simplecov-html (0.10.2)
+    thor (0.20.3)
+    thread_safe (0.3.6)
+    tilt (2.0.9)
+    tzinfo (1.2.5)
+      thread_safe (~> 0.1)
+    unicode-display_width (1.5.0)
+    webmock (3.5.1)
+      addressable (>= 2.3.6)
+      crack (>= 0.3.2)
+      hashdiff
+    xml-kit (0.3.1)
+      activemodel (>= 4.2.0)
+      builder (~> 3.2)
+      nokogiri (>= 1.8.5)
+      tilt (>= 1.4.1)
+      xmldsig (~> 0.6)
+    xmldsig (0.6.6)
+      nokogiri (>= 1.6.8, < 2.0.0)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  bundler (~> 1.17)
+  bundler-audit (~> 0.6)
+  ffaker (~> 2.7)
+  rake (~> 10.0)
+  rspec (~> 3.0)
+  rspec-benchmark (~> 0.3)
+  rubocop (~> 0.52)
+  rubocop-rspec (~> 1.22)
+  ruby-prof
+  saml-kit!
+  simplecov (~> 0.15)
+  webmock (~> 3.1)
+
+BUNDLED WITH
+   1.17.3
saml-kit.gemspec
@@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
 
   spec.add_dependency 'activemodel', '>= 4.2.0'
   spec.add_dependency 'net-hippie', '~> 0.1'
-  spec.add_dependency 'xml-kit', '~> 0.2'
-  spec.add_development_dependency 'bundler', '~> 1.15'
+  spec.add_dependency 'xml-kit', '>= 0.3.0', '< 1.0.0'
+  spec.add_development_dependency 'bundler', '~> 1.17'
   spec.add_development_dependency 'bundler-audit', '~> 0.6'
   spec.add_development_dependency 'ffaker', '~> 2.7'
   spec.add_development_dependency 'rake', '~> 10.0'