feat: Gateway: CRW-8927 - Simplify login in to the OCP cluster from t…#247
feat: Gateway: CRW-8927 - Simplify login in to the OCP cluster from t…#247vrubezhny wants to merge 4 commits intoredhat-developer:mainfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #247 +/- ##
==========================================
+ Coverage 0.00% 15.50% +15.50%
==========================================
Files 4 81 +77
Lines 26 3534 +3508
Branches 0 644 +644
==========================================
+ Hits 0 548 +548
- Misses 26 2898 +2872
- Partials 0 88 +88 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
198f7c1 to
0efefa4
Compare
0efefa4 to
54a861b
Compare
|
A few changes made to the Authentication and Select Cluster Wizard:
Here's a POC demo for Auth via Username/Password onto a local CRC cluster (+DevSpaces installed): Username-Password-Authentication-POC.mp4 |
|
@vrubezhny is this ready to be reviewed or should I wait for you to finish it? |
|
Quick question: does this also work the same the other way around, if i follow the flow from dev spaces dashboard will it also automatically login? |
Yes we're going to add this to the Connection Provider that uses Join Link from the Che Dashboard. |
…he Gateway plugin This PR adds a possibility to authorize on... - ...an OpenShift cluster via OpenShift OAuth Authenticator - ...a Sandbox provisioned cluster via RedHat SSO Authenticator Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com> Assisted-by: OpenAI ChatGPT
54a861b to
4fbe99a
Compare
4fbe99a to
bdcbc17
Compare
|
Random drive-by comment : Most users aren't typing out the token themselves. They probably have it copied. Would it be possible to read the clipboard/copy buffer, detect if it is in the form of a token, and then autofocus the "Token" tab ? Maybe even autofilling the values ? You can also consider doing this in a separate issue as a nice-to-have after this is merged to reduce the amount of time spent on the PR. |
…he Gateway plugin This PR adds a possibility to authorize on... - ...an OpenShift cluster via Username/Password Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com> Assisted-by: OpenAI ChatGPT
bdcbc17 to
5361033
Compare
I thought about doing this and I believe it should be quite possible to read the Clipboard contents and paste it into the token field... But we don't actually have a certain source for getting the information how and where do we need to connect to before we choose a Dev Workspace (I mean which tab to switch to initially and why) - like yes, we may have a Kube config with its current context, but it might not even exist... For the Connection Provider is the same. I mean... User must select/type in a cluster first, After that we should check that we don't have, for instance, client certificate set for the cluster (which usually, when set, tends to be the primary way to authenticate),and only after that we can start thinking on whether we have a token saved to the Clipboard or not... It's not like " hey! we have a token saved to the CB - let's connect using it" - cluster selection should be made first. So, if we accept having Kube config's current context as the primary source for this information, we can try detecting if it points to a "token"-like connection and then try reading the Clipboard. Otherwise this would be a dumb guessing of what a user really wants to connect to. Adding the Clipboard's saved token value as the source for making decision on what connection tab to choose may help, but also could add nothing but mess if such a choice will have no clear logic. I'd created the separate issues for the possible further improvements including the Clipboard usage after this "starting" PR gets approved. (The PR has already ~60 changed files and it could become a really difficult to keep rebasing and improving it until it's merged) PS: As the first approximation we can make it working for the token tab (so user must select a cluster, then switch to the Token tab explicitly): Screencast.From.2026-03-05.23-43-37.mp4 |
…he Gateway plugin This PR adds a watcher for the Clipboard that allows copy-pasting "sha256~"-like tokens to the Token field of the Select Cluster [via Token] page of the DevSpace connection wizard Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com> Assisted-by: OpenAI ChatGPT
…he Gateway plugin FixUp for the TLS Certificate resolve - now users get asked if they trust a new cluster's TLS Certificate Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com> Assisted-by: OpenAI ChatGPT
|
all is tested properly? can it enter into main? |
Yes, we're aiming to merge it into main, but at the moment the PR is under review. |
|
Impressive! I am testing, reviewing it, will need quite some time though. |
|
Here's a usecase that doesn't work for me (or I dont use it properly). Steps:
Result: I also get to the frozen wizard when using the tab "OpenShift OAuth": Steps:
Result: |






…he Gateway plugin
This POC PR adds a possibility to authorize on...
POC Demo:
Openshift-Authentication-POC.mp4