Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Policy: Camel proxy #1193

Merged
merged 1 commit into from
Jun 22, 2020
Merged

Policy: Camel proxy #1193

merged 1 commit into from
Jun 22, 2020

Conversation

eloycoto
Copy link
Contributor

@eloycoto eloycoto commented Jun 5, 2020

Camel netty proxy was used via http-proxy policy, but on TLS
connections, the CONNECT method[0] is not allowed, so the request needs
to be terminated by camel-proxy and send to the upstream API.

With this change, we duplicate the http-proxy and we set the proxy to
terminate the connection so that will work correctly on camel TLS
connections.

[0] https://www.ietf.org/rfc/rfc2817.txt
Fix THREESCALE-4867

Signed-off-by: Eloy Coto eloy.coto@acalustra.com

@eloycoto eloycoto requested a review from a team as a code owner June 5, 2020 15:06

__DATA__

=== TEST 1: API backend connection uses proxy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this say "http proxy" to differentiate it from the other 2 tests?

@@ -0,0 +1,77 @@
# Camel proxy policy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is the best name for the policy. There's nothing camel-specific, it's valid for any proxy, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TLS is only for camel (With termination) and the policy name is suggested to be like that:
https://issues.redhat.com/browse/THREESCALE-4867


require("http_proxy.pl");

repeat_each(3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 3 times?


function _M:export()
return {
get_http_proxy = function(uri)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be good to document here who expects this function to be in the context.

Camel netty proxy was used via http-proxy policy, but on TLS
connections, the CONNECT method[0] is not allowed, so the request needs
to be terminated by camel-proxy and send to the upstream API.

With this change, we duplicate the http-proxy and we set the proxy to
terminate the connection so that will work correctly on camel TLS
connections.

[0] https://www.ietf.org/rfc/rfc2817.txt
Fix THREESCALE-4867

Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
@eloycoto eloycoto merged commit 84f768b into 3scale:master Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants