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

[test-failed]: X-Pack API Integration Tests1.x-pack/test/api_integration/apis/security/privileges·ts - apis security Privileges GET /api/security/privileges should return a privilege map with all known privileges, without actions #105353

Closed
liza-mae opened this issue Jul 12, 2021 · 6 comments
Labels
failed-test A test failure on a tracked branch, potentially flaky-test impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! test-cloud

Comments

@liza-mae
Copy link
Contributor

Version: 7.14.0
Class: X-Pack API Integration Tests1.x-pack/test/api_integration/apis/security/privileges·ts
Stack Trace:

Error: Expected {
 global: [ 'all', 'read' ],
 space: [ 'all', 'read' ],
 features: {
   graph: [ 'all', 'read' ],
   savedObjectsTagging: [ 'all', 'read' ],
   canvas: [ 'all', 'read' ],
   maps: [ 'all', 'read' ],
   fleet: [ 'all', 'read' ],
   actions: [ 'all', 'read' ],
   stackAlerts: [ 'all', 'read' ],
   ml: [ 'all', 'read' ],
   siem: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'cases_all',
     'cases_read'
   ],
   observabilityCases: [ 'all', 'read' ],
   uptime: [ 'all', 'read' ],
   infrastructure: [ 'all', 'read' ],
   logs: [ 'all', 'read' ],
   apm: [ 'all', 'read' ],
   discover: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'url_create',
     'store_search_session'
   ],
   visualize: [ 'all', 'read', 'minimal_all', 'minimal_read', 'url_create' ],
   dashboard: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'url_create',
     'store_search_session'
   ],
   dev_tools: [ 'all', 'read' ],
   advancedSettings: [ 'all', 'read' ],
   indexPatterns: [ 'all', 'read' ],
   savedObjectsManagement: [ 'all', 'read' ],
   timelion: [ 'all', 'read' ]
 },
 reserved: [ 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring' ]
} to equal {
 features: {
   discover: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'url_create',
     'store_search_session',
     'generate_report'
   ],
   visualize: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'url_create',
     'generate_report'
   ],
   dashboard: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'url_create',
     'store_search_session',
     'generate_report',
     'download_csv_report'
   ],
   dev_tools: [ 'all', 'read' ],
   advancedSettings: [ 'all', 'read' ],
   indexPatterns: [ 'all', 'read' ],
   savedObjectsManagement: [ 'all', 'read' ],
   savedObjectsTagging: [ 'all', 'read' ],
   timelion: [ 'all', 'read' ],
   graph: [ 'all', 'read' ],
   maps: [ 'all', 'read' ],
   canvas: [ 'all', 'read', 'minimal_all', 'minimal_read', 'generate_report' ],
   infrastructure: [ 'all', 'read' ],
   logs: [ 'all', 'read' ],
   observabilityCases: [ 'all', 'read' ],
   uptime: [ 'all', 'read' ],
   apm: [ 'all', 'read' ],
   ml: [ 'all', 'read' ],
   siem: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'cases_all',
     'cases_read'
   ],
   fleet: [ 'all', 'read' ],
   stackAlerts: [ 'all', 'read' ],
   actions: [ 'all', 'read' ]
 },
 global: [ 'all', 'read' ],
 space: [ 'all', 'read' ],
 reserved: [ 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring' ]
}
   at /var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/x-pack/test/api_integration/apis/security/privileges.ts:103:21
   at Test._assertFunction (/var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/lib/test.js:283:11)
   at Test.assert (/var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/lib/test.js:173:18)
   at assert (/var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/lib/test.js:131:12)
   at /var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/lib/test.js:128:5
   at Test.Request.callback (/var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:706:12)
   at /var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:906:18
   at IncomingMessage.<anonymous> (/var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
   at endReadableNT (internal/streams/readable.js:1317:12)
   at processTicksAndRejections (internal/process/task_queues.js:82:21)

Other test failures:

Test Report: https://internal-ci.elastic.co/view/Stack%20Tests/job/elastic+estf-cloud-kibana-tests/2013/testReport/

@liza-mae liza-mae added failed-test A test failure on a tracked branch, potentially flaky-test test-cloud labels Jul 12, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 12, 2021
@liza-mae liza-mae added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Jul 12, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jul 12, 2021
@liza-mae
Copy link
Contributor Author

Version: 7.14.0
Class: X-Pack API Integration Tests1.x-pack/test/api_integration/apis/security/privileges·ts
Stack Trace:

Error: Expected {
 global: [ 'all', 'read' ],
 space: [ 'all', 'read' ],
 features: {
   graph: [ 'all', 'read' ],
   savedObjectsTagging: [ 'all', 'read' ],
   canvas: [ 'all', 'read', 'minimal_all', 'minimal_read' ],
   maps: [ 'all', 'read' ],
   fleet: [ 'all', 'read' ],
   actions: [ 'all', 'read' ],
   stackAlerts: [ 'all', 'read' ],
   ml: [ 'all', 'read' ],
   siem: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'cases_all',
     'cases_read'
   ],
   uptime: [ 'all', 'read' ],
   infrastructure: [ 'all', 'read' ],
   logs: [ 'all', 'read' ],
   apm: [ 'all', 'read' ],
   discover: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'url_create',
     'store_search_session',
     'generate_report'
   ],
   visualize: [ 'all', 'read', 'minimal_all', 'minimal_read', 'url_create' ],
   dashboard: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'url_create',
     'store_search_session',
     'download_csv_report'
   ],
   dev_tools: [ 'all', 'read' ],
   advancedSettings: [ 'all', 'read' ],
   indexPatterns: [ 'all', 'read' ],
   savedObjectsManagement: [ 'all', 'read' ],
   timelion: [ 'all', 'read' ]
 },
 reserved: [ 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring' ]
} to equal {
 features: {
   discover: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'url_create',
     'store_search_session',
     'generate_report'
   ],
   visualize: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'url_create',
     'generate_report'
   ],
   dashboard: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'url_create',
     'store_search_session',
     'generate_report',
     'download_csv_report'
   ],
   dev_tools: [ 'all', 'read' ],
   advancedSettings: [ 'all', 'read' ],
   indexPatterns: [ 'all', 'read' ],
   savedObjectsManagement: [ 'all', 'read' ],
   savedObjectsTagging: [ 'all', 'read' ],
   timelion: [ 'all', 'read' ],
   graph: [ 'all', 'read' ],
   maps: [ 'all', 'read' ],
   canvas: [ 'all', 'read', 'minimal_all', 'minimal_read', 'generate_report' ],
   infrastructure: [ 'all', 'read' ],
   logs: [ 'all', 'read' ],
   observabilityCases: [ 'all', 'read' ],
   uptime: [ 'all', 'read' ],
   apm: [ 'all', 'read' ],
   ml: [ 'all', 'read' ],
   siem: [
     'all',
     'read',
     'minimal_all',
     'minimal_read',
     'cases_all',
     'cases_read'
   ],
   fleet: [ 'all', 'read' ],
   stackAlerts: [ 'all', 'read' ],
   actions: [ 'all', 'read' ]
 },
 global: [ 'all', 'read' ],
 space: [ 'all', 'read' ],
 reserved: [ 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring' ]
}
   at /var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/x-pack/test/api_integration/apis/security/privileges.ts:103:21
   at Test._assertFunction (/var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/lib/test.js:283:11)
   at Test.assert (/var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/lib/test.js:173:18)
   at assert (/var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/lib/test.js:131:12)
   at /var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/lib/test.js:128:5
   at Test.Request.callback (/var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:706:12)
   at /var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:906:18
   at IncomingMessage.<anonymous> (/var/lib/jenkins/workspace/elastic+estf-cloud-kibana-tests/JOB/xpackExtGrp1/TASK/saas_run_kibana_tests/node/ess-testing/ci/cloud/common/build/kibana/node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
   at endReadableNT (internal/streams/readable.js:1317:12)
   at processTicksAndRejections (internal/process/task_queues.js:82:21)

Other test failures:

Test Report: https://internal-ci.elastic.co/view/Stack%20Tests/job/elastic+estf-cloud-kibana-tests/2041/testReport/

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Aug 5, 2021
@jportner
Copy link
Contributor

Starting in #94966, we introduced the xpack.reporting.roles.enabled setting. By default this is "true", but when set to "false" it will enable Kibana privileges for Reporting. That PR updated the default config for x-pack functional tests accordingly:

'--xpack.reporting.roles.enabled=false', // use the non-deprecated access control model for Reporting

I seem to remember that Cloud has its own configuration for functional tests, is that correct @liza-mae? If so, that config needs to be updated as well for these functional tests to pass.

@liza-mae
Copy link
Contributor Author

@jportner the setting is configured as xpack.reporting.roles.enabled: false, but this test is still failing.

@jportner
Copy link
Contributor

@elastic/kibana-reporting-services any ideas why else this test could be failing on Cloud?

@liza-mae
Copy link
Contributor Author

Fixed by setting xpack.observability.unsafe.cases.enabled: true

@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! test-cloud
Projects
None yet
Development

No branches or pull requests

4 participants