You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should be able to set the source IP address and source port when creating the client using an optional parameter, in the same manner as urllib3.
E.g.
session.create_client('ec2', source_address=None)) # Default value for parameter, allow random port and default IP address
session.create_client('ec2', source_address=('10.10.10.10', 0)) # Use address 10.10.10.10, allow randomly selected port
session.create_client('ec2', source_address=('', 1234)) # Use default address, set source port as 1234
session.create_client('ec2', source_address=('10.10.10.10', 1234)) # Use address 10.10.10.10, set source port as 1234
Use Case
As the endpoint IP address for requests is not static, local firewall rules on the machine need to allow traffic from port 443 to make requests. For some business use cases this unacceptable. Allowing to set source address and port allows greater granularity to the firewall rules.
Proposed Solution
The source_address parameter should be set in pool_manager_kwargs in URLLib3Session, for it to work with urllib3
Add the optional parameter into to Session.create_client() with default set as None (which will continue current behavior). Pass that value all the way through until create the URLLib3Session and it gets added to pool_manager_kwargs,
Hi @jmulcock-rbbn thanks for the feature request. I brought this up for discussion with the team and it’s something that may be considered at a future date. We suggest others who are also interested in this feature to 👍 the issue or leave additional feedback in the comments. And if there’s anything else you want to expand on or clarify regarding your use case please let us know.
Hi @tim-finnigan@jmulcock-rbbn, I've opened up a PR that adds support to specify the source IP address and source port. Please check #3256. Feel free to add any comments.
Describe the feature
We should be able to set the source IP address and source port when creating the client using an optional parameter, in the same manner as urllib3.
E.g.
Use Case
As the endpoint IP address for requests is not static, local firewall rules on the machine need to allow traffic from port 443 to make requests. For some business use cases this unacceptable. Allowing to set source address and port allows greater granularity to the firewall rules.
Proposed Solution
The source_address parameter should be set in pool_manager_kwargs in URLLib3Session, for it to work with urllib3
Add the optional parameter into to Session.create_client() with default set as None (which will continue current behavior). Pass that value all the way through until create the URLLib3Session and it gets added to pool_manager_kwargs,
e.g.
Other Information
No response
Acknowledgements
SDK version used
1.20.0
Environment details (OS name and version, etc.)
Debian 10
The text was updated successfully, but these errors were encountered: