-
Notifications
You must be signed in to change notification settings - Fork 449
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
Fix ApacheHttpTransport configuration #717
Conversation
@chanseokoh We will backport this into a 1.30.2 release if it fixes the issue. |
new PoolingHttpClientConnectionManager(-1, TimeUnit.MILLISECONDS); | ||
// Disable the stale connection check (previously configured in the HttpConnectionParams | ||
connectionManager.setValidateAfterInactivity(-1); | ||
|
||
return HttpClientBuilder.create() | ||
.useSystemProperties() | ||
.setSSLSocketFactory(SSLConnectionSocketFactory.getSocketFactory()) |
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.
Would you remove this? By default, it will create and use SSLConnectionSocketFactory.getSocketFactory()
. If this is set, I can't set .setSSLContext()
or .setSSLHostnameVerifier()
as they are overridden in the same manner with setConnectionManager()
.
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.
Hmm... that may not exactly be same when useSystemProperties()
is set.
Nonetheless, I think I'm OK either way, since I can explicitly unset the factory by .setSSLSocketFactory(null)
, so not a big deal.
@chingor13 thanks! I'm OK if you make a new release or do a backport. This works in my testing. |
* Switch back to deprecated setStaleConnectionCheck * checkstyle fix for TODO
…on URL for Workload Identity Federation (googleapis#717) * fix: add validation for the token URL and service account impersonation URL in ExternalAccountCredentials * fix: review comment * fix: add test case
🤖 I have created a release \*beep\* \*boop\* --- ## [1.1.0](https://www.github.com/googleapis/google-auth-library-java/compare/v1.0.0...v1.1.0) (2021-08-17) ### Features * downscoping with credential access boundaries ([googleapis#702](https://www.github.com/googleapis/google-auth-library-java/issues/702)) ([aa7ede1](https://www.github.com/googleapis/google-auth-library-java/commit/aa7ede1d1c688ba437798f4204820c0506d5d969)) ### Bug Fixes * add validation for the token URL and service account impersonation URL for Workload Identity Federation ([googleapis#717](https://www.github.com/googleapis/google-auth-library-java/issues/717)) ([23cb8ef](https://www.github.com/googleapis/google-auth-library-java/commit/23cb8ef778d012bbd452c1dfdac5f096d1af6c95)) ### Documentation * updates README for downscoping with CAB ([googleapis#716](https://www.github.com/googleapis/google-auth-library-java/issues/716)) ([68bceba](https://www.github.com/googleapis/google-auth-library-java/commit/68bceba21c05870f6eb616cc057ddf0521c581b8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Fixes #715
Switch back to deprecated
setStaleConnectionCheck
.HttpClientBuilder
does not expose a way to configure the connection manager'svalidateAfterInactivity
configuration. We can either reimplement the entirety of the builder's logic or switch back to a deprecated method.