Fix OpenShift OAuth flow and Gateway connection hangs#334
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (6)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe changes update Dev Spaces connection readiness handling, combine default and custom TLS trust managers, add an OpenShift client timeout, change authentication checks to access reviews, remove Red Hat SSO authentication, and make kubeconfig persistence asynchronous. ChangesGateway authentication and connection flows
Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @csfercoci, thanks a lot for contributing. |
| val sslContext = createSSLContext(trustManager, usingClientCert, clientCert, clientKey) | ||
| client.httpClient = client.httpClient.newBuilder() | ||
| .sslSocketFactory(sslContext.socketFactory, trustManager) | ||
| .connectTimeout(15, TimeUnit.SECONDS) |
There was a problem hiding this comment.
I removed OpenShiftClientFactory and made builders instead (were present for 1 use case before).
The new BaseClientBuilder now has the connect timeout, too:
OkHttpClient.Builder()
.sslSocketFactory(sslContext.socketFactory, trustManager)
==> .connectTimeout(DEFAULT_HTTP_TIMEOUT_SECONDS, TimeUnit.SECONDS)
.readTimeout(DEFAULT_HTTP_TIMEOUT_SECONDS, TimeUnit.SECONDS)
.writeTimeout(DEFAULT_HTTP_TIMEOUT_SECONDS, TimeUnit.SECONDS)
.callTimeout(DEFAULT_HTTP_TIMEOUT_SECONDS, TimeUnit.SECONDS)
.protocols(listOf(Protocol.HTTP_1_1))
.build()|
@csfercoci: I included your 3 commits in #317. |
|
The 3 commits in this PR were added to #317. |
Summary
Problem
Against OpenShift clusters that delegate login through OpenShift OAuth, for example Entra ID behind OpenShift OAuth, Gateway could get stuck or fail in several places:
Testing
Note: Local build/install helper scripts used during debugging are intentionally not included in this PR.