Skip to content
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

feat: Dashboard should not allow to create a workspace if repo url is… #1192

Merged
merged 6 commits into from
Sep 18, 2024

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented Sep 16, 2024

… not in allowed list

What does this PR do?

Show an error when user try to start a workspace from disallowed source

Screenshot/screencast of this PR

screenshot-localhost_8080-2024_09_16-16_39_44

What issues does this PR fix or reference?

eclipse-che/che#23030

Is it tested? How?

  1. Deploy Eclipse Che
  2. kubectl patch checluster eclipse-che --patch '{"spec": {"devEnvironments": {"allowedSources": {"urls": ["https://gitlab.com/*"]}}}}' --type=merge -n eclipse-che
  3. kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1192", name: che-dashboard}]}}]"
  4. Try to start a workspace from https://github.com

Release Notes

Added support for specifying allowed sources from which Cloud Development Environments (CDEs) can be initiated.
URLs now support wildcard patterns (e.g., https://example.com/*), allowing flexible matching for CDE initiation.

Docs PR

eclipse-che/che-docs#2790

Copy link

openshift-ci bot commented Sep 16, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@che-bot
Copy link
Contributor

che-bot commented Sep 16, 2024

Click here to review and test in web IDE: Contribute

Copy link

codecov bot commented Sep 16, 2024

Codecov Report

Attention: Patch coverage is 96.55172% with 4 lines in your changes missing coverage. Please review.

Project coverage is 91.35%. Comparing base (e1fe428) to head (b35ed85).

Files with missing lines Patch % Lines
...tend/src/components/UntrustedSourceModal/index.tsx 83.33% 2 Missing ⚠️
...rkspaceProgress/CreatingSteps/Initialize/index.tsx 95.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1192      +/-   ##
==========================================
+ Coverage   91.33%   91.35%   +0.02%     
==========================================
  Files         439      440       +1     
  Lines       45404    45517     +113     
  Branches     3149     3158       +9     
==========================================
+ Hits        41468    41582     +114     
+ Misses       3936     3935       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1192

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1192", name: che-dashboard}]}}]"

… not in allowed list

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1192

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1192", name: che-dashboard}]}}]"

@tolusha tolusha marked this pull request as ready for review September 17, 2024 14:26
Co-authored-by: Oleksii Orel <oorel@redhat.com>
@openshift-ci openshift-ci bot removed the lgtm label Sep 18, 2024
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1192

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1192", name: che-dashboard}]}}]"

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1192

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1192", name: che-dashboard}]}}]"

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Copy link

Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1192

kubectl patch command
kubectl patch -n eclipse-che "checluster/eclipse-che" --type=json -p="[{"op": "replace", "path": "/spec/components/dashboard/deployment", "value": {containers: [{image: "quay.io/eclipse/che-dashboard:pr-1192", name: che-dashboard}]}}]"

@openshift-ci openshift-ci bot added the lgtm label Sep 18, 2024
Copy link

openshift-ci bot commented Sep 18, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akurinnoy, olexii4, tolusha

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tolusha tolusha merged commit 8c8b3f8 into main Sep 18, 2024
16 checks passed
@tolusha tolusha deleted the 23030 branch September 18, 2024 11:48
@devstudio-release
Copy link

Build 3.17 :: dashboard_3.x/545: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants