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

[7.x] [Security Solution][Trusted Apps] New ArtifactEntryCard and refactor of Trusted Apps list to use it (#111051) #111811

Merged
merged 1 commit into from
Sep 10, 2021

Conversation

kibanamachine
Copy link
Contributor

Backports the following commits to 7.x:

…r of Trusted Apps list to use it (elastic#111051)

* New `ArtifactEntryCard` component
* Refactored ContextMenuItemNavByRouter and moved it to top-level components + new ActionsContextMenu component + add context menu to card
* Refactor Trusted App grid to use new ArtifactEntryCard
* new Trusted Apps generator + refactor existing of TA script to use it
* policy details support for custom back link
* bug fix: paginated content should not trigger a change to adjust paging settings unless loading is done
@kibanamachine
Copy link
Contributor Author

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/ml/settings/filter_list_creation·ts.machine learning settings filter list creation "before all" hook for "creates new filter list"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:23]         └-: machine learning
[00:00:23]           └-> "before all" hook in "machine learning"
[00:00:23]           └-: 
[00:00:23]             └-> "before all" hook in ""
[00:00:23]             └-> "before all" hook in ""
[00:00:23]               │ debg creating role ft_ml_source
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_ml_source]
[00:00:23]               │ debg creating role ft_ml_source_readonly
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_ml_source_readonly]
[00:00:23]               │ debg creating role ft_ml_dest
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_ml_dest]
[00:00:23]               │ debg creating role ft_ml_dest_readonly
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_ml_dest_readonly]
[00:00:23]               │ debg creating role ft_ml_ui_extras
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_ml_ui_extras]
[00:00:23]               │ debg creating role ft_default_space_ml_all
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_default_space_ml_all]
[00:00:23]               │ debg creating role ft_default_space1_ml_all
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_default_space1_ml_all]
[00:00:23]               │ debg creating role ft_all_spaces_ml_all
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_all_spaces_ml_all]
[00:00:23]               │ debg creating role ft_default_space_ml_read
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_default_space_ml_read]
[00:00:23]               │ debg creating role ft_default_space1_ml_read
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_default_space1_ml_read]
[00:00:23]               │ debg creating role ft_all_spaces_ml_read
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_all_spaces_ml_read]
[00:00:23]               │ debg creating role ft_default_space_ml_none
[00:00:23]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_default_space_ml_none]
[00:00:23]               │ debg creating user ft_ml_poweruser
[00:00:23]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_poweruser]
[00:00:23]               │ debg created user ft_ml_poweruser
[00:00:23]               │ debg creating user ft_ml_poweruser_spaces
[00:00:23]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_poweruser_spaces]
[00:00:24]               │ debg created user ft_ml_poweruser_spaces
[00:00:24]               │ debg creating user ft_ml_poweruser_space1
[00:00:24]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_poweruser_space1]
[00:00:24]               │ debg created user ft_ml_poweruser_space1
[00:00:24]               │ debg creating user ft_ml_poweruser_all_spaces
[00:00:24]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_poweruser_all_spaces]
[00:00:24]               │ debg created user ft_ml_poweruser_all_spaces
[00:00:24]               │ debg creating user ft_ml_viewer
[00:00:24]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_viewer]
[00:00:24]               │ debg created user ft_ml_viewer
[00:00:24]               │ debg creating user ft_ml_viewer_spaces
[00:00:24]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_viewer_spaces]
[00:00:24]               │ debg created user ft_ml_viewer_spaces
[00:00:24]               │ debg creating user ft_ml_viewer_space1
[00:00:24]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_viewer_space1]
[00:00:24]               │ debg created user ft_ml_viewer_space1
[00:00:24]               │ debg creating user ft_ml_viewer_all_spaces
[00:00:24]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_viewer_all_spaces]
[00:00:24]               │ debg created user ft_ml_viewer_all_spaces
[00:00:24]               │ debg creating user ft_ml_unauthorized
[00:00:24]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_unauthorized]
[00:00:24]               │ debg created user ft_ml_unauthorized
[00:00:24]               │ debg creating user ft_ml_unauthorized_spaces
[00:00:25]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_unauthorized_spaces]
[00:00:25]               │ debg created user ft_ml_unauthorized_spaces
[00:02:07]             └-: settings
[00:02:07]               └-> "before all" hook in "settings"
[00:03:48]               └-: filter list creation
[00:03:48]                 └-> "before all" hook for "creates new filter list"
[00:03:48]                 └-> "before all" hook for "creates new filter list"
[00:03:48]                   │ debg applying update to kibana config: {"dateFormat:tz":"UTC"}
[00:03:49]                   │ debg SecurityPage.forceLogout
[00:03:49]                   │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=100
[00:03:49]                   │ debg --- retry.tryForTime error: .login-form is not displayed
[00:03:50]                   │ debg Redirecting to /logout to force the logout
[00:03:50]                   │ debg Waiting on the login form to appear
[00:03:50]                   │ debg Waiting for Login Page to appear.
[00:03:50]                   │ debg Waiting up to 100000ms for login page...
[00:03:50]                   │ debg browser[INFO] http://localhost:6181/logout?_t=1631230123180 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:03:50]                   │
[00:03:50]                   │ debg browser[INFO] http://localhost:6181/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:03:50]                   │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=2500
[00:03:52]                   │ERROR browser[SEVERE] http://localhost:6181/api/alerts/list_alert_types - Failed to load resource: the server responded with a status of 401 (Unauthorized)
[00:03:52]                   │ debg browser[INFO] http://localhost:6181/44302/bundles/core/core.entry.js 12:152325 "Detected an unhandled Promise rejection.
[00:03:52]                   │      Error: Unauthorized"
[00:03:52]                   │ERROR browser[SEVERE] http://localhost:6181/44302/bundles/core/core.entry.js 5:2752 
[00:03:52]                   │ debg browser[INFO] http://localhost:6181/login?msg=LOGGED_OUT 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:03:52]                   │
[00:03:52]                   │ debg browser[INFO] http://localhost:6181/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:03:52]                   │ debg --- retry.tryForTime error: .login-form is not displayed
[00:03:53]                   │ERROR browser[SEVERE] http://localhost:6181/api/licensing/info - Failed to load resource: the server responded with a status of 401 (Unauthorized)
[00:03:53]                   │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=2500
[00:03:53]                   │ debg TestSubjects.exists(loginForm)
[00:03:53]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:03:54]                   │ debg Waiting for Login Form to appear.
[00:03:54]                   │ debg Waiting up to 100000ms for login form...
[00:03:54]                   │ debg TestSubjects.exists(loginForm)
[00:03:54]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:03:54]                   │ debg TestSubjects.setValue(loginUsername, ft_ml_poweruser)
[00:03:54]                   │ debg TestSubjects.click(loginUsername)
[00:03:54]                   │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:03:54]                   │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:03:54]                   │ debg TestSubjects.setValue(loginPassword, mlp001)
[00:03:54]                   │ debg TestSubjects.click(loginPassword)
[00:03:54]                   │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:03:54]                   │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:03:54]                   │ debg TestSubjects.click(loginSubmit)
[00:03:54]                   │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:03:54]                   │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:03:54]                   │ debg Waiting for login result, expected: chrome.
[00:03:54]                   │ debg Find.findByCssSelector('[data-test-subj="userMenuAvatar"]') with timeout=20000
[00:03:54]                   │ proc [kibana]   log   [23:28:47.575] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:04:04]                   │ debg browser[INFO] http://localhost:6181/app/home 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:04:04]                   │
[00:04:04]                   │ debg browser[INFO] http://localhost:6181/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:04:04]                   │ERROR browser[SEVERE] http://localhost:6181/internal/security/me - Failed to load resource: net::ERR_NETWORK_CHANGED
[00:04:04]                   │ debg browser[INFO] http://localhost:6181/44302/bundles/core/core.entry.js 12:152325 "Detected an unhandled Promise rejection.
[00:04:04]                   │      TypeError: Failed to fetch"
[00:04:04]                   │ERROR browser[SEVERE] http://localhost:6181/44302/bundles/core/core.entry.js 5:2752 
[00:04:04]                   │ERROR browser[SEVERE] http://localhost:6181/internal/security/session - Failed to load resource: net::ERR_NETWORK_CHANGED
[00:04:14]                   │ info Taking screenshot "/dev/shm/workspace/parallel/8/kibana/x-pack/test/functional/screenshots/failure/machine learning  settings filter list creation _before all_ hook for _creates new filter list_.png"
[00:04:14]                   │ info Current URL is: http://localhost:6181/app/home#/
[00:04:14]                   │ info Saving page source to: /dev/shm/workspace/parallel/8/kibana/x-pack/test/functional/failure_debug/html/machine learning  settings filter list creation _before all_ hook for _creates new filter list_.html
[00:04:14]                   └- ✖ fail: machine learning  settings filter list creation "before all" hook for "creates new filter list"
[00:04:14]                   │      TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="userMenuAvatar"])
[00:04:14]                   │ Wait timed out after 20252ms
[00:04:14]                   │       at /dev/shm/workspace/parallel/8/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:04:14]                   │       at runMicrotasks (<anonymous>)
[00:04:14]                   │       at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:04:14]                   │ 
[00:04:14]                   │ 

Stack Trace

TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="userMenuAvatar"])
Wait timed out after 20252ms
    at /dev/shm/workspace/parallel/8/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5) {
  remoteStacktrace: ''
}

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 2391 2402 +11

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 6.5MB 6.5MB +10.5KB

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @paul-tavares

@kibanamachine kibanamachine merged commit 0ad55ec into elastic:7.x Sep 10, 2021
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.

2 participants