Comments (6)
Do you have browser proxying enabled? If so, then unfortunately it's not possible to do https proxying.
from wiremock.
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.
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.
Uh, I didn't know how the communication between browser and proxy works in case of HTTPS. That explains a lot, thanks.
from wiremock.
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.
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)
- Update org.xmlutil:xmlunit-core to Version 2.10.0 HOT 2
- Introduce a GUI for open source HOT 1
- NPE on WireMockServer.getServeEvents when using a StubRequestFilter HOT 1
- Adding more jettyAcceptors seems to do nothing besides cause thread contention. HOT 1
- align new join handlebar helper with features present in the join provided in the library, but not covered yet
- Expose args in Options so extensions can read it
- Possible memory leak ? HOT 15
- Prevent creating multiple stub mappings with the same ID HOT 1
- Support virtual threads in Jetty server for standalone deploy
- Error when proxying to a host that is only accessible via IPv6 HOT 1
- Formatted dates not in UTC
- __files created by default since v3.6.0 HOT 1
- absent operand must be a non-null string
- Array and data manipulation in handlebars template when using docker
- FileItemPartAdapter returning multipart's field name instead of a filename
- Avoiding reading zipfile entries repeatedly in ClasspathFileSource
- Support disabled state for stub mappings HOT 1
- Add a unique id to the template request model
- Add self-description callback(s) to MatchResult for use in Diff
- Report webhook errors and results as sub-events
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wiremock.