Georgios Andrianakis
Independent Contractor
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-%3Dc4iVw_izTGYjV3TOPsjefAzQ%2BKr06TVO3b6EO-7kzZQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/9B7BD5C5-887A-41B5-A14D-BF9EB5CF0FFB%40redhat.com.
cool stuff - reminds me of https://httptoolkit.com/ ; but just only for resteasy client.
My main questions are security concerned - as this is effectively disabling or rather circumventing https.
this is devtime only, right? so no way by accidentally expose it in prod?
is it intended to be something you enable per restclient and not just globally?
also...would it make more sense to have the proxy devservice something that is part of vertx extension and then
any http based client (even raw vert.x) can reroute? i.e. why need for special restclient reactive setup?
/max
cool stuff - reminds me of https://httptoolkit.com/ ; but just only for resteasy client.
My main questions are security concerned - as this is effectively disabling or rather circumventing https.
this is devtime only, right? so no way by accidentally expose it in prod?
is it intended to be something you enable per restclient and not just globally?
also...would it make more sense to have the proxy devservice something that is part of vertx extension and then
any http based client (even raw vert.x) can reroute? i.e. why need for special restclient reactive setup?
/max
On 10 Jul 2024, at 9:33, Georgios Andrianakis wrote:
--Hi folks,I wanted to share a demo of a little something I did.With a few changes to the Quarkus REST Client, my change allows Quarkus to automatically start an HTTP proxy which is used for all the calls for that REST Client.The reason I did this was that I wanted to capture network traffic between a Quarkus application and a downstream service that was using HTTPS - doing this under normal circumstances requires some heroics, however if we insert a proxy in the middle, the capture is trivial, as shown in the video.Take a look if you are interested and let me know if you think this is something that makes sense to have or if you think of other use cases where this approach could be beneficial.Thanks
--
Georgios Andrianakis
Independent Contractor
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-%3Dc4iVw_izTGYjV3TOPsjefAzQ%2BKr06TVO3b6EO-7kzZQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAOaD6kL_O82ZQB3JCks%3DDooEXLCH17Rj0_inv7%3DXcS6SoR62Xg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-k3Dvg6GX5n9a70aNuS9HMxk%3DNN87vr%3DyUyaVoUwiXgwA%40mail.gmail.com.
Cool stuff Georgios!
I assume this can't be a Quarkiverse extension because it requires access to the REST Client setup code. Correct?
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CACiEr_Qq8MLgWwMnkm_6qF3x_aYGTmVcZTkjYZRWSwvuWBBkdA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/182bbad6-273f-44da-9364-60895cff67b1n%40googlegroups.com.
That's an interesting question. I can probably split this up some more so that the foundational parts are in the quarkus-rest-client extension but allowing for Quarkiverse extensions to hook into this feature and implement their own proxy
That's an interesting question. I can probably split this up some more so that the foundational parts are in the quarkus-rest-client extension but allowing for Quarkiverse extensions to hook into this feature and implement their own proxy+1 for this, it would be a sweet little capability to offer to extensions.
toxiproxy usecase could be done at vert.x http level could it not?
I'm still blind to why this has to be defined at restclient level ;)
/max
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-nCyYfuJVCeb0tFHVoLYXN0faopgGUgVUrp_BjnQfVHdA%40mail.gmail.com.
On Wed, Jul 10, 2024 at 1:38 PM Max Rydahl Andersen <mand...@redhat.com> wrote:cool stuff - reminds me of https://httptoolkit.com/ ; but just only for resteasy client.
My main questions are security concerned - as this is effectively disabling or rather circumventing https.
For what I had in mind, that's the whole point
this is devtime only, right? so no way by accidentally expose it in prod?
No way to enable it in prodis it intended to be something you enable per restclient and not just globally?
Per clientalso...would it make more sense to have the proxy devservice something that is part of vertx extension and then
any http based client (even raw vert.x) can reroute? i.e. why need for special restclient reactive setup?The problem is that with anything not managed (Vertx HTTP Client, JDK HTTP Client, Jakarta REST Client) you don't know what the URL is.With the REST Client you already have all the information available to make this a one flag opt-in process
--/max
On 10 Jul 2024, at 9:33, Georgios Andrianakis wrote:
--Hi folks,I wanted to share a demo of a little something I did.With a few changes to the Quarkus REST Client, my change allows Quarkus to automatically start an HTTP proxy which is used for all the calls for that REST Client.The reason I did this was that I wanted to capture network traffic between a Quarkus application and a downstream service that was using HTTPS - doing this under normal circumstances requires some heroics, however if we insert a proxy in the middle, the capture is trivial, as shown in the video.Take a look if you are interested and let me know if you think this is something that makes sense to have or if you think of other use cases where this approach could be beneficial.Thanks
--
Georgios Andrianakis
Independent Contractor
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-%3Dc4iVw_izTGYjV3TOPsjefAzQ%2BKr06TVO3b6EO-7kzZQ%40mail.gmail.com.
--Georgios Andrianakis
Independent Contractor
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-m00%2BsHvPK4oBUEiJid7PZ4XhQ5ydvORtPEDZS00WNZCA%40mail.gmail.com.
Hey GeorgiosOn Wed, Jul 10, 2024 at 11:43 AM Georgios Andrianakis <gand...@redhat.com> wrote:On Wed, Jul 10, 2024 at 1:38 PM Max Rydahl Andersen <mand...@redhat.com> wrote:cool stuff - reminds me of https://httptoolkit.com/ ; but just only for resteasy client.
My main questions are security concerned - as this is effectively disabling or rather circumventing https.
For what I had in mind, that's the whole pointThis is a localhost server which acts as a proxy, right ? But it may make sense to harden it a little bit and enforce the same CORS policy that the DevUI server does, that 3rd party origin requests to it get blocked, only requests made from local host to it are allowed. It can mitigate some concerns, as otherwise, even if it is an opt-in, once it is enabled, there is a window on the local host into what is meant to be a secure HTTPS target, and then it is not too hard to imagine situations, even if somewhat theoretical, that one downloads some advanced Wireshark from not the main Wireshark site, which will do something bad when tracing etc. A copy and paste of https://github.com/quarkusio/quarkus/blob/main/extensions/vertx-http/runtime/src/main/java/io/quarkus/devui/runtime/LocalHostOnlyFilter.java at some point can put a lot of concerns to bed.this is devtime only, right? so no way by accidentally expose it in prod?
No way to enable it in prodis it intended to be something you enable per restclient and not just globally?
Per clientalso...would it make more sense to have the proxy devservice something that is part of vertx extension and then
any http based client (even raw vert.x) can reroute? i.e. why need for special restclient reactive setup?The problem is that with anything not managed (Vertx HTTP Client, JDK HTTP Client, Jakarta REST Client) you don't know what the URL is.With the REST Client you already have all the information available to make this a one flag opt-in processHopefully, once you enable an SPI into it, extensions which use Vert.x WebClient can tap into it, like others said, it would be great, I can think of a few extensions which may benefit :-)
On Thu, Jul 11, 2024 at 3:28 PM Sergey Beryozkin <sbia...@redhat.com> wrote:Hey GeorgiosOn Wed, Jul 10, 2024 at 11:43 AM Georgios Andrianakis <gand...@redhat.com> wrote:On Wed, Jul 10, 2024 at 1:38 PM Max Rydahl Andersen <mand...@redhat.com> wrote:cool stuff - reminds me of https://httptoolkit.com/ ; but just only for resteasy client.
My main questions are security concerned - as this is effectively disabling or rather circumventing https.
For what I had in mind, that's the whole pointThis is a localhost server which acts as a proxy, right ? But it may make sense to harden it a little bit and enforce the same CORS policy that the DevUI server does, that 3rd party origin requests to it get blocked, only requests made from local host to it are allowed. It can mitigate some concerns, as otherwise, even if it is an opt-in, once it is enabled, there is a window on the local host into what is meant to be a secure HTTPS target, and then it is not too hard to imagine situations, even if somewhat theoretical, that one downloads some advanced Wireshark from not the main Wireshark site, which will do something bad when tracing etc. A copy and paste of https://github.com/quarkusio/quarkus/blob/main/extensions/vertx-http/runtime/src/main/java/io/quarkus/devui/runtime/LocalHostOnlyFilter.java at some point can put a lot of concerns to bed.this is devtime only, right? so no way by accidentally expose it in prod?
No way to enable it in prodis it intended to be something you enable per restclient and not just globally?
Per clientalso...would it make more sense to have the proxy devservice something that is part of vertx extension and then
any http based client (even raw vert.x) can reroute? i.e. why need for special restclient reactive setup?The problem is that with anything not managed (Vertx HTTP Client, JDK HTTP Client, Jakarta REST Client) you don't know what the URL is.With the REST Client you already have all the information available to make this a one flag opt-in processHopefully, once you enable an SPI into it, extensions which use Vert.x WebClient can tap into it, like others said, it would be great, I can think of a few extensions which may benefit :-)This is very unlikely to happen as I mentioned to Max
On Thu, Jul 11, 2024 at 1:29 PM Georgios Andrianakis <gand...@redhat.com> wrote:On Thu, Jul 11, 2024 at 3:28 PM Sergey Beryozkin <sbia...@redhat.com> wrote:Hey GeorgiosOn Wed, Jul 10, 2024 at 11:43 AM Georgios Andrianakis <gand...@redhat.com> wrote:On Wed, Jul 10, 2024 at 1:38 PM Max Rydahl Andersen <mand...@redhat.com> wrote:cool stuff - reminds me of https://httptoolkit.com/ ; but just only for resteasy client.
My main questions are security concerned - as this is effectively disabling or rather circumventing https.
For what I had in mind, that's the whole pointThis is a localhost server which acts as a proxy, right ? But it may make sense to harden it a little bit and enforce the same CORS policy that the DevUI server does, that 3rd party origin requests to it get blocked, only requests made from local host to it are allowed. It can mitigate some concerns, as otherwise, even if it is an opt-in, once it is enabled, there is a window on the local host into what is meant to be a secure HTTPS target, and then it is not too hard to imagine situations, even if somewhat theoretical, that one downloads some advanced Wireshark from not the main Wireshark site, which will do something bad when tracing etc. A copy and paste of https://github.com/quarkusio/quarkus/blob/main/extensions/vertx-http/runtime/src/main/java/io/quarkus/devui/runtime/LocalHostOnlyFilter.java at some point can put a lot of concerns to bed.this is devtime only, right? so no way by accidentally expose it in prod?
No way to enable it in prodis it intended to be something you enable per restclient and not just globally?
Per clientalso...would it make more sense to have the proxy devservice something that is part of vertx extension and then
any http based client (even raw vert.x) can reroute? i.e. why need for special restclient reactive setup?The problem is that with anything not managed (Vertx HTTP Client, JDK HTTP Client, Jakarta REST Client) you don't know what the URL is.With the REST Client you already have all the information available to make this a one flag opt-in processHopefully, once you enable an SPI into it, extensions which use Vert.x WebClient can tap into it, like others said, it would be great, I can think of a few extensions which may benefit :-)This is very unlikely to happen as I mentioned to MaxI was thinking about SPI providing a full target URL, etc. But I guess I don't appreciate the whole complexity involved into it 🙂
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-%3Dc4iVw_izTGYjV3TOPsjefAzQ%2BKr06TVO3b6EO-7kzZQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAKU9E9udEy6M%3DyXq7_z4BbuAdZJ_JiJj7W8Yxq-2ZE-q0mO%2BQg%40mail.gmail.com.
This looks great, but if the use-case is really to be able to see traffic, and given that I find wireshark confusing and complex, I am not sure this is the best way to do it.A while ago I filed https://github.com/quarkusio/quarkus/issues/22213 and I still think that I'd prefer if a single config property would allow me to dump every http request (client and server) to a text file. Or, frankly, better yet, to some place in the DEV UI that looked like the browser's dev tools' Network panel.
It could be done via your proxy, or via hooking up to Vert.x to dump traffic. I suppose it doesn't really matter how we obtain the traffic, but IMO what's important is how we present it to users. And I get confused by wireshark every single time. Mostly because the request and response are in different places, and there's always protocols I do not care about.Not to mention that it'd be even more amazing if we could log other kinds of traffic, such as SQL requests/responses, or graphql, or protobuf, in the same place using the same UI. Now, _that_ is something that would be jaw-dropping for demos.
On Wed, 10 Jul 2024 at 09:33, Georgios Andrianakis <gand...@redhat.com> wrote:--Hi folks,I wanted to share a demo of a little something I did.With a few changes to the Quarkus REST Client, my change allows Quarkus to automatically start an HTTP proxy which is used for all the calls for that REST Client.The reason I did this was that I wanted to capture network traffic between a Quarkus application and a downstream service that was using HTTPS - doing this under normal circumstances requires some heroics, however if we insert a proxy in the middle, the capture is trivial, as shown in the video.Take a look if you are interested and let me know if you think this is something that makes sense to have or if you think of other use cases where this approach could be beneficial.Thanks
--Georgios Andrianakis
Independent Contractor
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALeTM-%3Dc4iVw_izTGYjV3TOPsjefAzQ%2BKr06TVO3b6EO-7kzZQ%40mail.gmail.com.
--Stéphane Épardaud
Is this something that's already captured by traces or could be if they were enabled? If so, could we build on that to give users the nice view you propose?
This is not the same thing - this is for the client which is talking to other services
If Vert.x provides TCP proxy, we could stand it up and hook it into other managed clients