-
Notifications
You must be signed in to change notification settings - Fork 52
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
Untrusted source warning #1152
Untrusted source warning #1152
Conversation
Skipping CI for Draft Pull Request. |
19d932b
to
762551b
Compare
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
762551b
to
5d8bd0e
Compare
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1152 kubectl patch commandkubectl 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-1152", name: che-dashboard}]}}]" |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1152 +/- ##
==========================================
+ Coverage 89.46% 89.76% +0.30%
==========================================
Files 415 416 +1
Lines 42461 42749 +288
Branches 2831 2876 +45
==========================================
+ Hits 37987 38374 +387
+ Misses 4443 4348 -95
+ Partials 31 27 -4 ☔ View full report in Codecov by Sentry. |
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1152 kubectl patch commandkubectl 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-1152", name: che-dashboard}]}}]" |
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1152 kubectl patch commandkubectl 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-1152", name: che-dashboard}]}}]" |
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1152 kubectl patch commandkubectl 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-1152", name: che-dashboard}]}}]" |
@akurinnoy : here is the PR validation result: Extra use cases to consider:
|
packages/dashboard-frontend/src/components/UntrustedSourceModal/index.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
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.
LGTM
Signed-off-by: Oleksii Kurinnyi <okurinny@redhat.com>
// const mockGet = jest.fn().mockReturnValue('all'); | ||
// jest.mock('@/services/session-storage', () => { | ||
// return { | ||
// __esModule: true, | ||
// default: { | ||
// get: (...args: unknown[]) => mockGet(...args), | ||
// }, | ||
// // enum | ||
// SessionStorageKey: { | ||
// TRUSTED_SOURCES: 'trusted-sources', // 'all' or 'repo1,repo2,...' | ||
// }, | ||
// }; | ||
// }); | ||
|
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.
should we delete or fix it ?
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.
this are leftovers from the prev implementation, I'll delete them in the next commit.
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.
done
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.
Great job with test coverage, my only comment is that semantically we should consider *
vs all
@akurinnoy, @ibuziuk : I have verified new version of PR (Eclipse Che Next + quay.io/eclipse/che-dashboard@sha256:bb6c15af82f9ac20743455b4d2fb9e78e18101b5298e0b9acf55a92f18e4cf15) and have a few questions:
screencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.08.13-20_26_23.webm
Note: I have also verified "Untrusted source warning" popup with different users - |
@dmytro-ndp thanks for the feedback!
Yep, this is expected.
If you mean inactive browser tabs then yes, this is the expected behavior. Automatically affecting inactive dashboard tabs would be a good improvement, but it's outside this issue's scope.
This behavior is expected. I tend to think that samples are trustworthy sources, but I’m OK to discuss it and tune this behavior. |
1e9a4c7
to
f150deb
Compare
Docker image build succeeded: quay.io/eclipse/che-dashboard:pr-1152 kubectl patch commandkubectl 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-1152", name: che-dashboard}]}}]" |
@akurinnoy: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
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.
LGTM
@akurinnoy BTW: ci/prow/v14-dashboard-happy-path job has two failed tests:
|
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.
@akurinnoy, @ibuziuk: thank you the feedback and taking PR review notices into account.
I have tested new changes (quay.io/eclipse/che-dashboard@sha256:ea0380eb2faa5c24be6fb01717d93016f35714db574be2bfd1aaffd9a575cf2f) and Untrusted source warning
popup looked more clear and worked as expected, IMHO.
user.webm
and then
kubeadmin.webm
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: akurinnoy, dmytro-ndp, ibuziuk, olexii4 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 |
Build 3.17 :: dashboard_3.x/526: Console, Changes, Git Data |
Build 3.16 :: dashboard_3.16/10: Console, Changes, Git Data |
Build 3.17 :: sync-to-downstream_3.x/7460: Console, Changes, Git Data |
Build 3.16 :: sync-to-downstream_3.16/21: Console, Changes, Git Data |
Build 3.17 :: get-sources-rhpkg-container-build_3.x/7440: dashboard : 3.x :: |
Build 3.16 :: get-sources-rhpkg-container-build_3.16/20: dashboard : 3.16 :: |
Note: "Trust Author" popup displayed as expected when I had created workspace out of UI - by using factory URL, e.g. |
What does this PR do?
This PR adds the ability to warn users that creating workspaces from unknown sources can be dangerous.
Import from a Git repository (updated)
Screen.Recording.2024-08-13.at.15.52.21.mov
Factory link (updated)
Screen.Recording.2024-08-13.at.19.24.32.mov
Samples are always trusted
Screen.Recording.2024-07-26.at.17.52.27.mov
What issues does this PR fix or reference?
resolves eclipse-che/che#23018
Is it tested? How?
2.1. You should see a warning window
2.2. Click
Cancel
to interrupt the creation of a new workspace.2.3. Click
Continue
to continue creating a new workspace.3.1. You should see a warning window
3.2. Click
Cancel
to interrupt the creation of a new workspace.3.3. Click
Continue
to continue creating a new workspace.