pact-foundation / pact-stub-server

Standalone pact stub server
MIT License
75 stars 19 forks source link

pact-stub-server running with HTTPS #27

Closed mstefan7 closed 5 years ago

mstefan7 commented 5 years ago

Hi,

I'm trying to make our infrastructure more secure and so decided to use HTTPS. I successfully did that for Pact Broker, however now I'm having issues with pact-stub-server now.

Can pact-stub-server run in Docker and use https?

Thanks for the whole framework, it turned to be extremely helpful in our environment! Martin

uglyog commented 5 years ago

It can run in Docker and use HTTPS. It just needs to be updated to allow the self-signed certificate to be trusted.

uglyog commented 5 years ago

Just to clarify what you are asking (as you changed the issue title), do you need to fetch pacts from a server using a self-signed cert, or are you asking about running the stub server using TLS and a self-signed cert?

mstefan7 commented 5 years ago

I've updated the title, because while writing the description of my query, I've realized couple of things that made it easier :) So what you did - the flag, was what I was asking about.

In AWS environment I was able to run the pact-stub in docker container with nginx as reverse proxy similar way as pact-broker, using very similar headers. And since pact-stub reaches to pact-broker via Load Balancer, the self-signed cert is not an issue in our "production" environment. The Flag to ignore the self-signed cert warnings is very handy in local dev environment though. Thanks a lot!