Skip to content
New issue

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

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

Already on GitHub? # to your account

Stub server ignores --insecure-tls #75

Open
serandel opened this issue Feb 21, 2025 · 0 comments
Open

Stub server ignores --insecure-tls #75

serandel opened this issue Feb 21, 2025 · 0 comments

Comments

@serandel
Copy link

serandel commented Feb 21, 2025

Hi, I'm trying to use the Pact stub server as follows:

❯ docker run -t -p 38080:38080 --rm pactfoundation/pact-stub-server --insecure-tls --broker-url https://my-pact-broker.com --user pact_admin:password --loglevel debug --provider-name my-provider --consumer-name my-consumer

But I get the following error:

2025-02-21T17:01:49.668174Z DEBUG main pact_stub_server: Loading all pacts from Pact Broker at https://my-pact-broker.com using User(pact_admin, pass*******) authentication
2025-02-21T17:01:49.668466Z  INFO main pact_verifier::pact_broker: Fetching path '/' from pact broker
2025-02-21T17:01:49.668799Z DEBUG tokio-runtime-worker hyper::client::connect::dns: resolving host="pact-broker.internal.dev.euwest.azure.bestsecrettec.com"
2025-02-21T17:01:50.670714Z DEBUG                 main hyper::client::connect::http: connecting to 10.252.21.210:443
2025-02-21T17:01:50.726462Z DEBUG                 main hyper::client::connect::http: connected to 10.252.21.210:443
2025-02-21T17:01:50.783165Z ERROR                 main pact_stub_server: There were errors loading the pact files.
2025-02-21T17:01:50.783182Z ERROR                 main pact_stub_server:   - IO Error - Failed to access pact broker path '/' - error sending request for url (https://my-pact-broker.com/): error trying to connect: invalid peer certificate: UnknownIssuer. URL: 'https://my-pact-broker.com'
Error: ExitCode(unix_exit_status(3))

This is because my SSL certificate in the broker comes from Let's Encrypt. But I've specified --insecure-tls, so I would expect this verification to be skipped!

I've made a workaround by also mounting the root certs from my machine (-v /etc/ssl/certs:/etc/ssl/certs:ro) and it works, so I'm quite sure this is the only issue here.

Am I missing something or is this flag just broken?

Thanks for the help!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant