et_fake_acas_server 0.1.6

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 22a004a848cfc6cda21a2df8db41f508a00093c88ac6162fb7e642e29c107d43
4
+ data.tar.gz: 13bc923c3b42472eb45b697927ea977523b520621523182150f96022f151b1ce
5
+ SHA512:
6
+ metadata.gz: 65821503606cbaf99a2de8fb820a52260362cb1772f6968874bfaa9b4531f26f41b07ffb7f0df2c172f88ba4fe80a0af9cd670d8ff56b4a7e592cb0d7625e967
7
+ data.tar.gz: 4d7ee02cde30e34ddf6199c5eb9c65bf6206c47da1ac72b98f5c8c9232df79696759deec0d6f0863f9f9652b0c93860f5b5c68538b0f37f5103564a49a9f20e9
data/.gitignore ADDED
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/*
9
+ !/tmp/.keep
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ .idea/*
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.5.1
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ deploy:
2
+ provider: rubygems
3
+ api_key:
4
+ secure: fhJ2NZ7ZL89VJROClyyji2Sj2PuSh+ddvGSPyLbxENE1VwwwHDF9oqVGf7kdckTZfh3ACcngFls1dDIFycdl+TlZYk9suW6QNfUkMCfkMMvknqSbL8Wvf49352KAjSmEHui7mTPH2Zt1rnSpZLT0aPXWZghb74s8WgtW2wsVhLbilAfeX5RV/NtULtn/6ClBsyeGbPITrl3hkZA7SF5OIJRPNhSiGHSXGZaremYu065bgnqfuurPdU3aUDMRj0vv1guXsqcpmCWAyEaSg5dXUWdZOMy0dIaK4bFpQDScRrSNc7OH5CSgaLthHI4mrJOo/Bx/0DbOti3qstMMQ3HHUoRY2ppw0Q6PZB2ESyTg+AGCpml9RjPPQXqnowgv21jvWZyTvensj+JaBdtI0BdstYWHFl83U4R4adxKpk40LbZKA5PW0yoSo/xSKviJBpLQJZUm2hgc4xb0wZ2PDDT8QUn2erASKM/Sr1IAw6hdxphWUnsRJ2Bd7uNNp49T6/+VHDj6iWboD9rUCFrJRftcxt8408b10GqDYDdlmI80xSPxn/YIo76uOoc7SMiF9D6HaTc1m28YZ6GHFnC0EWi48uEj+0MqhJApilKBpV25ZBLohJxiV9k1idpbpMXDBi8pvwl73vLxLm/dBQStO8TIciQ/l2nZI6UCyGV0CYdTbGY=
5
+ gem: et_fake_acas_server
6
+ on:
7
+ tags: true
8
+ repo: hmcts/et_fake_acas_server
9
+ branch: develop
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in et_fake_acas_server.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,62 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ et_fake_acas_server (0.1.6)
5
+ activesupport (~> 5.2)
6
+ nokogiri (~> 1.8, >= 1.8.2)
7
+ puma (~> 3.12)
8
+ ruby-mcrypt (~> 0.2)
9
+ sinatra (~> 2.0, >= 2.0.3)
10
+ sinatra-contrib (~> 2.0)
11
+
12
+ GEM
13
+ remote: https://rubygems.org/
14
+ specs:
15
+ activesupport (5.2.3)
16
+ concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ i18n (>= 0.7, < 2)
18
+ minitest (~> 5.1)
19
+ tzinfo (~> 1.1)
20
+ backports (3.14.0)
21
+ concurrent-ruby (1.1.5)
22
+ i18n (1.6.0)
23
+ concurrent-ruby (~> 1.0)
24
+ mini_portile2 (2.4.0)
25
+ minitest (5.11.3)
26
+ multi_json (1.13.1)
27
+ mustermann (1.0.3)
28
+ nokogiri (1.10.3)
29
+ mini_portile2 (~> 2.4.0)
30
+ puma (3.12.1)
31
+ rack (2.0.7)
32
+ rack-protection (2.0.5)
33
+ rack
34
+ rake (10.5.0)
35
+ ruby-mcrypt (0.2.0)
36
+ sinatra (2.0.5)
37
+ mustermann (~> 1.0)
38
+ rack (~> 2.0)
39
+ rack-protection (= 2.0.5)
40
+ tilt (~> 2.0)
41
+ sinatra-contrib (2.0.5)
42
+ backports (>= 2.8.2)
43
+ multi_json
44
+ mustermann (~> 1.0)
45
+ rack-protection (= 2.0.5)
46
+ sinatra (= 2.0.5)
47
+ tilt (>= 1.3, < 3)
48
+ thread_safe (0.3.6)
49
+ tilt (2.0.9)
50
+ tzinfo (1.2.5)
51
+ thread_safe (~> 0.1)
52
+
53
+ PLATFORMS
54
+ ruby
55
+
56
+ DEPENDENCIES
57
+ bundler (~> 1.16)
58
+ et_fake_acas_server!
59
+ rake (~> 10.0)
60
+
61
+ BUNDLED WITH
62
+ 1.17.3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Gary Taylor
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # Et Fake Acas Server
2
+
3
+ This gem is used either as part of a test suite to provide dummy ACAS services, or as a standalone rack application that can
4
+ be used during development etc...
5
+
6
+ ## Installation
7
+
8
+ ### If used as part of a test suite
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'et_fake_acas_server'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ ### If used standalone
21
+
22
+ Or install it yourself as:
23
+
24
+ $ gem install et_fake_acas_server
25
+
26
+ and run it using
27
+
28
+ ```
29
+
30
+ et_fake_acas_server
31
+
32
+ ```
33
+ ## Usage
34
+
35
+ ## Usage During Testing
36
+
37
+ The server is pre programmed to respond with all 4 of the different response types depending on the first
38
+ part of the certificate number requested. The numbers after the slashes etc.. do not matter
39
+
40
+ These are as follows (note, the 'R' can also be 'NE' or 'MU')
41
+
42
+ R000200/18/68 - Returns a 'No Match'
43
+
44
+ R000201/18/68 - Returns an 'Invalid Certificate Format'
45
+
46
+ R000500/18/68 - Returns an 'Internal Error'
47
+
48
+ R000100/18/68 - Returns a valid certificate
49
+
50
+ and anything else returns a 'Found' response
51
+
52
+ ## Development
53
+
54
+ This has no test suite - nor is it supposed to have else we would be testing test code which seems over the top.
55
+ To prove it is working, use the api project (https://github.com/ministryofjustice/et_api) which uses it as part of
56
+ its test suite.
57
+
58
+ ## Environment Variables
59
+
60
+ The following environment variables can be changed to alter the defaults
61
+
62
+ ACAS_PRIVATE_KEY_FILE
63
+ ET_PUBLIC_KEY_FILE
64
+
65
+ ## Contributing
66
+
67
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/et_fake_acas_server.
68
+
69
+ ## License
70
+
71
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ desc "Default task - does nothing apart from keep travis happy"
4
+ task :default do
5
+
6
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "et_fake_acas_server"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,41 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "et_fake_acas_server/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "et_fake_acas_server"
8
+ spec.version = EtFakeAcasServer::VERSION
9
+ spec.authors = ["Gary Taylor"]
10
+ spec.email = ["gary.taylor@hmcts.net"]
11
+
12
+ spec.summary = %q{Employment Tribunal (govuk) fake acas server}
13
+ spec.description = %q{Standalone fake acas server for use during dev and test of the employment tribunal system}
14
+ spec.homepage = "https://github.com/ministryofjustice/et_api"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata["allowed_push_host"] = "http://mygemserver.com"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against " \
23
+ "public gem pushes."
24
+ end
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_development_dependency "bundler", "~> 1.16"
34
+ spec.add_development_dependency "rake", "~> 10.0"
35
+ spec.add_dependency 'puma', '~> 3.12'
36
+ spec.add_dependency 'sinatra-contrib', '~> 2.0'
37
+ spec.add_dependency 'sinatra', '~> 2.0', '>= 2.0.3'
38
+ spec.add_dependency 'nokogiri', '~> 1.8', '>= 1.8.2'
39
+ spec.add_dependency 'activesupport', '~> 5.2'
40
+ spec.add_dependency 'ruby-mcrypt', '~> 0.2'
41
+ end
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'puma'
4
+ puma = Gem.bin_path('puma', 'puma')
5
+ config_path = File.absolute_path('../lib/config.ru', __dir__)
6
+ exec puma, *(ARGV + [config_path])
data/lib/config.ru ADDED
@@ -0,0 +1,3 @@
1
+ require File.expand_path('./et_fake_acas_server', __dir__)
2
+
3
+ run EtFakeAcasServer::Server
@@ -0,0 +1,7 @@
1
+ $LOAD_PATH.unshift(__dir__) unless $LOAD_PATH.include?(__dir__)
2
+ require "et_fake_acas_server/version"
3
+ require "et_fake_acas_server/server"
4
+
5
+ module EtFakeAcasServer
6
+ # Your code goes here...
7
+ end
@@ -0,0 +1,67 @@
1
+ require 'nokogiri'
2
+ require 'base64'
3
+ require 'active_support/core_ext/string'
4
+ module EtFakeAcasServer
5
+ class CertificateLookupForm
6
+ def initialize(xml, private_key_file: )
7
+ self.xml = xml
8
+ self.private_key = OpenSSL::PKey::RSA.new(File.read(private_key_file))
9
+ end
10
+
11
+ def validate
12
+ validate_digest
13
+ validate_signature
14
+ end
15
+
16
+ def certificate_number
17
+ parsed_values[:ec_certificate_number]
18
+ end
19
+
20
+ private
21
+
22
+ def parsed_values
23
+ @parsed_values ||= begin
24
+ doc = Nokogiri::XML(xml)
25
+ doc.xpath('//env:Envelope/env:Body/tns:GetECCertificate/tns:request').children.inject({}) do |acc, child|
26
+ decoded = Base64.decode64(child.text)
27
+ decrypted = private_key.private_decrypt(decoded, OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING)
28
+ acc[child.name.underscore.to_sym] = decrypted
29
+ acc
30
+ end
31
+ end
32
+ end
33
+
34
+ def validate_digest
35
+ doc = Nokogiri::XML(xml)
36
+ node = doc.xpath('//env:Envelope/env:Header/wsse:Security/wsu:Timestamp', doc.collect_namespaces).first
37
+ digest_value = Base64.encode64(OpenSSL::Digest::SHA1.digest(node.canonicalize(Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0))).strip
38
+
39
+ ns = doc.collect_namespaces
40
+ ns['xmlns:ds'] = ns.delete('xmlns')
41
+ provided_digest_value = doc.at_xpath('//env:Envelope/env:Header/wsse:Security/ds:Signature/ds:SignedInfo/ds:Reference/ds:DigestValue', ns).text
42
+ if digest_value != provided_digest_value
43
+ raise 'Wrong digest value'
44
+ end
45
+
46
+ end
47
+
48
+ def validate_signature
49
+ doc = Nokogiri::XML(xml)
50
+ ns = doc.collect_namespaces
51
+ ns['xmlns:ds'] = ns.delete('xmlns')
52
+ signed_info_node = doc.at_xpath('//env:Envelope/env:Header/wsse:Security/ds:Signature/ds:SignedInfo', ns)
53
+ signature_value_node = doc.at_xpath('//env:Envelope/env:Header/wsse:Security/ds:Signature/ds:SignatureValue', ns)
54
+ signature_value = Base64.decode64(signature_value_node.text)
55
+ security_token_url = doc.at_xpath('//env:Envelope/env:Header/wsse:Security/ds:Signature/ds:KeyInfo/wsse:SecurityTokenReference/wsse:Reference', ns)['URI'][1..-1]
56
+ certificate_value = doc.at_xpath("//env:Envelope/env:Header/wsse:Security/wsse:BinarySecurityToken[@wsu:Id='#{security_token_url}']", ns).text.strip
57
+ our_certificate = OpenSSL::X509::Certificate.new Base64.decode64(certificate_value)
58
+ document = signed_info_node.canonicalize(Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0)
59
+ unless our_certificate.public_key.verify(OpenSSL::Digest::SHA1.new, signature_value, document)
60
+ raise 'Invalid signature'
61
+ end
62
+
63
+ end
64
+
65
+ attr_accessor :xml, :private_key
66
+ end
67
+ end
@@ -0,0 +1,71 @@
1
+ require 'sinatra/base'
2
+ require 'sinatra/custom_logger'
3
+ require 'logger'
4
+ require 'et_fake_acas_server/forms/certificate_lookup_form'
5
+ require 'et_fake_acas_server/xml_builders/found_xml_builder'
6
+ require 'et_fake_acas_server/xml_builders/no_match_xml_builder'
7
+ require 'et_fake_acas_server/xml_builders/internal_error_xml_builder'
8
+ require 'et_fake_acas_server/xml_builders/invalid_certificate_format_xml_builder'
9
+ require 'active_support/core_ext/numeric/time'
10
+
11
+
12
+ module EtFakeAcasServer
13
+ class Server < Sinatra::Base
14
+ def initialize(*)
15
+ super
16
+ self.private_key_file = ENV.fetch('ACAS_PRIVATE_KEY_FILE', File.absolute_path(File.join('..', '..', 'temp_x509', 'acas', 'privatekey.pem'), __dir__))
17
+ self.et_public_key_file = ENV.fetch('ET_PUBLIC_KEY_FILE', File.absolute_path(File.join('..', '..', 'temp_x509', 'et', 'publickey.cer'), __dir__))
18
+ end
19
+
20
+ configure :development, :production do
21
+ logger = Logger.new(STDOUT)
22
+ logger.level = Logger::DEBUG
23
+ set :logger, logger
24
+ end
25
+
26
+ post '/Lookup/ECService.svc' do
27
+ form = CertificateLookupForm.new(request.body.read, private_key_file: private_key_file)
28
+ request.body.rewind
29
+ form.validate
30
+ case form.certificate_number
31
+ when /\A(R|NE|MU)000200/ then
32
+ xml_builder_for_no_match(form).to_xml
33
+ when /\A(R|NE|MU)000201/ then
34
+ xml_builder_for_invalid_certificate_format(form).to_xml
35
+ when /\A(R|NE|MU)000500/ then
36
+ xml_builder_for_internal_error(form).to_xml
37
+ else
38
+ xml_builder_for_found(form).to_xml
39
+ end
40
+ end
41
+
42
+ private
43
+
44
+ attr_accessor :private_key_file, :et_public_key_file
45
+
46
+ def xml_builder_for_found(form)
47
+ data = OpenStruct.new claimant_name: 'Claimant’s Name',
48
+ respondent_name: 'Respondent’s Name',
49
+ date_of_issue: Time.parse('1 December 2017 12:00:00'),
50
+ date_of_receipt: Time.parse('1 January 2017 12:00:00'),
51
+ certificate_number: form.certificate_number,
52
+ message: 'CertificateFound',
53
+ method_of_issue: 'Email',
54
+ certificate_file: File.absolute_path(File.join('..', 'pdfs', '76 EC (C) Certificate R000080.pdf'), __dir__)
55
+ FoundXmlBuilder.new(form, rsa_et_certificate_path: et_public_key_file).builder(data)
56
+ end
57
+
58
+ def xml_builder_for_no_match(form)
59
+ NoMatchXmlBuilder.new(form, rsa_et_certificate_path: et_public_key_file).builder
60
+ end
61
+
62
+ def xml_builder_for_internal_error(form)
63
+ InternalErrorXmlBuilder.new(form, rsa_et_certificate_path: et_public_key_file).builder
64
+ end
65
+
66
+ def xml_builder_for_invalid_certificate_format(form)
67
+ InvalidCertificateFormatXmlBuilder.new(form, rsa_et_certificate_path: et_public_key_file).builder
68
+ end
69
+ end
70
+ end
71
+
@@ -0,0 +1,3 @@
1
+ module EtFakeAcasServer
2
+ VERSION = "0.1.6"
3
+ end
@@ -0,0 +1,77 @@
1
+ require 'base64'
2
+ require 'openssl'
3
+ require 'mcrypt'
4
+
5
+ module EtFakeAcasServer
6
+ class FoundXmlBuilder
7
+ def initialize(form, rsa_et_certificate_path:)
8
+ self.form = form
9
+ self.rsa_et_certificate = OpenSSL::X509::Certificate.new File.read(rsa_et_certificate_path)
10
+ end
11
+
12
+ def key
13
+ @key ||= '12345678901234567890123456789012'
14
+ end
15
+
16
+ def iv
17
+ @iv ||= '12345678901234567890123456789012'
18
+ end
19
+
20
+ def builder(data)
21
+ Nokogiri::XML::Builder.new do |xml|
22
+ namespaces = {
23
+ 'xmlns:s' => 'http://schemas.xmlsoap.org/soap/envelope',
24
+ 'xmlns:u' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
25
+ }
26
+ xml['s'].Envelope(namespaces) do
27
+ xml['s'].Header do
28
+ xml.ActivityId("e67a4d86-e096-4a35-aa3a-2b3a8ffaaa54", 'CorrelationId': '03973d23-3c39-4359-aa69-4d37b922fb60', xmlns: 'http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics')
29
+ xml['o'].Security('s:mustUnderstand': '1', 'xmlns:o': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd') do
30
+ xml['u'].Timestamp('u:Id': '_0') do
31
+ xml['u'].Created '2014-03-03T10:15.01.251Z'
32
+ xml['u'].Expires '2014-03-03T10:20:01.251Z'
33
+ end
34
+ end
35
+ end
36
+ xml['s'].Body do
37
+ xml.GetECCertificateResponse(xmlns: 'https://ec.acas.org.uk/lookup/') do
38
+ xml.GetECCertificateResult('xmlns:a': 'http://schemas.datacontract.org/2004/07/Acas.CertificateLookup.EcLookupService', 'xmlns:i': 'http://www.w3.org/2001/XMLSchema-instance') do
39
+ xml['a'].Certificate Base64.encode64(aes_encrypt(Base64.encode64(File.read(data.certificate_file))))
40
+ xml['a'].ClaimantName Base64.encode64(aes_encrypt(data.claimant_name))
41
+ xml['a'].CurrentDateTime Base64.encode64(aes_encrypt(Time.now.strftime('%d/%m/%Y %H:%M:%S')))
42
+ xml['a'].DateOfIssue Base64.encode64(aes_encrypt(data.date_of_issue.strftime('%d/%m/%Y %H:%M:%S')))
43
+ xml['a'].DateOfReceipt Base64.encode64(aes_encrypt(data.date_of_receipt.strftime('%d/%m/%Y %H:%M:%S')))
44
+ xml['a'].ECCertificateNumber Base64.encode64(aes_encrypt(data.certificate_number))
45
+ xml['a'].IV Base64.encode64(rsa_encrypt(Base64.encode64(iv)))
46
+ xml['a'].Key Base64.encode64(rsa_encrypt(Base64.encode64(key)))
47
+ xml['a'].Message Base64.encode64(aes_encrypt(data.message))
48
+ xml['a'].MethodOfIssue Base64.encode64(aes_encrypt(data.method_of_issue))
49
+ xml['a'].RespondentName Base64.encode64(aes_encrypt(data.respondent_name))
50
+ xml['a'].ResponseCode Base64.encode64(aes_encrypt('100'))
51
+ xml['a'].ServiceVersion Base64.encode64(aes_encrypt('1.0'))
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+
58
+ end
59
+
60
+ private
61
+
62
+ attr_accessor :rsa_et_certificate, :form
63
+
64
+ def aes_encrypt(value)
65
+ encrypt_cipher = build_encrypt_cipher
66
+ encrypt_cipher.encrypt(String.new(value, encoding: 'ascii-8bit'))
67
+ end
68
+
69
+ def build_encrypt_cipher
70
+ Mcrypt.new(:rijndael_256, :cbc, key, iv, :pkcs7)
71
+ end
72
+
73
+ def rsa_encrypt(value)
74
+ rsa_et_certificate.public_key.public_encrypt(value, OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING)
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,70 @@
1
+ require 'base64'
2
+ require 'openssl'
3
+ require 'mcrypt'
4
+
5
+ module EtFakeAcasServer
6
+ class InternalErrorXmlBuilder
7
+ def initialize(form, rsa_et_certificate_path:)
8
+ self.form = form
9
+ self.rsa_et_certificate = OpenSSL::X509::Certificate.new File.read(rsa_et_certificate_path)
10
+ end
11
+
12
+ def key
13
+ @key ||= '12345678901234567890123456789012'
14
+ end
15
+
16
+ def iv
17
+ @iv ||= '12345678901234567890123456789012'
18
+ end
19
+
20
+ def builder
21
+ Nokogiri::XML::Builder.new do |xml|
22
+ namespaces = {
23
+ 'xmlns:s' => 'http://schemas.xmlsoap.org/soap/envelope',
24
+ 'xmlns:u' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
25
+ }
26
+ xml['s'].Envelope(namespaces) do
27
+ xml['s'].Header do
28
+ xml.ActivityId("e67a4d86-e096-4a35-aa3a-2b3a8ffaaa54", 'CorrelationId': '03973d23-3c39-4359-aa69-4d37b922fb60', xmlns: 'http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics')
29
+ xml['o'].Security('s:mustUnderstand': '1', 'xmlns:o': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd') do
30
+ xml['u'].Timestamp('u:Id': '_0') do
31
+ xml['u'].Created '2014-03-03T10:15.01.251Z'
32
+ xml['u'].Expires '2014-03-03T10:20:01.251Z'
33
+ end
34
+ end
35
+ end
36
+ xml['s'].Body do
37
+ xml.GetECCertificateResponse(xmlns: 'https://ec.acas.org.uk/lookup/') do
38
+ xml.GetECCertificateResult('xmlns:a': 'http://schemas.datacontract.org/2004/07/Acas.CertificateLookup.EcLookupService', 'xmlns:i': 'http://www.w3.org/2001/XMLSchema-instance') do
39
+ xml['a'].CurrentDateTime Base64.encode64(aes_encrypt(Time.now.strftime('%d/%m/%Y %H:%M:%S')))
40
+ xml['a'].IV Base64.encode64(rsa_encrypt(Base64.encode64(iv)))
41
+ xml['a'].Key Base64.encode64(rsa_encrypt(Base64.encode64(key)))
42
+ xml['a'].Message Base64.encode64(aes_encrypt('An internal error has occured in ACAS'))
43
+ xml['a'].ResponseCode Base64.encode64(aes_encrypt('500'))
44
+ xml['a'].ServiceVersion Base64.encode64(aes_encrypt('1.0'))
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
50
+
51
+ end
52
+
53
+ private
54
+
55
+ attr_accessor :rsa_et_certificate, :form
56
+
57
+ def aes_encrypt(value)
58
+ encrypt_cipher = build_encrypt_cipher
59
+ encrypt_cipher.encrypt(value)
60
+ end
61
+
62
+ def build_encrypt_cipher
63
+ Mcrypt.new(:rijndael_256, :cbc, key, iv, :pkcs7)
64
+ end
65
+
66
+ def rsa_encrypt(value)
67
+ rsa_et_certificate.public_key.public_encrypt(value, OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING)
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,68 @@
1
+ require 'base64'
2
+ require 'openssl'
3
+ module EtFakeAcasServer
4
+ class InvalidCertificateFormatXmlBuilder
5
+ def initialize(form, rsa_et_certificate_path:)
6
+ self.form = form
7
+ self.rsa_et_certificate = OpenSSL::X509::Certificate.new File.read(rsa_et_certificate_path)
8
+ end
9
+
10
+ def key
11
+ @key ||= '12345678901234567890123456789012'
12
+ end
13
+
14
+ def iv
15
+ @iv ||= '12345678901234567890123456789012'
16
+ end
17
+
18
+ def builder
19
+ Nokogiri::XML::Builder.new do |xml|
20
+ namespaces = {
21
+ 'xmlns:s' => 'http://schemas.xmlsoap.org/soap/envelope',
22
+ 'xmlns:u' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
23
+ }
24
+ xml['s'].Envelope(namespaces) do
25
+ xml['s'].Header do
26
+ xml.ActivityId("e67a4d86-e096-4a35-aa3a-2b3a8ffaaa54", 'CorrelationId': '03973d23-3c39-4359-aa69-4d37b922fb60', xmlns: 'http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics')
27
+ xml['o'].Security('s:mustUnderstand': '1', 'xmlns:o': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd') do
28
+ xml['u'].Timestamp('u:Id': '_0') do
29
+ xml['u'].Created '2014-03-03T10:15.01.251Z'
30
+ xml['u'].Expires '2014-03-03T10:20:01.251Z'
31
+ end
32
+ end
33
+ end
34
+ xml['s'].Body do
35
+ xml.GetECCertificateResponse(xmlns: 'https://ec.acas.org.uk/lookup/') do
36
+ xml.GetECCertificateResult('xmlns:a': 'http://schemas.datacontract.org/2004/07/Acas.CertificateLookup.EcLookupService', 'xmlns:i': 'http://www.w3.org/2001/XMLSchema-instance') do
37
+ xml['a'].CurrentDateTime Base64.encode64(aes_encrypt(Time.now.strftime('%d/%m/%Y %H:%M:%S')))
38
+ xml['a'].IV Base64.encode64(rsa_encrypt(Base64.encode64(iv)))
39
+ xml['a'].Key Base64.encode64(rsa_encrypt(Base64.encode64(key)))
40
+ xml['a'].Message Base64.encode64(aes_encrypt('Invalid certificate format'))
41
+ xml['a'].ResponseCode Base64.encode64(aes_encrypt('201'))
42
+ xml['a'].ServiceVersion Base64.encode64(aes_encrypt('1.0'))
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ end
50
+
51
+ private
52
+
53
+ attr_accessor :rsa_et_certificate, :form
54
+
55
+ def aes_encrypt(value)
56
+ encrypt_cipher = build_encrypt_cipher
57
+ encrypt_cipher.encrypt(value)
58
+ end
59
+
60
+ def build_encrypt_cipher
61
+ Mcrypt.new(:rijndael_256, :cbc, key, iv, :pkcs7)
62
+ end
63
+
64
+ def rsa_encrypt(value)
65
+ rsa_et_certificate.public_key.public_encrypt(value, OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING)
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,68 @@
1
+ require 'base64'
2
+ require 'openssl'
3
+ module EtFakeAcasServer
4
+ class NoMatchXmlBuilder
5
+ def initialize(form, rsa_et_certificate_path:)
6
+ self.form = form
7
+ self.rsa_et_certificate = OpenSSL::X509::Certificate.new File.read(rsa_et_certificate_path)
8
+ end
9
+
10
+ def key
11
+ @key ||= '12345678901234567890123456789012'
12
+ end
13
+
14
+ def iv
15
+ @iv ||= '12345678901234567890123456789012'
16
+ end
17
+
18
+ def builder
19
+ Nokogiri::XML::Builder.new do |xml|
20
+ namespaces = {
21
+ 'xmlns:s' => 'http://schemas.xmlsoap.org/soap/envelope',
22
+ 'xmlns:u' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
23
+ }
24
+ xml['s'].Envelope(namespaces) do
25
+ xml['s'].Header do
26
+ xml.ActivityId("e67a4d86-e096-4a35-aa3a-2b3a8ffaaa54", 'CorrelationId': '03973d23-3c39-4359-aa69-4d37b922fb60', xmlns: 'http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics')
27
+ xml['o'].Security('s:mustUnderstand': '1', 'xmlns:o': 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd') do
28
+ xml['u'].Timestamp('u:Id': '_0') do
29
+ xml['u'].Created '2014-03-03T10:15.01.251Z'
30
+ xml['u'].Expires '2014-03-03T10:20:01.251Z'
31
+ end
32
+ end
33
+ end
34
+ xml['s'].Body do
35
+ xml.GetECCertificateResponse(xmlns: 'https://ec.acas.org.uk/lookup/') do
36
+ xml.GetECCertificateResult('xmlns:a': 'http://schemas.datacontract.org/2004/07/Acas.CertificateLookup.EcLookupService', 'xmlns:i': 'http://www.w3.org/2001/XMLSchema-instance') do
37
+ xml['a'].CurrentDateTime Base64.encode64(aes_encrypt(Time.now.strftime('%d/%m/%Y %H:%M:%S')))
38
+ xml['a'].IV Base64.encode64(rsa_encrypt(Base64.encode64(iv)))
39
+ xml['a'].Key Base64.encode64(rsa_encrypt(Base64.encode64(key)))
40
+ xml['a'].Message Base64.encode64(aes_encrypt('Certificate not found'))
41
+ xml['a'].ResponseCode Base64.encode64(aes_encrypt('200'))
42
+ xml['a'].ServiceVersion Base64.encode64(aes_encrypt('1.0'))
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
48
+
49
+ end
50
+
51
+ private
52
+
53
+ attr_accessor :rsa_et_certificate, :form
54
+
55
+ def aes_encrypt(value)
56
+ encrypt_cipher = build_encrypt_cipher
57
+ encrypt_cipher.encrypt(value)
58
+ end
59
+
60
+ def build_encrypt_cipher
61
+ Mcrypt.new(:rijndael_256, :cbc, key, iv, :pkcs7)
62
+ end
63
+
64
+ def rsa_encrypt(value)
65
+ rsa_et_certificate.public_key.public_encrypt(value, OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING)
66
+ end
67
+ end
68
+ end
data/public/.keep ADDED
File without changes
@@ -0,0 +1,15 @@
1
+ -----BEGIN RSA PRIVATE KEY-----
2
+ MIICXQIBAAKBgQCugdiVT7wF7Tbk62zgGoEqHdZ6l+7sG8XP63+gfhePdtTC+dYI
3
+ yN7UariubwmoyY3jHqHW8x1vNZnt/ByOdTXg/F+jlyZGvGQmatcu62nTcLlcmExe
4
+ KWppJoebMxu479PegbjhTA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rMSMwIQYJKoZIhvcNAQkBFhRzdXN0YWluaW5nQGhtY3RzLm5ldDCBnzANBgkq
10
+ hkiG9w0BAQEFAAOBjQAwgYkCgYEAoccWpVhguusZAv6nDPyFiG7XleBC0eBiaUVm
11
+ AKJKmUs2Qn31i11+kEjRuzsrMnk4h6xu/iPOOcyzu5IbICB2UIb62+bj2ep4blqU
12
+ pn03UD0N7oxb7THwdQDq+Y8HvWZNjQSRzwXUPq5d9bEwqLlmlqw+yYZTtyRLyoXG
13
+ sKNGOF0CAwEAATANBgkqhkiG9w0BAQsFAAOBgQBsGFAt/s7+q/pj8hMIdt7zD8S4
14
+ u/KE0ILm3nCY7dYa0ZOyDq8XtTLcdfA5eI+8YSJ8cgIf0p4+rlLb+5vhnJAlz/B0
15
+ 3E13jswlAn27JFOu2JtAImKO5nJT9kj3Iwh/fwmk36FWuyuAtwPtrvqqJB2Rg/nP
16
+ ciaVf/Ku3qVmuWu92Q==
17
+ -----END CERTIFICATE-----
data/tmp/.keep ADDED
File without changes
metadata ADDED
@@ -0,0 +1,199 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: et_fake_acas_server
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
5
+ platform: ruby
6
+ authors:
7
+ - Gary Taylor
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-05-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: puma
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.12'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.12'
55
+ - !ruby/object:Gem::Dependency
56
+ name: sinatra-contrib
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sinatra
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '2.0'
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: 2.0.3
79
+ type: :runtime
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - "~>"
84
+ - !ruby/object:Gem::Version
85
+ version: '2.0'
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: 2.0.3
89
+ - !ruby/object:Gem::Dependency
90
+ name: nokogiri
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.8'
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 1.8.2
99
+ type: :runtime
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: '1.8'
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: 1.8.2
109
+ - !ruby/object:Gem::Dependency
110
+ name: activesupport
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: '5.2'
116
+ type: :runtime
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: '5.2'
123
+ - !ruby/object:Gem::Dependency
124
+ name: ruby-mcrypt
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '0.2'
130
+ type: :runtime
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - "~>"
135
+ - !ruby/object:Gem::Version
136
+ version: '0.2'
137
+ description: Standalone fake acas server for use during dev and test of the employment
138
+ tribunal system
139
+ email:
140
+ - gary.taylor@hmcts.net
141
+ executables:
142
+ - et_fake_acas_server
143
+ extensions: []
144
+ extra_rdoc_files: []
145
+ files:
146
+ - ".gitignore"
147
+ - ".rspec"
148
+ - ".ruby-version"
149
+ - ".travis.yml"
150
+ - Gemfile
151
+ - Gemfile.lock
152
+ - LICENSE.txt
153
+ - README.md
154
+ - Rakefile
155
+ - bin/console
156
+ - bin/setup
157
+ - et_fake_acas_server.gemspec
158
+ - exe/et_fake_acas_server
159
+ - lib/config.ru
160
+ - lib/et_fake_acas_server.rb
161
+ - lib/et_fake_acas_server/forms/certificate_lookup_form.rb
162
+ - lib/et_fake_acas_server/server.rb
163
+ - lib/et_fake_acas_server/version.rb
164
+ - lib/et_fake_acas_server/xml_builders/found_xml_builder.rb
165
+ - lib/et_fake_acas_server/xml_builders/internal_error_xml_builder.rb
166
+ - lib/et_fake_acas_server/xml_builders/invalid_certificate_format_xml_builder.rb
167
+ - lib/et_fake_acas_server/xml_builders/no_match_xml_builder.rb
168
+ - lib/pdfs/76 EC (C) Certificate R000080.pdf
169
+ - public/.keep
170
+ - temp_x509/acas/privatekey.pem
171
+ - temp_x509/acas/publickey.cer
172
+ - temp_x509/et/privatekey.pem
173
+ - temp_x509/et/publickey.cer
174
+ - tmp/.keep
175
+ homepage: https://github.com/ministryofjustice/et_api
176
+ licenses:
177
+ - MIT
178
+ metadata:
179
+ allowed_push_host: http://mygemserver.com
180
+ post_install_message:
181
+ rdoc_options: []
182
+ require_paths:
183
+ - lib
184
+ required_ruby_version: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: '0'
189
+ required_rubygems_version: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: '0'
194
+ requirements: []
195
+ rubygems_version: 3.0.3
196
+ signing_key:
197
+ specification_version: 4
198
+ summary: Employment Tribunal (govuk) fake acas server
199
+ test_files: []