I need to consume a 3rd party SOAP webservice from a Rails 5 app running Ruby 2.3.x. The SOAP webservice requires the use of XML signatures and XML encryption on all requests/responses.
There appear to be adequate ruby gems that add XML signatures to SOAP requests (e.g. Savon with the Akami gem). However, i can't find anything that will transparently handle XML encryption of SOAP requests and decryption of SOAP responses. There are a few gems that work with XML encryption to various degrees.
The xmlsec gem, a nokogiri extension, claims to support XML-Enc and XML-Sig but hasn't been updated in 4 years. The xmlenc gem only supports decryption at this time. The few gems I have found that implement specs with encrypted XML, like the ruby-saml gem, only have to deal with decryption and have hand rolled their solution. Moreover, the XML-enc metadata that needs to be injected into the XML document is substantively different between SOAP and SAML.
Like XML-Sig, the XML-Enc spec is more far reaching than just encrypting the contents of an XML element with a private key. There is a lot of additional metadata that must be injected into the XML doc that complicates the implementation and facilitates document exchange.
Before i spend a few days walking down dead ends ... I was wondering if someone could point me in the right direction.