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

BadSignature error when approaching broker on HTTPS #1219

Open
3 of 5 tasks
orenhan opened this issue Jun 4, 2024 · 5 comments
Open
3 of 5 tasks

BadSignature error when approaching broker on HTTPS #1219

orenhan opened this issue Jun 4, 2024 · 5 comments
Labels
bug Indicates an unexpected problem or unintended behavior triage This issue is yet to be triaged by a maintainer upstream Indicates that an issue relates to an upstream problem (such as in pact-reference)

Comments

@orenhan
Copy link

orenhan commented Jun 4, 2024

Software versions

  • OS: Windows 10 enterprise
  • Consumer Pact library: Pact JS v12.3.0_
  • Provider Pact library: Pact JS v12.3.0_
  • Node Version: 20.10.0

Issue Checklist

Please confirm the following:

  • I have upgraded to the latest
  • I have the read the FAQs in the Readme
  • I have triple checked, that there are no unhandled promises in my code and have read the section on intermittent test failures
  • I have set my log level to debug and attached a log file showing the complete request/response cycle
  • For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem

I work on a private network and cannot attach logs or code examples

Expected behaviour

setting disableSslVerifications: true will fix BadSignature error when broker is on https

Actual behaviour

setting disableSslVerifications: true didn't have an effect

Steps to reproduce

deploy pact broker with https endpoint
publish contract from consumer
try to verify pacts from provider running locally

Hi :)
I'm using PactJs version 12.3.0, and have a pact broker deployed on openshift.
on the consumer part - everything works well. contract are published correctly through the cicd pipeline.
on the provider part - I created a unit test with jest for verifying contracts using Verifier. I keep getting an error:
Failed to load pact - No pacts found under provider 'provider' matching the given consumer version selectors in pact broker 'https://pact.broker': IO Error - Failed to access pact broker path '/' - error sending request for url (https://pact.broker/): error trying to connect: invalid peer certificate: BadSignature. URL: 'https://pact.broker'
certificate is indeed invalid, but I just want to disable ssl verification. In the consumer cicd I used PACT_DISABLE_SSL_VERIFICATION and it worked, but with the Verifier it looks like disableSslVerification has no impact.

I will mention again - I work on a private network and cannot attach log or code files, I can copy specific things. sorry for that :(

Thanks!

@orenhan orenhan added bug Indicates an unexpected problem or unintended behavior triage This issue is yet to be triaged by a maintainer labels Jun 4, 2024
@orenhan
Copy link
Author

orenhan commented Jun 4, 2024

also tried using validateSsl, didn't change anything

@orenhan orenhan changed the title disable ssl verification fo Verifier BadSignature error when approaching broker on HTTPS Jun 4, 2024
@mefellows
Copy link
Member

I think this might be related to pact-foundation/pact-reference#387

@mefellows mefellows added the upstream Indicates that an issue relates to an upstream problem (such as in pact-reference) label Jun 4, 2024
@orenhan
Copy link
Author

orenhan commented Jun 5, 2024

I have now fixed my certificate, its valid, yet the same error occurs

@mefellows
Copy link
Member

Are you getting the same error or a different one? If the certificate is valid, it shouldn't be erroring obviously. Can you share the certificate here for review?

@orenhan
Copy link
Author

orenhan commented Jun 13, 2024

I cant share my certificate because I work on a private network and exporting files from it is a long process, anything specific about the certificate that can help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior triage This issue is yet to be triaged by a maintainer upstream Indicates that an issue relates to an upstream problem (such as in pact-reference)
Projects
None yet
Development

No branches or pull requests

2 participants