Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Options object for signer.computeSignature #1066

Merged

Conversation

LorneCurrie
Copy link
Contributor

@LorneCurrie LorneCurrie commented May 15, 2019

Locked the XML-Crypto to 1.2.0
updated the readme with details about options for WSSecurityCert function
Added the signer Options to the WSSecurityCerts OPtions to be used in xml-crypto. Helps with a breaking change in 1.4.0. Detail about change below.

XML-crypto 1.4.0, would add the xmlns xmlns:wsse="" to the <wsse:SecurityTokenReference xmlns:wsse=""> when the signer.computeSignature function was called.
This was different behaviour to the version (1.2.0) locked in the project.
When Node-Soap was imported into my project, the version of XML-crypto that was set using the hat ^ would pick the latest minor version release, which had different behaviour.

Other option for the fix would be to lock the version fo xml-crypto to 1.2.0 minor range

Pull request: 1067 is another option that would fix this option and is less evasive.

XML before the change:

    <KeyInfo>
        <wsse:SecurityTokenReference xmlns:wsse="">
          <wsse:Reference URI="#x509-35f93d1596fa461cb092cc0014197dcd" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
        </wsse:SecurityTokenReference>
      </KeyInfo>

After the change

      <KeyInfo>
        <wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
          <wsse:Reference URI="#x509-35f93d1596fa461cb092cc0014197dcd" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
        </wsse:SecurityTokenReference>
      </KeyInfo>

XML-crypto vers 1.4.0 broke the WSSecuriityCert functionality
Added the optons needed to correctly add the headers
@coveralls
Copy link

coveralls commented May 15, 2019

Coverage Status

Coverage increased (+1.08%) to 94.459% when pulling 8820e15 on LorneCurrie:add-signer-options-to-wssecuritycert into f490068 on vpulim:master.

@LorneCurrie LorneCurrie mentioned this pull request May 15, 2019
Lorne Currie added 2 commits May 15, 2019 14:57
Updated the Reademe with options details for WSSecurityCert
Reverted the Tests
Locked XML-crypto to version ~1.2.0
Reverted the Package-lock.json file
Reworked the signerOptions to be park of the WSS options.
@jsdevel
Copy link
Collaborator

jsdevel commented May 16, 2019

@LorneCurrie please update your git config so we can properly track you in git history later on.

also, please add a test

@holmmi
Copy link

holmmi commented Jul 16, 2019

I'm using version 0.28.0 from node-soap and I'm facing this error. When the fix will be released?

@jsdevel
Copy link
Collaborator

jsdevel commented Jul 16, 2019

@holmmikael when tests are added. if you'd like to copy this effort and add tests in your own pr feel free, otherwise you'll need to reach out to @LorneCurrie and ask him to add tests.

@LorneCurrie
Copy link
Contributor Author

Sorry, I have been caught up on some things. I'll update the tests this weekend

Simplied the XML SignerOpetions to only include the attribute that is currently causing the issues
Added tests
Updated Readme.
@LorneCurrie
Copy link
Contributor Author

Tests added

@jsdevel jsdevel merged commit 48d0e01 into vpulim:master Jul 20, 2019
@jsdevel
Copy link
Collaborator

jsdevel commented Jul 20, 2019

Thank you!

Danail-Irinkov pushed a commit to Danail-Irinkov/node-soap that referenced this pull request Jan 19, 2020
* Added Options object for signer.computeSignature

XML-crypto vers 1.4.0 broke the WSSecuriityCert functionality
Added the optons needed to correctly add the headers

* Fixed a linting issues

* Small changes

Updated the Reademe with options details for WSSecurityCert
Reverted the Tests
Locked XML-crypto to version ~1.2.0
Reverted the Package-lock.json file
Reworked the signerOptions to be park of the WSS options.

* Added tests

Simplied the XML SignerOpetions to only include the attribute that is currently causing the issues
Added tests
Updated Readme.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants