-
Notifications
You must be signed in to change notification settings - Fork 910
Netty client support for authorized proxy #2517
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
Netty client support for authorized proxy #2517
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2517 +/- ##
=========================================
Coverage 77.74% 77.74%
Complexity 365 365
=========================================
Files 1248 1248
Lines 39543 39563 +20
Branches 3097 3098 +1
=========================================
+ Hits 30741 30760 +19
Misses 7315 7315
- Partials 1487 1488 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@dagnir First of all, sorry for disturb, but I have opened this pull request a week ago and I didn't have any feedback about it. Could you review it? Or give me any gap of time to be reviewed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made some comments in an initial review.
...netty-nio-client/src/main/java/software/amazon/awssdk/http/nio/netty/ProxyConfiguration.java
Show resolved
Hide resolved
...netty-nio-client/src/main/java/software/amazon/awssdk/http/nio/netty/ProxyConfiguration.java
Show resolved
Hide resolved
...netty-nio-client/src/main/java/software/amazon/awssdk/http/nio/netty/ProxyConfiguration.java
Outdated
Show resolved
Hide resolved
...netty-nio-client/src/main/java/software/amazon/awssdk/http/nio/netty/ProxyConfiguration.java
Show resolved
Hide resolved
...c/test/java/software/amazon/awssdk/http/nio/netty/internal/AwaitCloseChannelPoolMapTest.java
Outdated
Show resolved
Hide resolved
...src/test/java/software/amazon/awssdk/http/nio/netty/internal/ProxyTunnelInitHandlerTest.java
Outdated
Show resolved
Hide resolved
...netty-nio-client/src/main/java/software/amazon/awssdk/http/nio/netty/ProxyConfiguration.java
Outdated
Show resolved
Hide resolved
...netty-nio-client/src/main/java/software/amazon/awssdk/http/nio/netty/ProxyConfiguration.java
Outdated
Show resolved
Hide resolved
...src/test/java/software/amazon/awssdk/http/nio/netty/internal/ProxyTunnelInitHandlerTest.java
Outdated
Show resolved
Hide resolved
…guillepb10/aws-sdk-java-v2 into feature/support-proxy-with-auth
Hi @debora-ito , I think I have already solved your comments |
SonarCloud Quality Gate failed. |
"category": "AWS SDK for Java v2", | ||
"contributor": "guillepb10", | ||
"type": "feature", | ||
"description": "Add support for autheticated corporate proxies" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
autheticated
-> authenticated
@@ -120,7 +134,8 @@ private void setupChannel(Channel ch, Promise<Channel> acquirePromise) { | |||
if (sslHandler != null) { | |||
ch.pipeline().addLast(sslHandler); | |||
} | |||
ch.pipeline().addLast(initHandlerSupplier.newInitHandler(delegate, remoteAddress, tunnelEstablishedPromise)); | |||
ch.pipeline().addLast(initHandlerSupplier.newInitHandler(delegate, this.proxyUser, this.proxyPassword, remoteAddress, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against using this
but this module should be consistent in its usage of class members and currently this
isn't used widely, so let's remove it for readability.
@guillepb10 Thanks for submitting the PR, and sorry it took a while for us to fully review it. I only had some minor comments. |
… into feature/support-proxy-with-auth
Thank you for your feedback @cenedhryn. I've just updated the PR with your comments. |
SonarCloud Quality Gate failed. |
@all-contributors please add @guillepb10 for code. |
I've put up a pull request to add @guillepb10! 🎉 |
Description
This change able the use of a secured corporate proxy to communicate with aws, into the netty async client.
Motivation and Context
So many corporations used a proxy to connect to internet. Besides this corporate usually needs a basic autentication to connect to the proxy. Until nowadays, it was impossible to used a secured coroporate proxy with netty client, couse it did not support to specify the user and password required to connect to proxy. This change makes it possible.
Testing
It has been compleated unit testing of the library to ensure the purpose of the change it is successfully met.
Besides, I have tested the change with a personal project, where I try to connect to CloudWatchLogs api behind a coporate proxy, and it succeeded.
As cloud bee shown this is a very little change, that only affect to netty-nio-client. So it must not break the current work of the client.
Types of changes
Checklist
mvn install
succeedsLicense