Feature Request: Add support for configuring a proxy on a per client basis #888
Labels
component: core
Core functionality related issue
type: enhancement
Smaller enhancement in existing integration
Milestone
Type: Feature
Is your feature request related to a problem? Please describe.
None of the current properties allow a proxy to be configured for an AWS client.
When developing software behind a corporate proxy, autowired AWS Clients cannot access AWS services so the application cannot be tested locally without overriding the client bean and manually creating a client with a proxy configured.
Describe the solution you'd like
I propose that the following properties be added:
The value of
spring.cloud.aws.<client-type>.proxy.enabled
defaults tofalse
.If
spring.cloud.aws.<client-type>.proxy.enabled
istrue
thenspring.cloud.aws.proxy.host
andspring.cloud.aws.proxy.port
are required. Otherwise they are optional.The properties
spring.cloud.aws.proxy.username
andspring.cloud.aws.proxy.password
are always optional.if
spring.cloud.aws.<client-type>.proxy.enabled
is not defined, no proxy is set for that particular client.Describe alternatives you've considered
Overriding the AWS client beans to create a client that has a proxy configured. This approach is requires coding and makes it more difficult to leverage the other configuration properties supported by
spring-cloud-aws
.We also considered a design with a single set of properties for all AWS clients to share. With this design, setting the proxy would force all clients to use the proxy. Such a design is not preferred because some VPCs that do not have Internet access may have VPC Gateway Endpoints for DynamoDB and S3 but not have VPC Interface Endpoints enabled for services like CloudWatch, SNS, SQS, etc. For VPCs that have VPC Gateway Endpoints but which are not allowed to configure VPC Interface Endpoints or have Internet access, the S3 and DynamoDB clients would not need a proxy while the other AWS clients would require one.
Additional context
I welcome any feedback on the design and I would be happy to create a PR to contribute this feature.
The text was updated successfully, but these errors were encountered: