sepafm 1.1.8 → 1.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +8 -6
  3. data/Rakefile +1 -1
  4. data/lib/sepa/application_request.rb +12 -18
  5. data/lib/sepa/application_response.rb +0 -2
  6. data/lib/sepa/attribute_checks.rb +33 -28
  7. data/lib/sepa/banks/danske/danske_response.rb +9 -25
  8. data/lib/sepa/banks/danske/soap_danske.rb +1 -1
  9. data/lib/sepa/banks/nordea/nordea_response.rb +2 -16
  10. data/lib/sepa/banks/op/op_response.rb +5 -23
  11. data/lib/sepa/banks/samlink/samlink_response.rb +35 -0
  12. data/lib/sepa/banks/samlink/soap_samlink.rb +14 -0
  13. data/lib/sepa/certificates/samlink_certificate.pem +29 -0
  14. data/lib/sepa/certificates/samlink_root_certificate.pem +32 -0
  15. data/lib/sepa/client.rb +35 -8
  16. data/lib/sepa/error_messages.rb +16 -18
  17. data/lib/sepa/response.rb +7 -11
  18. data/lib/sepa/soap_builder.rb +7 -17
  19. data/lib/sepa/utilities.rb +4 -5
  20. data/lib/sepa/version.rb +1 -1
  21. data/lib/sepa/wsdl/wsdl_samlink_cert_production.xml +82 -0
  22. data/lib/sepa/wsdl/wsdl_samlink_cert_test.xml +82 -0
  23. data/lib/sepa/wsdl/wsdl_samlink_production.xml +160 -0
  24. data/lib/sepa/wsdl/wsdl_samlink_test.xml +160 -0
  25. data/lib/sepa/xml_schemas/samlink/CertApplicationRequest.xsd +105 -0
  26. data/lib/sepa/xml_schemas/samlink/CertApplicationResponse.xsd +88 -0
  27. data/lib/sepa/xml_templates/application_request/download_file.xml +0 -1
  28. data/lib/sepa/xml_templates/application_request/download_file_list.xml +0 -1
  29. data/lib/sepa/xml_templates/application_request/samlink/get_certificate.xml +12 -0
  30. data/lib/sepa/xml_templates/application_request/samlink/renew_certificate.xml +29 -0
  31. data/lib/sepa/xml_templates/soap/samlink/get_certificate.xml +14 -0
  32. data/lib/sepa/xml_templates/soap/samlink/renew_certificate.xml +14 -0
  33. data/lib/sepafm.rb +43 -31
  34. data/readme.md +1 -0
  35. data/sepafm.gemspec +2 -2
  36. data/test/custom_assertions.rb +30 -28
  37. data/test/sepa/banks/danske/danske_cert_response_test.rb +13 -10
  38. data/test/sepa/banks/danske/danske_generic_soap_builder_test.rb +9 -31
  39. data/test/sepa/banks/danske/danske_get_bank_cert_test.rb +4 -5
  40. data/test/sepa/banks/danske/danske_response_test.rb +2 -3
  41. data/test/sepa/banks/danske/responses/create_cert_corrupted.xml +15 -0
  42. data/test/sepa/banks/nordea/nordea_application_request_test.rb +4 -6
  43. data/test/sepa/banks/nordea/nordea_application_response_test.rb +14 -15
  44. data/test/sepa/banks/nordea/nordea_cert_request_soap_builder_test.rb +1 -3
  45. data/test/sepa/banks/nordea/nordea_generic_soap_builder_test.rb +6 -16
  46. data/test/sepa/banks/nordea/nordea_response_test.rb +11 -11
  47. data/test/sepa/banks/op/op_cert_application_request_test.rb +1 -1
  48. data/test/sepa/banks/op/op_cert_request_soap_builder_test.rb +0 -1
  49. data/test/sepa/banks/op/op_response_test.rb +2 -2
  50. data/test/sepa/banks/samlink/responses/dfl.xml +21 -0
  51. data/test/sepa/banks/samlink/responses/gc_error_30.xml +21 -0
  52. data/test/sepa/banks/samlink/responses/rc.xml +21 -0
  53. data/test/sepa/banks/samlink/samlink_application_request_test.rb +36 -0
  54. data/test/sepa/banks/samlink/samlink_cert_application_request_test.rb +13 -0
  55. data/test/sepa/banks/samlink/samlink_cert_request_soap_builder_test.rb +13 -0
  56. data/test/sepa/banks/samlink/samlink_generic_soap_builder_test.rb +34 -0
  57. data/test/sepa/banks/samlink/samlink_renew_cert_application_request_test.rb +36 -0
  58. data/test/sepa/banks/samlink/samlink_renew_cert_request_soap_builder_test.rb +26 -0
  59. data/test/sepa/banks/samlink/samlink_response_test.rb +71 -0
  60. data/test/sepa/client_test.rb +32 -6
  61. data/test/sepa/fixtures.rb +169 -7
  62. data/test/sepa/sepa_test.rb +1 -1
  63. data/test/test_helper.rb +8 -7
  64. data/test_client/data/certs_example.rb +9 -9
  65. data/test_client/data/params_example.rb +18 -19
  66. data/test_client/test_client.rb +6 -0
  67. metadata +41 -5
@@ -1,7 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class OpCertRequestSoapBuilderTest < ActiveSupport::TestCase
4
-
5
4
  def setup
6
5
  @params = op_get_certificate_params
7
6
  @request = Sepa::SoapBuilder.new(@params)
@@ -2,12 +2,12 @@ require 'test_helper'
2
2
 
3
3
  class OpResponseTest < ActiveSupport::TestCase
4
4
  test "fails with invalid params" do
5
- a = Sepa::OpResponse.new({ response: "Jees", command: "not" })
5
+ a = Sepa::OpResponse.new(response: "Jees", command: "not")
6
6
  refute a.valid?
7
7
  end
8
8
 
9
9
  test "complains if application response is not valid against schema" do
10
- a = Sepa::OpResponse.new({ response: "<ar>text</ar>", command: "notvalid" })
10
+ a = Sepa::OpResponse.new(response: "<ar>text</ar>", command: "notvalid")
11
11
  refute a.valid?
12
12
  end
13
13
  end
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="ISO-8859-15"?>
2
+ <soapenv:Envelope xmlns:xalan="http://xml.apache.org/xslt" xmlns:date="http://exslt.org/dates-and-times" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cor="http://bxd.fi/CorporateFileService" xmlns:mod="http://model.bxd.fi"><soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp wsu:Id="Timestamp-1e635849-b0a1-478b-b179-03a54003727e" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsu:Created>2016-10-11T10:40:09Z</wsu:Created><wsu:Expires>2016-10-11T10:45:09Z</wsu:Expires></wsu:Timestamp><wsse:BinarySecurityToken wsu:Id="SecurityToken-d37a6122-f1cc-47c8-9f3e-756358f12e4d" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">MIIFETCCAvmgAwIBAgIQAXeQelU0Ry061fV8JuYnPzANBgkqhkiG9w0BAQsFADBJMQswCQYDVQQGEwJGSTEQMA4GA1UECgwHU2FtbGluazEoMCYGA1UEAwwfU2FtbGluayBTeXN0ZW0gVGVzdCBDdXN0b21lciBDQTAeFw0xNjA1MDkxMTQ3MzhaFw0xNzA1MDkxMTQ3MzlaMFYxCzAJBgNVBAYTAkZJMSEwHwYDVQQKDBhBaW5laXN0b3BhbHZlbHV0LVNhbWxpbmsxETAPBgNVBAMMCFNFUEFXRUJTMREwDwYDVQQEDAgwMDAwMDAwMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL0m2LDr0of/3p7wCZagpGGWIW1d6jYG6TvADQn2aBz4AI9BFGKcU4bB9FPHftt5+8k0weTiEvLiUDZNtiPhZ9MiR2O3yAgX6EUnWvcpf6yJfQPSMaCl32SIrtoG79gMQDnV/AVgvIenP3oxjyeRq+wtlfCAXu8xeRIIoNjoESr5pTrOAT2APvz7xkSJPTVUmOJnyBsTyuL9z0xmZjDXL8Ut4Yav/rms2cLncJUDn/M4i5kbn5KcoyBKOn5B3grrzhPgHMktIox55Klt2WWFZpu8MtWqe/9w9+78B84RF5vrrebdGzEcoM8IB3jx1ZRaCqyMjkNbZiTz1f+4URxH15kCAwEAAaOB5zCB5DAfBgNVHSMEGDAWgBQCqgyevelIgScIKObo3hT3FYy5tjCBkQYDVR0fBIGJMIGGMIGDoIGAoH6GfGxkYXA6Ly90eXJuaS5jb3Zlci5zb25lcmEubmV0OjM4OS9jbj1TYW1saW5rJTIwU3lzdGVtJTIwVGVzdCUyMEN1c3RvbWVyJTIwQ0Esbz1TYW1saW5rLGM9Zmk/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdDtiaW5hcnkwDgYDVR0PAQH/BAQDAgTwMB0GA1UdDgQWBBSn8WI4S0IJ2oW9gKqoAmGjXpxTIDANBgkqhkiG9w0BAQsFAAOCAgEASqke0PNZdGEiheOmNNbVUzhxwWf6z6flbVVj2ns4bhYzRfdZPG4fXwif2TKrqqVW/5aovphKTODxFlDMd2hpEjm764bWvk4GWLpDD/gIxq6cj4hHi6T0lwsPGMSzK6nalQzo64PkBNw+d41AWEigV8DoDZZvnDUZNDKJmqguG/ocUzCl0deJ+HDmjRcWFys6FHFO1tv5nIGUHbgr638v0XJ93sHTW+EC09lC4qMiWi8BGjhlZMfRcnRdL43F8LrL83NUfu5XtSeKXzvyJBUIo5U/p5FioRvS3gD9j2pBik/YaQvs7hjM7R0GtBDu/Lz1wtrq3jEb8pmBuqpt7ZqkhmNPLEL8rca5mB5LivVPGb3OZ9FjRtshqmncLm/7AiUdB+eWFNt/7iwPXUCcNLLq50u+nEhzgZWq9lcZld/av7XCpiWnqRvGgWowOVrcO4bZQ7CJ8gIsRgGLOBvGNeho2bBW10OVpHRswx9wIHQ5Iql7DIyL4z/yZhfSk7TD6EZAeAkuiR8wdq9CFgE3chPCRHt/r5z+QlyC4BYsA+OhfKtmrZ41gSGf0w+qY2UMdxcXafKj+Wyqhsz985TpRWpj7pryDMarMlX5053Jj/xibzhzSK5ZUovgVEX35zEFFHqM0hlerf6WrmYU8N0SNO6uuWOzm7B6xsTO+dKCAvzVQHo=</wsse:BinarySecurityToken><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
3
+ <SignedInfo>
4
+ <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
5
+ <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
6
+ <Reference URI="#Timestamp-1e635849-b0a1-478b-b179-03a54003727e">
7
+ <Transforms>
8
+ <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
9
+ </Transforms>
10
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
11
+ <DigestValue>wicEP3FYt3t8pm1ly9pOgRuK9/Q=</DigestValue>
12
+ </Reference>
13
+ <Reference URI="#Body-ab8ee705-d4f7-4958-9f40-370e2d8dfcf6">
14
+ <Transforms>
15
+ <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
16
+ </Transforms>
17
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
18
+ <DigestValue>uhLYCrGfSz7/NVdFdwSHWxTSy5E=</DigestValue>
19
+ </Reference>
20
+ </SignedInfo>
21
+ <SignatureValue>MpVd8iLrl2v9hFPZxPURk7uK7IPyxIfwAhcxJGs+WNi+9rDGK4q3ooHQUKiYtzbd6ko6cIHLsujahEp7EM22TYG6U4HFYggq5e5thZBmaByKNB08cp1Z01/iHUQxGTMv7PwDgpX85VJ0LJIDI1xlwEjxeml306LRBO+Z8jSBwIH2/Z1jOmRc7f8AmDhJ5rpVRyro5vqkx9Ye27MFLle9P7z0yz+9mpB++89tLap9lKTruzYgDp5ASEGawUljoid4xSDI3r0AsHG2zubZFEXjQsVRUGLeeAvI+0+6ANp65ZRLb/dgD+ZOIJW2mTgmp0DreMH6yL/zWjV7tRlcLGFHRA==</SignatureValue><KeyInfo><wsse:SecurityTokenReference xmlns=""><wsse:Reference URI="#SecurityToken-d37a6122-f1cc-47c8-9f3e-756358f12e4d" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference></KeyInfo></Signature></wsse:Security></soapenv:Header><soapenv:Body wsu:Id="Body-ab8ee705-d4f7-4958-9f40-370e2d8dfcf6" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><cor:downloadFileListout><mod:ResponseHeader><mod:SenderId>97506614</mod:SenderId><mod:RequestId>eef61dbf30916c7086fccb07ecb41e89f9</mod:RequestId><mod:Timestamp>2016-10-11T13:40:09+03:00</mod:Timestamp><mod:ResponseCode>00</mod:ResponseCode><mod:ResponseText>OK</mod:ResponseText><mod:ReceiverId/></mod:ResponseHeader><mod:ApplicationResponse>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPEFwcGxpY2F0aW9uUmVzcG9uc2UgeG1sbnM9Imh0dHA6Ly9ieGQuZmkveG1sZGF0YS8iIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiPjxDdXN0b21lcklkPjk3NTA2NjE0PC9DdXN0b21lcklkPjxUaW1lc3RhbXA+MjAxNi0xMC0xMVQxMzo0MDowOS4yMjYrMDM6MDA8L1RpbWVzdGFtcD48UmVzcG9uc2VDb2RlPjAwPC9SZXNwb25zZUNvZGU+PFJlc3BvbnNlVGV4dD5PSzwvUmVzcG9uc2VUZXh0PjxFbmNyeXB0ZWQ+ZmFsc2U8L0VuY3J5cHRlZD48Q29tcHJlc3NlZD5mYWxzZTwvQ29tcHJlc3NlZD48U2lnbmF0dXJlIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIj4KPFNpZ25lZEluZm8+CiAgPENhbm9uaWNhbGl6YXRpb25NZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8yMDAxL1JFQy14bWwtYzE0bi0yMDAxMDMxNSIvPgogIDxTaWduYXR1cmVNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjcnNhLXNoYTEiLz4KICA8UmVmZXJlbmNlIFVSST0iIj4KICAgIDxUcmFuc2Zvcm1zPgogICAgICA8VHJhbnNmb3JtIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2ln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pFRkZIcU0waGxlcmY2V3JtWVU4TjBTTk82dXVXT3ptN0I2eHNUTytkS0NBdnpWUUhvPTwvWDUwOUNlcnRpZmljYXRlPjxYNTA5SXNzdWVyU2VyaWFsPjxYNTA5SXNzdWVyTmFtZT5DTj1TYW1saW5rIFN5c3RlbSBUZXN0IEN1c3RvbWVyIENBLCBPPVNhbWxpbmssIEM9Rkk8L1g1MDlJc3N1ZXJOYW1lPjxYNTA5U2VyaWFsTnVtYmVyPjE5NTAwNDE2ODExMzg3MzkwNDEyODY3OTQwOTgyNTIzMjY3MTk8L1g1MDlTZXJpYWxOdW1iZXI+PC9YNTA5SXNzdWVyU2VyaWFsPjwvWDUwOURhdGE+PC9LZXlJbmZvPjwvU2lnbmF0dXJlPjwvQXBwbGljYXRpb25SZXNwb25zZT4=</mod:ApplicationResponse></cor:downloadFileListout></soapenv:Body></soapenv:Envelope>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <soapenv:Envelope xmlns:cer="http://mlp.op.fi/OPCertificateService" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1"><wsu:Timestamp wsu:Id="Timestamp-1990f76a-05a4-4d2a-ab24-8c505f8542b6" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsu:Created>2016-10-18T11:25:50Z</wsu:Created><wsu:Expires>2016-10-18T11:30:50Z</wsu:Expires></wsu:Timestamp><wsse:BinarySecurityToken wsu:Id="SecurityToken-1388caea-ea63-4c54-acc1-b48cd11c7874" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" xmlns:wsu="http://docs.oasis-open.org/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nvhROysBke77UoO6jyHDxskFOHd9yZdnPfzpJ6AVXzqwUxdLUakk38Wk8ODAyF6leRuy+I/biO+jRa52C0Ai4+XF5VNa1UUrsvjYJl6BqKJmI8aO34ArzOcFocUF9UBQNC/eqL/AIx8mp5HC6fWA58kvWwiwdC5CQILbMMADpDjmEpkg2ueBsLudrxXw1uNktY2wUv95KcfmlqdeAPkb0ra5x7p5SM1bJYFh8MMpm9BwnJ3aq/l1+qFMmL0GCcevNQP5Dp3Vkrsf601aQcYyaptHMfiv6ryLfVq3487gUPNPUwWnx24K1A5j1aQBmF8TLZl8MRkDeeEIwbXJxgoZZXAJSO2Yf/JO/vPCalBJflosiNggo9oxE8LCjqbJ26HeiNoeNUC1cnv15yhb6O+eSgZbkAYfuKgLWeOele3oC2QWqqT7TSHaEipRz3TifdzpzKuXRvQaPv6lra28nbyc+OeJlnr/A7ZH3VF6OkasAoIC5wmUtJgcQW5eD5jmaQZYktZljNWKXEm6tXmXOnDoRib0yzqUA9s6ReD7sBHBUaTDZFfy/qrAHfYk4Pe/9seeBmbTnkdi5VnoNQT70boqaVsa/OK8eE2EWjTYs++ocfWaGSpNpUI4al2qFueN8ji+nw==</wsse:BinarySecurityToken><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
3
+ <SignedInfo>
4
+ <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
5
+ <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
6
+ <Reference URI="#Timestamp-1990f76a-05a4-4d2a-ab24-8c505f8542b6">
7
+ <Transforms>
8
+ <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
9
+ </Transforms>
10
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
11
+ <DigestValue>Kbv3040EAHfnlTpIzaAGCdt+xtA=</DigestValue>
12
+ </Reference>
13
+ <Reference URI="#Body-ed3563c5-a136-46a4-b593-b10392442d8f">
14
+ <Transforms>
15
+ <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
16
+ </Transforms>
17
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
18
+ <DigestValue>sj2wtXrWFXye6ZYW9nm3tfETe/M=</DigestValue>
19
+ </Reference>
20
+ </SignedInfo>
21
+ <SignatureValue>EqPAaF6kiMsVbSCHTZ2PyQiBDccjyH4DWaQhgOaPlgKNCPsM/VSzr0nlL02LgwR87JSl1WtTX+BfX3UA1QCSdp2tAXVZG1eCfl6v+SObMaQMo63e2IlAPM+oKjxiJeU1hzxMFFYHhGBDWVW3d2erXXdjqcPiF7H27C/UzqecV59LV53o+S0Bm3bvz4uhkQ/F5da5pGexnF65gczRzd8+VHrAsEwqa5L59EQoIxyJOyBHXBaHAzYfDTCAe88ApGqEs2RwEtoME/3Myq+cbVceGyopSjYHSWG0SIC/y5QWMTbVLXxY5CGd3PrvNa5rMjcILTXQ+2HWRqzb68uG+86Gxg==</SignatureValue><KeyInfo><wsse:SecurityTokenReference xmlns=""><wsse:Reference URI="#SecurityToken-1388caea-ea63-4c54-acc1-b48cd11c7874" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference></KeyInfo></Signature></wsse:Security></soapenv:Header><soapenv:Body wsu:Id="Body-ed3563c5-a136-46a4-b593-b10392442d8f" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><cer:getCertificateout><cer:ResponseHeader><cer:SenderId>97506614</cer:SenderId><cer:RequestId>5328c11a27c31e9e26e8264121d6bde12b</cer:RequestId><cer:Timestamp>2016-10-18T14:25:50+03:00</cer:Timestamp><cer:ResponseCode>30</cer:ResponseCode><cer:ResponseText>Asiakkaan palvelusopimuksen tarkistuksessa virhe:A00</cer:ResponseText></cer:ResponseHeader><cer:ApplicationResponse>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz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4OTYzOTE0MDU3MjMyMDU1NDY2NTMwMjc4MzYwNzQ0NjE8L1g1MDlTZXJpYWxOdW1iZXI+PC9YNTA5SXNzdWVyU2VyaWFsPjwvWDUwOURhdGE+PC9LZXlJbmZvPjwvU2lnbmF0dXJlPjwvbnMyOkNlcnRBcHBsaWNhdGlvblJlc3BvbnNlPg==</cer:ApplicationResponse></cer:getCertificateout></soapenv:Body></soapenv:Envelope>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cer="http://mlp.op.fi/OPCertificateService"><soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><wsu:Timestamp wsu:Id="Timestamp-704b7a59-26f1-4c98-8e07-1343d0756d10" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsu:Created>2016-10-11T09:50:52Z</wsu:Created><wsu:Expires>2016-10-11T09:55:52Z</wsu:Expires></wsu:Timestamp><wsse:BinarySecurityToken wsu:Id="SecurityToken-2a7e4d0b-7553-4411-8bb3-2ac0852d9a5d" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">MIIFETCCAvmgAwIBAgIQAXeQelU0Ry061fV8JuYnPzANBgkqhkiG9w0BAQsFADBJMQswCQYDVQQGEwJGSTEQMA4GA1UECgwHU2FtbGluazEoMCYGA1UEAwwfU2FtbGluayBTeXN0ZW0gVGVzdCBDdXN0b21lciBDQTAeFw0xNjA1MDkxMTQ3MzhaFw0xNzA1MDkxMTQ3MzlaMFYxC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Wi8BGjhlZMfRcnRdL43F8LrL83NUfu5XtSeKXzvyJBUIo5U/p5FioRvS3gD9j2pBik/YaQvs7hjM7R0GtBDu/Lz1wtrq3jEb8pmBuqpt7ZqkhmNPLEL8rca5mB5LivVPGb3OZ9FjRtshqmncLm/7AiUdB+eWFNt/7iwPXUCcNLLq50u+nEhzgZWq9lcZld/av7XCpiWnqRvGgWowOVrcO4bZQ7CJ8gIsRgGLOBvGNeho2bBW10OVpHRswx9wIHQ5Iql7DIyL4z/yZhfSk7TD6EZAeAkuiR8wdq9CFgE3chPCRHt/r5z+QlyC4BYsA+OhfKtmrZ41gSGf0w+qY2UMdxcXafKj+Wyqhsz985TpRWpj7pryDMarMlX5053Jj/xibzhzSK5ZUovgVEX35zEFFHqM0hlerf6WrmYU8N0SNO6uuWOzm7B6xsTO+dKCAvzVQHo=</wsse:BinarySecurityToken><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
3
+ <SignedInfo>
4
+ <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
5
+ <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
6
+ <Reference URI="#Timestamp-704b7a59-26f1-4c98-8e07-1343d0756d10">
7
+ <Transforms>
8
+ <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
9
+ </Transforms>
10
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
11
+ <DigestValue>l94AUEJKBYfBav3eg4exvrnk3W8=</DigestValue>
12
+ </Reference>
13
+ <Reference URI="#Body-28d64256-6d10-4d7f-978c-ad1d5a365703">
14
+ <Transforms>
15
+ <Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
16
+ </Transforms>
17
+ <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
18
+ <DigestValue>awonHWTg8xIIp9kRdDyIXe+zdO4=</DigestValue>
19
+ </Reference>
20
+ </SignedInfo>
21
+ <SignatureValue>auqxzZS3n5032JsiJpITUkR6YgBhumzOcZ+UH+PqAMfvmPSrHX+Ku1N2YZ10MNfxN1JWopWdqSMDtihs3joqwNYfB4atLgzPnwgGTXun0dupj9zjwB7S9Cyln0fyqCeSdSrCZIZo9cD0ndDp+XrtPo+A/j0QHEE1CGJEh3ncL6Lq35Jn31ozJba9mwYJTAARjnVSgLnstLomSm3o5hqlR74qh382h7kILHf1TDlmu/YbE6hDTAh1SURxFn32p6fdXTHFlIq8Wx+f1/uou6MhjFGHbxVZBCTsEjvq9Jbg9z75vUBicWHT5rFA4c44PbBJdDXIgbvm6XoWLIEfPmuEAQ==</SignatureValue><KeyInfo><wsse:SecurityTokenReference xmlns=""><wsse:Reference URI="#SecurityToken-2a7e4d0b-7553-4411-8bb3-2ac0852d9a5d" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/></wsse:SecurityTokenReference></KeyInfo></Signature></wsse:Security></soapenv:Header><soapenv:Body wsu:Id="Body-28d64256-6d10-4d7f-978c-ad1d5a365703" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><cer:getCertificateout><cer:ResponseHeader><cer:SenderId>97506614</cer:SenderId><cer:RequestId>856a0222fc24b908c69be8095e67d8dc7a</cer:RequestId><cer:Timestamp>2016-10-11T12:50:52+03:00</cer:Timestamp><cer:ResponseCode>0</cer:ResponseCode><cer:ResponseText>OK</cer:ResponseText></cer:ResponseHeader><cer:ApplicationResponse>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPG5zMjpDZXJ0QXBwbGljYXRpb25SZXNwb25zZSB4bWxuczpuczI9Imh0dHA6Ly9vcC5maS9tbHAveG1sZGF0YS8iPjxuczI6Q3VzdG9tZXJJZD45NzUwNjYxNDwvbnMyOkN1c3RvbWVySWQ+PFRpbWVzdGFtcCB4bWxucz0iaHR0cDovL29wLmZpL21scC94bWxkYXR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emh6U0s1WlVvdmdWRVgzNXpFRkZIcU0waGxlcmY2V3JtWVU4TjBTTk82dXVXT3ptN0I2eHNUTytkS0NBdnpWUUhvPTwvWDUwOUNlcnRpZmljYXRlPjxYNTA5SXNzdWVyU2VyaWFsPjxYNTA5SXNzdWVyTmFtZT5DTj1TYW1saW5rIFN5c3RlbSBUZXN0IEN1c3RvbWVyIENBLCBPPVNhbWxpbmssIEM9Rkk8L1g1MDlJc3N1ZXJOYW1lPjxYNTA5U2VyaWFsTnVtYmVyPjE5NTAwNDE2ODExMzg3MzkwNDEyODY3OTQwOTgyNTIzMjY3MTk8L1g1MDlTZXJpYWxOdW1iZXI+PC9YNTA5SXNzdWVyU2VyaWFsPjwvWDUwOURhdGE+PC9LZXlJbmZvPjwvU2lnbmF0dXJlPjwvbnMyOkNlcnRBcHBsaWNhdGlvblJlc3BvbnNlPg==</cer:ApplicationResponse></cer:getCertificateout></soapenv:Body></soapenv:Envelope>
@@ -0,0 +1,36 @@
1
+ require 'test_helper'
2
+
3
+ class SamlinkApplicationRequestTest < ActiveSupport::TestCase
4
+ setup do
5
+ @params = samlink_generic_params
6
+
7
+ # Convert the keys here since the conversion is usually done by the client and these tests
8
+ # bypass the client
9
+ @params[:signing_private_key] = rsa_key @params[:signing_private_key]
10
+ @params[:own_signing_certificate] = x509_certificate @params[:own_signing_certificate]
11
+
12
+ ar_file = Sepa::SoapBuilder.new(@params).application_request
13
+
14
+ @params[:command] = :download_file_list
15
+ ar_list = Sepa::SoapBuilder.new(@params).application_request
16
+
17
+ @params[:command] = :upload_file
18
+ ar_up = Sepa::SoapBuilder.new(@params).application_request
19
+
20
+ @doc_file = Nokogiri::XML(ar_file.to_xml)
21
+ @doc_list = Nokogiri::XML(ar_list.to_xml)
22
+ @doc_up = Nokogiri::XML(ar_up.to_xml)
23
+ end
24
+
25
+ test 'download file validates against schema' do
26
+ assert_valid_against_schema 'application_request.xsd', @doc_file
27
+ end
28
+
29
+ test 'upload file validates against schema' do
30
+ assert_valid_against_schema 'application_request.xsd', @doc_up
31
+ end
32
+
33
+ test 'download file list validates against schema' do
34
+ assert_valid_against_schema 'application_request.xsd', @doc_list
35
+ end
36
+ end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ class SamlinkCertApplicationRequestTest < ActiveSupport::TestCase
4
+ setup do
5
+ @params = samlink_get_certificate_params
6
+ @ar = Sepa::SoapBuilder.new(@params).application_request
7
+ @xml = Nokogiri::XML(@ar.to_xml)
8
+ end
9
+
10
+ test "validates against schema" do
11
+ assert_valid_against_schema 'samlink/CertApplicationRequest.xsd', @xml
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ class SamlinkCertRequestSoapBuilderTest < ActiveSupport::TestCase
4
+ setup do
5
+ @params = samlink_get_certificate_params
6
+ @request = Sepa::SoapBuilder.new(@params)
7
+ @xml = Nokogiri::XML(@request.to_xml)
8
+ end
9
+
10
+ test "validates against schema" do
11
+ assert_valid_against_schema 'soap.xsd', @xml
12
+ end
13
+ end
@@ -0,0 +1,34 @@
1
+ require 'test_helper'
2
+
3
+ class SamlinkGenericSoapBuilderTest < ActiveSupport::TestCase
4
+ def setup
5
+ @params = samlink_generic_params
6
+
7
+ # Convert the keys here since the conversion is usually done by the client and these tests
8
+ # bypass the client
9
+ @params[:signing_private_key] = rsa_key @params[:signing_private_key]
10
+ @params[:own_signing_certificate] = x509_certificate @params[:own_signing_certificate]
11
+
12
+ @soap_request = Sepa::SoapBuilder.new(@params)
13
+ @doc = Nokogiri::XML(@soap_request.to_xml)
14
+ end
15
+
16
+ def test_receiver_is_is_set_correctly
17
+ receiver_id_node = @doc.xpath('//bxd:ReceiverId', bxd: 'http://model.bxd.fi').first
18
+ assert_equal '11111111A1', receiver_id_node.content
19
+ end
20
+
21
+ test 'validates against schema' do
22
+ assert_valid_against_schema 'soap.xsd', @doc
23
+ end
24
+
25
+ test 'validates against ws security schema' do
26
+ wsse = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'
27
+
28
+ ws_node = @doc.xpath('//wsse:Security', wsse: wsse)
29
+ ws_node = ws_node.to_xml
30
+ ws_node = Nokogiri::XML(ws_node)
31
+
32
+ assert_valid_against_schema 'oasis-200401-wss-wssecurity-secext-1.0.xsd', ws_node
33
+ end
34
+ end
@@ -0,0 +1,36 @@
1
+ require 'test_helper'
2
+
3
+ class SamlinkRenewCertApplicationRequestTest < ActiveSupport::TestCase
4
+ setup do
5
+ @params = samlink_renew_certificate_params
6
+
7
+ # Convert the keys here since the conversion is usually done by the client and these tests
8
+ # bypass the client
9
+ @params[:own_signing_certificate] = x509_certificate(@params[:own_signing_certificate])
10
+ @params[:signing_private_key] = rsa_key(@params[:signing_private_key])
11
+
12
+ @doc = Nokogiri::XML(Sepa::SoapBuilder.new(@params).application_request.to_xml)
13
+ end
14
+
15
+ test "validates against schema" do
16
+ assert_valid_against_schema 'samlink/CertApplicationRequest.xsd', @doc
17
+ end
18
+
19
+ test "content is set correctly" do
20
+ assert_equal format_cert_request(@params[:signing_csr]), @doc.at_css("Content").content
21
+ end
22
+
23
+ test 'digest is calculated correctly' do
24
+ calculated_digest = @doc.at("xmlns|DigestValue", xmlns: 'http://www.w3.org/2000/09/xmldsig#').content
25
+
26
+ # Remove signature for calculating digest
27
+ @doc.at("xmlns|Signature", xmlns: 'http://www.w3.org/2000/09/xmldsig#').remove
28
+
29
+ # Calculate digest
30
+ sha1 = OpenSSL::Digest::SHA1.new
31
+ actual_digest = encode(sha1.digest(@doc.canonicalize))
32
+
33
+ # And then make sure the two are equal
34
+ assert_equal actual_digest.strip, calculated_digest.strip
35
+ end
36
+ end
@@ -0,0 +1,26 @@
1
+ require 'test_helper'
2
+
3
+ class SamlinkRenewCertRequestSoapBuilderTest < ActiveSupport::TestCase
4
+ setup do
5
+ @params = samlink_renew_certificate_params
6
+
7
+ # Convert the keys here since the conversion is usually done by the client and these tests
8
+ # bypass the client
9
+ @params[:own_signing_certificate] = x509_certificate(@params[:own_signing_certificate])
10
+ @params[:signing_private_key] = rsa_key(@params[:signing_private_key])
11
+
12
+ @doc = Nokogiri::XML(Sepa::SoapBuilder.new(@params).to_xml)
13
+ end
14
+
15
+ test "validates against schema" do
16
+ assert_valid_against_schema 'soap.xsd', @doc
17
+ end
18
+
19
+ test 'application request is inserted properly' do
20
+ ar_node = @doc.at("xmlns|ApplicationRequest", xmlns: 'http://mlp.op.fi/OPCertificateService')
21
+ ar_doc = Nokogiri::XML(decode(ar_node.content))
22
+
23
+ assert ar_doc.respond_to?(:canonicalize)
24
+ assert_equal @params[:customer_id], ar_doc.at_css("CustomerId").content
25
+ end
26
+ end
@@ -0,0 +1,71 @@
1
+ require "test_helper"
2
+
3
+ class SamlinkResponseTest < ActiveSupport::TestCase
4
+ setup do
5
+ @gc_error_30 = Sepa::SamlinkResponse.new(
6
+ response: File.read("#{SAMLINK_TEST_RESPONSE_PATH}/gc_error_30.xml"),
7
+ command: :get_certificate,
8
+ environment: :production,
9
+ )
10
+
11
+ @rc = Sepa::SamlinkResponse.new(
12
+ response: File.read("#{SAMLINK_TEST_RESPONSE_PATH}/rc.xml"),
13
+ command: :renew_certificate,
14
+ environment: :test,
15
+ )
16
+
17
+ @dfl = Sepa::SamlinkResponse.new(
18
+ response: File.read("#{SAMLINK_TEST_RESPONSE_PATH}/dfl.xml"),
19
+ command: :download_file_list,
20
+ environment: :test,
21
+ )
22
+ end
23
+
24
+ test '#response_code' do
25
+ assert_equal "30", @gc_error_30.response_code
26
+ assert_equal "00", @rc.response_code
27
+ assert_equal "00", @dfl.response_code
28
+ end
29
+
30
+ test '#response_text' do
31
+ assert_equal "Asiakkaan palvelusopimuksen tarkistuksessa virhe:A00", @gc_error_30.response_text
32
+ assert_equal "OK", @rc.response_text
33
+ assert_equal "OK", @dfl.response_text
34
+ end
35
+
36
+ test '#hashes_match' do
37
+ assert @gc_error_30.hashes_match?
38
+ assert @rc.hashes_match?
39
+ assert @dfl.hashes_match?
40
+ end
41
+
42
+ test '#signature_is_valid?' do
43
+ assert @gc_error_30.signature_is_valid?
44
+ assert @rc.signature_is_valid?
45
+ assert @dfl.signature_is_valid?
46
+ end
47
+
48
+ test '#certificate' do
49
+ assert_equal OpenSSL::X509::Certificate, @gc_error_30.certificate.class
50
+ assert_equal OpenSSL::X509::Certificate, @rc.certificate.class
51
+ assert_equal OpenSSL::X509::Certificate, @dfl.certificate.class
52
+ end
53
+
54
+ test '#application_response' do
55
+ refute_empty @gc_error_30.application_response
56
+ refute_empty @rc.application_response
57
+ refute_empty @dfl.application_response
58
+ end
59
+
60
+ test '#own_signing_certificate' do
61
+ assert_nil @gc_error_30.own_signing_certificate
62
+ assert_nothing_raised { x509_certificate @rc.own_signing_certificate }
63
+ assert_nil @dfl.own_signing_certificate
64
+ end
65
+
66
+ test '#certificate_is_trusted?' do
67
+ assert @gc_error_30.certificate_is_trusted?
68
+ assert @rc.certificate_is_trusted?
69
+ assert @dfl.certificate_is_trusted?
70
+ end
71
+ end
@@ -21,7 +21,7 @@ class ClientTest < ActiveSupport::TestCase
21
21
  end
