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

Cross cluster search functional test with minimun privileges assigned to the test_user #70007

Merged
merged 17 commits into from
Jun 29, 2020

Conversation

rashmivkulkarni
Copy link
Contributor

Ref meta issue: #60815

Summary
This PR replaces elastic superuser with test_user with minimum privileges assigned to the test_user.

  • New role created global_ccr_role
    Checklist
    • Unit or functional tests were updated or added to match the most common scenarios

Related bug filed: #70000

@rashmivkulkarni
Copy link
Contributor Author

jenkins, test this

@rashmivkulkarni
Copy link
Contributor Author

jenkins, test this

@rashmivkulkarni
Copy link
Contributor Author

@elasticmachine merge upstream

@rashmivkulkarni
Copy link
Contributor Author

@elasticmachine merge upstream

@rashmivkulkarni
Copy link
Contributor Author

@elasticmachine merge upstream

@rashmivkulkarni
Copy link
Contributor Author

@elasticmachine merge upstream

@rashmivkulkarni
Copy link
Contributor Author

@elasticmachine merge upstream

@LeeDr
Copy link

LeeDr commented Jun 29, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

page load asset size

beta
id value diff baseline
/bundles/app/core/bootstrap.js - -13.9KB 13.9KB
/bundles/core/core.entry.js - -1.1MB 1.1MB
/bundles/kbn-ui-shared-deps/[email protected] - -4.0MB 4.0MB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.css - -183.7KB 183.7KB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js - -4.6MB 4.6MB
/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.v7.light.css - -511.3KB 511.3KB
/bundles/light_theme.style.css - -95.9KB 95.9KB
/bundles/plugin/advancedSettings/advancedSettings.plugin.js - -941.3KB 941.3KB
/bundles/plugin/alerts/alerts.plugin.js - -89.5KB 89.5KB
/bundles/plugin/apm/apm.plugin.js - -219.2KB 219.2KB
/bundles/plugin/apmOss/apmOss.plugin.js - -4.2KB 4.2KB
/bundles/plugin/beats_management/beats_management.plugin.js - -522.9KB 522.9KB
/bundles/plugin/bfetch/bfetch.plugin.js - -28.7KB 28.7KB
/bundles/plugin/canvas/canvas.plugin.js - -2.0MB 2.0MB
/bundles/plugin/charts/charts.plugin.js - -833.9KB 833.9KB
/bundles/plugin/cloud/cloud.plugin.js - -6.2KB 6.2KB
/bundles/plugin/console/console.plugin.js - -28.0KB 28.0KB
/bundles/plugin/crossClusterReplication/crossClusterReplication.plugin.js - -152.3KB 152.3KB
/bundles/plugin/dashboard/dashboard.plugin.js - -634.2KB 634.2KB
/bundles/plugin/dashboardEnhanced/dashboardEnhanced.plugin.js - -143.5KB 143.5KB
/bundles/plugin/dashboardMode/dashboardMode.plugin.js - -109.3KB 109.3KB
/bundles/plugin/data/data.plugin.js - -1.3MB 1.3MB
/bundles/plugin/dataEnhanced/dataEnhanced.plugin.js - -138.1KB 138.1KB
/bundles/plugin/devTools/devTools.plugin.js - -123.9KB 123.9KB
/bundles/plugin/discover/discover.plugin.js - -221.5KB 221.5KB
/bundles/plugin/discoverEnhanced/discoverEnhanced.plugin.js - -28.1KB 28.1KB
/bundles/plugin/embeddable/embeddable.plugin.js - -390.9KB 390.9KB
/bundles/plugin/embeddableEnhanced/embeddableEnhanced.plugin.js - -26.3KB 26.3KB
/bundles/plugin/esUiShared/esUiShared.plugin.js - -927.8KB 927.8KB
/bundles/plugin/expressions/expressions.plugin.js - -314.9KB 314.9KB
/bundles/plugin/features/features.plugin.js - -13.4KB 13.4KB
/bundles/plugin/fileUpload/fileUpload.plugin.js - -688.0KB 688.0KB
/bundles/plugin/globalSearch/globalSearch.plugin.js - -29.0KB 29.0KB
/bundles/plugin/globalSearchProviders/globalSearchProviders.plugin.js - -9.7KB 9.7KB
/bundles/plugin/graph/graph.plugin.js - -15.3KB 15.3KB
/bundles/plugin/grokdebugger/grokdebugger.plugin.js - -11.2KB 11.2KB
/bundles/plugin/home/home.plugin.js - -24.6KB 24.6KB
/bundles/plugin/indexLifecycleManagement/indexLifecycleManagement.plugin.js - -184.2KB 184.2KB
/bundles/plugin/indexManagement/indexManagement.plugin.js - -201.7KB 201.7KB
/bundles/plugin/indexPatternManagement/indexPatternManagement.plugin.js - -137.3KB 137.3KB
/bundles/plugin/infra/infra.plugin.js - -92.9KB 92.9KB
/bundles/plugin/ingestPipelines/ingestPipelines.plugin.js - -30.8KB 30.8KB
/bundles/plugin/inputControlVis/inputControlVis.plugin.js - -258.9KB 258.9KB
/bundles/plugin/inspector/inspector.plugin.js - -238.3KB 238.3KB
/bundles/plugin/kibanaLegacy/kibanaLegacy.plugin.js - -174.7KB 174.7KB
/bundles/plugin/kibanaReact/kibanaReact.plugin.js - -575.3KB 575.3KB
/bundles/plugin/kibanaUtils/kibanaUtils.plugin.js - -434.4KB 434.4KB
/bundles/plugin/lens/lens.plugin.js - -758.3KB 758.3KB
/bundles/plugin/licenseManagement/licenseManagement.plugin.js - -25.8KB 25.8KB
/bundles/plugin/licensing/licensing.plugin.js - -21.6KB 21.6KB
/bundles/plugin/logstash/logstash.plugin.js - -141.8KB 141.8KB
/bundles/plugin/management/management.plugin.js - -25.9KB 25.9KB
/bundles/plugin/maps/maps.plugin.js - -220.6KB 220.6KB
/bundles/plugin/mapsLegacy/mapsLegacy.plugin.js - -1.0MB 1.0MB
/bundles/plugin/mapsLegacyLicensing/mapsLegacyLicensing.plugin.js - -3.9KB 3.9KB
/bundles/plugin/ml/ml.plugin.js - -1.3MB 1.3MB
/bundles/plugin/monitoring/monitoring.plugin.js - -22.8KB 22.8KB
/bundles/plugin/navigation/navigation.plugin.js - -122.2KB 122.2KB
/bundles/plugin/newsfeed/newsfeed.plugin.js - -22.7KB 22.7KB
/bundles/plugin/observability/observability.plugin.js - -103.1KB 103.1KB
/bundles/plugin/painlessLab/painlessLab.plugin.js - -158.8KB 158.8KB
/bundles/plugin/regionMap/regionMap.plugin.js - -791.7KB 791.7KB
/bundles/plugin/remoteClusters/remoteClusters.plugin.js - -35.2KB 35.2KB
/bundles/plugin/reporting/reporting.plugin.js - -257.7KB 257.7KB
/bundles/plugin/rollup/rollup.plugin.js - -186.0KB 186.0KB
/bundles/plugin/savedObjects/savedObjects.plugin.js - -196.2KB 196.2KB
/bundles/plugin/savedObjectsManagement/savedObjectsManagement.plugin.js - -176.6KB 176.6KB
/bundles/plugin/searchprofiler/searchprofiler.plugin.js - -42.8KB 42.8KB
/bundles/plugin/security/security.plugin.js - -248.0KB 248.0KB
/bundles/plugin/share/share.plugin.js - -80.5KB 80.5KB
/bundles/plugin/snapshotRestore/snapshotRestore.plugin.js - -57.5KB 57.5KB
/bundles/plugin/spaces/spaces.plugin.js - -367.2KB 367.2KB
/bundles/plugin/statusPage/statusPage.plugin.js - -3.6KB 3.6KB
/bundles/plugin/telemetry/telemetry.plugin.js - -77.0KB 77.0KB
/bundles/plugin/telemetryManagementSection/telemetryManagementSection.plugin.js - -27.5KB 27.5KB
/bundles/plugin/tileMap/tileMap.plugin.js - -807.1KB 807.1KB
/bundles/plugin/transform/transform.plugin.js - -21.6KB 21.6KB
/bundles/plugin/triggers_actions_ui/triggers_actions_ui.plugin.js - -103.0KB 103.0KB
/bundles/plugin/uiActions/uiActions.plugin.js - -162.5KB 162.5KB
/bundles/plugin/uiActionsEnhanced/uiActionsEnhanced.plugin.js - -130.7KB 130.7KB
/bundles/plugin/upgradeAssistant/upgradeAssistant.plugin.js - -46.6KB 46.6KB
/bundles/plugin/uptime/uptime.plugin.js - -327.3KB 327.3KB
/bundles/plugin/usageCollection/usageCollection.plugin.js - -24.4KB 24.4KB
/bundles/plugin/visTypeMarkdown/visTypeMarkdown.plugin.js - -512.5KB 512.5KB
/bundles/plugin/visTypeMetric/visTypeMetric.plugin.js - -536.7KB 536.7KB
/bundles/plugin/visTypeTable/visTypeTable.plugin.js - -563.0KB 563.0KB
/bundles/plugin/visTypeTagcloud/visTypeTagcloud.plugin.js - -797.1KB 797.1KB
/bundles/plugin/visTypeTimelion/visTypeTimelion.plugin.js - -670.7KB 670.7KB
/bundles/plugin/visTypeTimeseries/visTypeTimeseries.plugin.js - -212.2KB 212.2KB
/bundles/plugin/visTypeVega/visTypeVega.plugin.js - -580.3KB 580.3KB
/bundles/plugin/visTypeVislib/visTypeVislib.plugin.js - -1.2MB 1.2MB
/bundles/plugin/visualizations/visualizations.plugin.js - -343.4KB 343.4KB
/bundles/plugin/visualize/visualize.plugin.js - -18.2KB 18.2KB
/bundles/plugin/watcher/watcher.plugin.js - -35.2KB 35.2KB
/node_modules/@kbn/ui-framework/dist/kui_light.css - -62.1KB 62.1KB
/translations/en.json - -29.0B 29.0B
/ui/fonts/inter_ui/Inter-UI-Medium.woff2 - -92.2KB 92.2KB
/ui/fonts/inter_ui/Inter-UI-Regular.woff2 - -86.4KB 86.4KB
total - -36.2MB -

History

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

@rashmivkulkarni rashmivkulkarni marked this pull request as ready for review June 29, 2020 16:20
Copy link

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I reviewed code and Jenkins results. Due to another bug in the test framework, the results of these tests are not shown in the Jenkins job. But I found the results for x-pack ci Group4 which shows they ran and passed.

15:29:36         └-: Cross Cluster Replication app
15:29:36           └-> "before all" hook
15:29:36           └-: Home page
15:29:36             └-> "before all" hook
15:29:36             └-> "before all" hook
15:29:36               │ERROR browser[SEVERE] http://localhost:6151/api/saved_objects/_bulk_get - Failed to load resource: the server responded with a status of 403 (Forbidden)
15:29:36               │ERROR browser[SEVERE] http://localhost:6151/34138/bundles/core/core.entry.js 19:16140 
15:29:36               │ERROR browser[SEVERE] http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 413:77071 TypeError: Cannot read property 'missingPrivileges' of null
15:29:36               │          at http://localhost:6151/34138/bundles/plugin/esUiShared/esUiShared.plugin.js:1:834224
15:29:36               │          at Array.every (<anonymous>)
15:29:36               │          at WithPrivileges (http://localhost:6151/34138/bundles/plugin/esUiShared/esUiShared.plugin.js:1:834085)
15:29:36               │          at ua (http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:414:59332)
15:29:36               │          at Ya (http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:414:67554)
15:29:36               │          at xs (http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:414:105587)
15:29:36               │          at ml (http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:414:90018)
15:29:36               │          at hl (http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:414:89943)
15:29:36               │          at ol (http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:414:87291)
15:29:36               │          at http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:414:45733
15:29:36               │ERROR browser[SEVERE] http://localhost:6151/34138/bundles/core/core.entry.js 75:261558 TypeError: Failed to fetch
15:29:36               │          at Fetch._callee3$ (http://localhost:6151/34138/bundles/core/core.entry.js:26:104500)
15:29:36               │          at l (http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:360:998695)
15:29:36               │          at Generator._invoke (http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:360:998448)
15:29:36               │          at Generator.forEach.e.<computed> [as throw] (http://localhost:6151/34138/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:360:999052)
15:29:36               │          at fetch_asyncGeneratorStep (http://localhost:6151/34138/bundles/core/core.entry.js:26:98881)
15:29:36               │          at _throw (http://localhost:6151/34138/bundles/core/core.entry.js:26:99289)
15:29:36               │ERROR browser[SEVERE] http://localhost:6151/api/saved_objects/_bulk_get - Failed to load resource: the server responded with a status of 403 (Forbidden)
15:29:36               │ERROR browser[SEVERE] http://localhost:6151/34138/bundles/core/core.entry.js 19:16140 
15:29:39             └-> Loads the app
15:29:39               └-> "before each" hook: global before each
15:29:39               └- ✓ pass  (63ms) "Cross Cluster Replication app Home page Loads the app"
15:29:39             └-> "after all" hook
15:29:41             └-> "after all" hook
15:29:41           └-> "after all" hook

@rashmivkulkarni
Copy link
Contributor Author

This test when written initially had skipcloud tag on it in index.ts file as CCR wasn't initially allowed on Cloud. It does not have CCR available yet. Hence no point in running these tests on cloud.

Copy link
Contributor

@cuff-links cuff-links left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Ran fine locally also with slowing down the network.

@rashmivkulkarni rashmivkulkarni merged commit d79a688 into elastic:master Jun 29, 2020
rashmivkulkarni added a commit to rashmivkulkarni/kibana that referenced this pull request Jun 29, 2020
… to the test_user (elastic#70007)

* using test_user with limited read permission to search profiler test

* gitcheck

* search profiler test using test_user

* using limited roles and privileges for CCR

* changed the global ccr role kibana section to be consistent with other roles with no feature controls

* removed canvas role

* changes to include pagination for 100 rows

Co-authored-by: Elastic Machine <[email protected]>
rashmivkulkarni added a commit that referenced this pull request Jun 29, 2020
… to the test_user (#70007) (#70268)

* using test_user with limited read permission to search profiler test

* gitcheck

* search profiler test using test_user

* using limited roles and privileges for CCR

* changed the global ccr role kibana section to be consistent with other roles with no feature controls

* removed canvas role

* changes to include pagination for 100 rows

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 30, 2020
…ata-streams

* 'master' of github.com:elastic/kibana: (50 commits)
  [Logs UI] [Alerting] "Group by" functionality (elastic#68250)
  [Discover] Deangularize Skip to bottom button (elastic#69811)
  Implement recursive plugin discovery (elastic#68811)
  Use ts-expect-error in platform code (elastic#69883)
  [SIEM][Detection Engine][Lists] Moves getQueryFilter to common folder for use by both front and backend
  [Ingest Manager][SECURITY SOLUTION] adjust config reassign link and add roundtrip to Reassignment flow (elastic#70208)
  [Security][Lists] Add API functions and react hooks for value list APIs (elastic#69603)
  [ILM] Fix bug when clearing priority field (elastic#70154)
  [Platform][Security] Updates cluster_manager ignorePaths to include security scripts (elastic#70139)
  [IngestManager] Allow to filter agent by packages (elastic#69731)
  [code coverage] exclude folders: test_helpers, tests_bundle (elastic#70199)
  [Metrics UI] UX improvements for saved views (elastic#69910)
  [APM] docs: unique transaction troubleshooting (elastic#69831)
  Cross cluster search functional test with minimun privileges assigned to the test_user (elastic#70007)
  [Maps] choropleth layer wizard (elastic#69699)
  Make custom errors by extending Error (elastic#69966)
  [Ingest Manager] Support updated package output structure (elastic#69864)
  Resolver test coverage (elastic#70246)
  Async Discover search test (elastic#64388)
  [ui-shared-deps] include styled-components (elastic#69322)
  ...

# Conflicts:
#	x-pack/plugins/snapshot_restore/server/types.ts
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 30, 2020
…bana into alerting/consumer-based-rbac

* 'alerting/consumer-based-rbac' of github.com:gmmorris/kibana: (49 commits)
  [Discover] Deangularize Skip to bottom button (elastic#69811)
  Implement recursive plugin discovery (elastic#68811)
  Use ts-expect-error in platform code (elastic#69883)
  [SIEM][Detection Engine][Lists] Moves getQueryFilter to common folder for use by both front and backend
  [Ingest Manager][SECURITY SOLUTION] adjust config reassign link and add roundtrip to Reassignment flow (elastic#70208)
  [Security][Lists] Add API functions and react hooks for value list APIs (elastic#69603)
  [ILM] Fix bug when clearing priority field (elastic#70154)
  [Platform][Security] Updates cluster_manager ignorePaths to include security scripts (elastic#70139)
  [IngestManager] Allow to filter agent by packages (elastic#69731)
  [code coverage] exclude folders: test_helpers, tests_bundle (elastic#70199)
  [Metrics UI] UX improvements for saved views (elastic#69910)
  [APM] docs: unique transaction troubleshooting (elastic#69831)
  Cross cluster search functional test with minimun privileges assigned to the test_user (elastic#70007)
  [Maps] choropleth layer wizard (elastic#69699)
  Make custom errors by extending Error (elastic#69966)
  [Ingest Manager] Support updated package output structure (elastic#69864)
  Resolver test coverage (elastic#70246)
  Async Discover search test (elastic#64388)
  [ui-shared-deps] include styled-components (elastic#69322)
  SECURITY-ENDPOINT: add host properties (elastic#70238)
  ...
Bamieh pushed a commit to Bamieh/kibana that referenced this pull request Jul 1, 2020
… to the test_user (elastic#70007)

* using test_user with limited read permission to search profiler test

* gitcheck

* search profiler test using test_user

* using limited roles and privileges for CCR

* changed the global ccr role kibana section to be consistent with other roles with no feature controls

* removed canvas role

* changes to include pagination for 100 rows

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants