GithubHelp home page GithubHelp logo

Comments (6)

tomakehurst avatar tomakehurst commented on July 19, 2024

Do you have browser proxying enabled? If so, then unfortunately it's not possible to do https proxying.

from wiremock.

SvenSchindler avatar SvenSchindler commented on July 19, 2024

Thank you very much for your fast response. Actually we do have browser proxying enabled. We are trying to mock some request caused by webdriver running firefox. I'm not an HTTPS/SSL/TLS expert so this question may sound stupid but isn't it possible (or can it be implemented) to let wiremock run as an HTTPS proxy like squid so that it has an own key pair and basically simulates an HTTPS server? Then wire mock would be able to decrypt the requests and can even mock some of the requests. This should work for unverified requests, right? Thanks again.

from wiremock.

tomakehurst avatar tomakehurst commented on July 19, 2024

You can set wiremock up to transparently proxy, either by adding a proxy mapping or starting it with --proxy-all. That way you'll have separately encrypted conversations between your client-> wiremock and wiremock->backend. The reason browser proxying doesn't work is that the browser tries to use the CONNECT method, which doesn't involve decryption.

from wiremock.

SvenSchindler avatar SvenSchindler commented on July 19, 2024

Uh, I didn't know how the communication between browser and proxy works in case of HTTPS. That explains a lot, thanks.

from wiremock.

fengverson avatar fengverson commented on July 19, 2024

Hi tomakehurst,

I am planning to migrate betamax to wiremock for record and replay purpose. Betamax basically plays as middle man between client and service however, it doesn't have support for https proxying. I realized wiremock didn't solve this problem directly as well. Instead wiremock create separate conversation between client -> wiremock and wiremock -> service. so my question is that when you create wiremock, the reason you design this way is to avoid https proxying issue? I am not familiar with HTTPS. Is this the only way to solve https record and replay issue?

Thanks,

from wiremock.

tomakehurst avatar tomakehurst commented on July 19, 2024

Unfortunately, the decrypt + re-encrypt approach is the only viable option for HTTPS, the reason being that WireMock needs to see the contents of the request in order to decide what to do with it.

Some proxy servers are able to act as pass-through HTTPS proxies, but they do this via the CONNECT HTTP method, which essentially turns them into TCP proxies (which means they don't need to see the request's contents, just the target IP address).

from wiremock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.