22
22
 
23
23
  test "correct banks are supported" do
24
- assert_equal [:danske, :nordea, :op].sort, Sepa::Client::BANKS.sort
24
+ assert_equal [:danske, :nordea, :op, :samlink].sort, Sepa::Client::BANKS.sort
25
25
  end
26
26
 
27
27
  test "correct allowed commands for nordea" do
@@ -57,6 +57,17 @@ class ClientTest < ActiveSupport::TestCase
57
57
  assert_same_items commands, c.allowed_commands
58
58
  end
59
59
 
60
+ test "correct allowed commands for samlink" do
61
+ c = Sepa::Client.new(bank: :samlink)
62
+
63
+ commands = [
64
+ STANDARD_COMMANDS - [:get_user_info],
65
+ [:get_certificate, :renew_certificate],
66
+ ].flatten
67
+
68
+ assert_same_items commands, c.allowed_commands
69
+ end
70
+
60
71
  test "should initialize with attributes" do
61
72
  assert Sepa::Client.new @nordea_generic_params
62
73
  end
@@ -105,7 +116,7 @@ class ClientTest < ActiveSupport::TestCase
105
116
  end
106
117
 
107
118
  test "customer id is correct" do
108
- wrong_ids = ["a"*17, nil]
119
+ wrong_ids = ["a" * 17, nil]
109
120
 
110
121
  wrong_ids.each do |wrong_id|
111
122
  @nordea_generic_params[:customer_id] = wrong_id
@@ -149,7 +160,7 @@ class ClientTest < ActiveSupport::TestCase
149
160
  end
150
161
 
151
162
  test 'target id is checked' do
152
- wrong_ids = ["ready"*81, nil, false]
163
+ wrong_ids = ["ready" * 81, nil, false]
153
164
  @nordea_generic_params[:command] = :upload_file
154
165
 
155
166
  wrong_ids.each do |wrong_id|
@@ -171,7 +182,7 @@ class ClientTest < ActiveSupport::TestCase
171
182
  end
172
183
 
173
184
  test "file type is checked" do
174
- wrong_types = ["kalle"*36, nil, false]
185
+ wrong_types = ["kalle" * 36, nil, false]
175
186
 
176
187
  wrong_types.each do |wrong_type|
177
188
  [:upload_file, :download_file_list].each do |command|
@@ -361,7 +372,7 @@ class ClientTest < ActiveSupport::TestCase
361
372
 
362
373
  test "response should be invalid on savon exception" do
363
374
  # Create an observer to fake sending requests to bank
364
- observer = Class.new {
375
+ observer = Class.new do
365
376
  def notify(operation_name, builder, globals, locals)
366
377
  @operation_name = operation_name
367
378
  @builder = builder
@@ -369,7 +380,7 @@ class ClientTest < ActiveSupport::TestCase
369
380
  @locals = locals
370
381
  HTTPI::Response.new(500, {}, 'THE ERROR!')
371
382
  end
372
- }.new
383
+ end.new
373
384
 
374
385
  Savon.observers << observer
375
386
 
@@ -425,4 +436,19 @@ class ClientTest < ActiveSupport::TestCase
425
436
  refute client.valid?
426
437
  refute_empty client.errors.messages
427
438
  end
439
+
440
+ test 'savon options can be passed to client and accessed' do
441
+ client = Sepa::Client.new(@nordea_get_certificate_params)
442
+
443
+ assert client.respond_to?(:savon_options)
444
+ assert client.respond_to?(:savon_options=)
445
+
446
+ client.savon_options = {
447
+ globals: {
448
+ ssl_verify_mode: :none,
449
+ },
450
+ }
451
+
452
+ assert_nothing_raised { client.send_request }
453
+ end
428
454
  end