Skip to content

Latest commit

 

History

History
47 lines (39 loc) · 3.04 KB

CHANGELOG.md

File metadata and controls

47 lines (39 loc) · 3.04 KB

Changelog for morpheus-med/saml2 fork

Our fork adds support for AD FS and other additions for Arterys IDP integration.

List of changes

Problem

xml-crypto versions earlier than 5.0 throws an error on valid signed xml produced by an AD FS server (fails test 'accepts signed AD FS 2019 xml'):

Error: error:068000A8:asn1 encoding routines::wrong tag
      at Verify.verify (node:internal/crypto/sig:230:24)
      at RSASHA256.verifySignature (node_modules/xml-crypto/lib/signed-xml.js:116:24)
      at SignedXml.validateSignatureValue (node_modules/xml-crypto/lib/signed-xml.js:442:20)

Changes

  1. Update xml-crypto to latest 5.0 release
  2. xml-crypto no longer exports xpath, so we add it as a dependency and its call signature changes from xpath(doc, xpath) to xpath.select(xpath, doc)

Also addresses the following xml-crypto 5.0 breaking changes https://github.com/node-saml/xml-crypto/blob/master/CHANGELOG.md

  • [documentation] [breaking-change] Expand the options, move idmode into options, fix types #323
  • [documentation] [breaking-change] Remove default for transformation algorithm #410
  • [breaking-change] Remove default for signature algorithm #408
  • [breaking-change] Remove default for digest algorithm #406
  • [breaking-change] Remove default canonicalization algorithm #405
  • [breaking-change] Rename signingCert -> publicCert and signingKey -> privateKey #315
  • [semver-major] [breaking-change] Add support for in ; remove KeyInfoProvider #301
  • 5.0.0 [chore] Improve and simplify validation logic #373, node-saml/xml-crypto#373 Now throws instead of just returning null on Error: invalid signature: the signature value ${this.signatureValue} is incorrect

With:

  1. Replace new SignedXML null, options with new SignedXML options
  2. Add default digestAlgorithm, signatureAlgorithm, and transformationAlgorithm, canonicalizationAlgorithm
  3. sig.keyInfoProvider = getKey: -> format_pem(certificate, 'CERTIFICATE') becomes sig.publicCert = format_pem(certificate, 'CERTIFICATE')
  4. Wrap sig.checkSignatureValue in try/catch