diff --git a/e2e-tests/cypress.config.ts b/e2e-tests/cypress.config.ts index 196b1df..9ada94f 100644 --- a/e2e-tests/cypress.config.ts +++ b/e2e-tests/cypress.config.ts @@ -6,7 +6,8 @@ export default defineConfig({ password: 'dev', kibanaVersion: 'KIBANA_VERSION_NOT_SET_YET', elasticsearchUrl: 'http://localhost:19200', - enterpriseActivationKey: 'PROVIDE_YOUR_ACTIVATION_KEY' + enterpriseActivationKey: 'PROVIDE_YOUR_ACTIVATION_KEY', + kibanaUserCredentials: "kibana:kibana" }, video: true, screenshotOnRunFailure: true, diff --git a/e2e-tests/cypress/e2e/Activation-keys.cy.ts b/e2e-tests/cypress/e2e/Activation-keys.cy.ts index 8de3567..a1904cb 100644 --- a/e2e-tests/cypress/e2e/Activation-keys.cy.ts +++ b/e2e-tests/cypress/e2e/Activation-keys.cy.ts @@ -1,5 +1,6 @@ import { Login } from '../support/page-objects/Login'; import { ActivationKeys } from '../support/page-objects/ActivationKeys'; +import { userCredentials } from '../support/helpers'; // TODO: describe.skip('Activation key', () => { @@ -9,8 +10,9 @@ describe.skip('Activation key', () => { }); afterEach(() => { - cy.post({ - url: `"${Cypress.config().baseUrl}/api/ror/license?overwrite=true"`, + cy.kbnPost({ + endpoint: "api/ror/license?overwrite=true", + credentials: userCredentials, payload: { license: `${Cypress.env().enterpriseActivationKey}` } }); }); diff --git a/e2e-tests/cypress/e2e/Direct-kibana-request.cy.ts b/e2e-tests/cypress/e2e/Direct-kibana-request.cy.ts index 563e545..3a97a2c 100644 --- a/e2e-tests/cypress/e2e/Direct-kibana-request.cy.ts +++ b/e2e-tests/cypress/e2e/Direct-kibana-request.cy.ts @@ -1,15 +1,15 @@ import * as semver from 'semver'; -import { DataViews, DirectKibanaRequest, GetObject } from '../support/page-objects/DirectKibanaRequest'; -import { getKibanaVersion } from '../support/helpers'; +import { getKibanaVersion, userCredentials } from '../support/helpers'; +import { kbnApiAdvancedClient } from '../support/helpers/KbnApiAdvancedClient'; describe('Direct kibana request', () => { const user = 'user1:dev'; afterEach(() => { const clearDirectKibanaRequestState = () => { - DirectKibanaRequest.deleteSavedObjects(user); + kbnApiAdvancedClient.deleteSavedObjects(user); if (semver.gte(getKibanaVersion(), '8.0.0')) { - DirectKibanaRequest.deleteDataViews(user); + kbnApiAdvancedClient.deleteDataViews(user); } }; @@ -18,70 +18,63 @@ describe('Direct kibana request', () => { it('should check direct kibana request', () => { const verifySavedObjects = () => { - DirectKibanaRequest.deleteSavedObjects(user); + kbnApiAdvancedClient.deleteSavedObjects(user); cy.log('Import saved objects for user1'); - cy.import({ - url: `${Cypress.config().baseUrl}/api/saved_objects/_import?overwrite=true`, - filename: 'cypress/fixtures/file.ndjson', - user + cy.kbnImport({ + endpoint: "api/saved_objects/_import?overwrite=true", + credentials: user, + filename: 'cypress/fixtures/file.ndjson' }); cy.log('Get imported saved objects for user1 Administrators group'); - cy.getRequest({ - url: DirectKibanaRequest.getObjectsUrl(), - user - }).then((result: GetObject) => { + kbnApiAdvancedClient.getSavedObjects(user).then(result => { expect(result.saved_objects[0].id).equal('my-pattern'); expect(result.saved_objects[1].id).equal('my-dashboard'); - }); + }) cy.log('Get imported saved objects for admin Administrators group'); - cy.getRequest({ - url: DirectKibanaRequest.getObjectsUrl() - }).then((result: GetObject) => { - expect(result.saved_objects[0].id).equal('my-pattern'); - expect(result.saved_objects[1].id).equal('my-dashboard'); - expect(result.saved_objects).to.have.length(2); - }); + kbnApiAdvancedClient + .getSavedObjects(userCredentials) + .then(result => { + expect(result.saved_objects[0].id).equal('my-pattern'); + expect(result.saved_objects[1].id).equal('my-dashboard'); + expect(result.saved_objects).to.have.length(2); + }); cy.log('Get imported saved objects for user1 infosec group'); - cy.getRequest({ - url: DirectKibanaRequest.getObjectsUrl(), - user, - header: 'x-ror-current-group: infosec_group' - }).then((result: GetObject) => { - const actual = result.saved_objects.some( - saved_object => saved_object.id === 'my-pattern' || saved_object.id === 'my-dashboard' - ); - // eslint-disable-next-line no-unused-expressions - expect(actual).to.be.false; - }); + kbnApiAdvancedClient.getSavedObjects(user, "infosec_group") + .then(result => { + const actual = result.saved_objects.some( + saved_object => saved_object.id === 'my-pattern' || saved_object.id === 'my-dashboard' + ); + // eslint-disable-next-line no-unused-expressions + expect(actual).to.be.false; + }); }; const verifyDataViews = () => { - DirectKibanaRequest.deleteDataViews(user); + kbnApiAdvancedClient.deleteDataViews(user); cy.log('Create data_views for user1 Administrators group'); - cy.post({ - url: `${Cypress.config().baseUrl}/api/data_views/data_view`, - payload: { + kbnApiAdvancedClient.createDataView( + { data_view: { id: 'logstash', title: 'logstash-*', name: 'My Logstash Data View' } - } - }); + }, + user + ); cy.log('get all data_views for user1 infosec group'); - cy.getRequest({ - url: `${Cypress.config().baseUrl}/api/data_views`, - header: 'x-ror-current-group: infosec_group' - }).then((result: DataViews) => { - const actual = result.data_view.some(saved_object => saved_object.id === 'logstash'); - // eslint-disable-next-line no-unused-expressions - expect(actual).to.be.false; - }); + kbnApiAdvancedClient + .getDataViews(userCredentials, "infosec_group") + .then(result => { + const actual = result.data_view.some(saved_object => saved_object.id === 'logstash'); + // eslint-disable-next-line no-unused-expressions + expect(actual).to.be.false; + }); }; verifySavedObjects(); diff --git a/e2e-tests/cypress/e2e/Kibana-content-overwrite.cy.ts b/e2e-tests/cypress/e2e/Kibana-content-overwrite.cy.ts new file mode 100644 index 0000000..4a0f683 --- /dev/null +++ b/e2e-tests/cypress/e2e/Kibana-content-overwrite.cy.ts @@ -0,0 +1,43 @@ +import * as semver from 'semver'; +import { Login } from '../support/page-objects/Login'; +import { StackManagement } from '../support/page-objects/StackManagement'; +import { KibanaNavigation } from '../support/page-objects/KibanaNavigation'; +import { getKibanaVersion } from '../support/helpers'; + +describe('Kibana-content-overwrite', () => { + beforeEach(() => { + Login.initialization(); + }); + + it('should overwrite Kibana alerting content', () => { + const isAlertingOverwritePageVisible = () => { + if (semver.gte(getKibanaVersion(), '8.6.0')) { + cy.contains( + 'Kibana alerting does not work with ReadonlyREST, but we are working on an even better alerting and reporting solution.' + ).should('be.visible'); + } else { + cy.contains( + 'Kibana alerting does not work with ReadonlyREST, but we are working on an even better alerting and reporting solution.' + ).should('not.exist'); + } + }; + + if (semver.gte(getKibanaVersion(), '8.6.0')) { + if (semver.gte(getKibanaVersion(), '8.14.0')) { + StackManagement.openAlertsPage(); + isAlertingOverwritePageVisible(); + KibanaNavigation.openHomepage(); + } + StackManagement.openRulesPage(); + isAlertingOverwritePageVisible(); + + KibanaNavigation.openHomepage(); + + StackManagement.openConnectorsPage(); + isAlertingOverwritePageVisible(); + } else { + StackManagement.openRulesAndConnectorsPage(); + isAlertingOverwritePageVisible(); + } + }); +}); diff --git a/e2e-tests/cypress/e2e/Sanity-check-ro-kibana-access.cy.ts b/e2e-tests/cypress/e2e/Sanity-check-ro-kibana-access.cy.ts index 5916924..267de7f 100644 --- a/e2e-tests/cypress/e2e/Sanity-check-ro-kibana-access.cy.ts +++ b/e2e-tests/cypress/e2e/Sanity-check-ro-kibana-access.cy.ts @@ -3,6 +3,8 @@ import { RoAndRoStrictKibanaAccessAssertions } from '../support/page-objects/RoA import roSettings from '../fixtures/roSettings.json'; import { Settings } from '../support/page-objects/Settings'; import defaultSettings from '../fixtures/defaultSettings.json'; +import { kbnApiClient, KbnApiClient } from '../support/helpers/KbnApiClient'; +import { userCredentials } from '../support/helpers'; describe('sanity check ro kibana access', () => { beforeEach(() => { @@ -11,10 +13,7 @@ describe('sanity check ro kibana access', () => { afterEach(() => { Settings.setSettingsData(defaultSettings); - cy.deleteRequest({ - url: `${Cypress.config().baseUrl}/api/sample_data/ecommerce`, - header: 'x-ror-current-group: template_group' - }); + kbnApiClient.deleteSampleData("ecommerce", userCredentials, "template_group"); }); it('should verify that everything works', () => { diff --git a/e2e-tests/cypress/e2e/Sanity-check-ro_strict-kibana-access.cy.ts b/e2e-tests/cypress/e2e/Sanity-check-ro_strict-kibana-access.cy.ts index 6ec2e0c..5885142 100644 --- a/e2e-tests/cypress/e2e/Sanity-check-ro_strict-kibana-access.cy.ts +++ b/e2e-tests/cypress/e2e/Sanity-check-ro_strict-kibana-access.cy.ts @@ -3,6 +3,8 @@ import { RoAndRoStrictKibanaAccessAssertions } from '../support/page-objects/RoA import roStrictSettings from '../fixtures/roStrictSettings.json'; import { Settings } from '../support/page-objects/Settings'; import defaultSettings from '../fixtures/defaultSettings.json'; +import { kbnApiClient, KbnApiClient } from '../support/helpers/KbnApiClient'; +import { userCredentials } from '../support/helpers'; describe('sanity check ro_strict kibana access', () => { beforeEach(() => { @@ -11,10 +13,7 @@ describe('sanity check ro_strict kibana access', () => { afterEach(() => { Settings.setSettingsData(defaultSettings); - cy.deleteRequest({ - url: `${Cypress.config().baseUrl}/api/sample_data/ecommerce`, - header: 'x-ror-current-group: template_group' - }); + kbnApiClient.deleteSampleData("ecommerce", userCredentials, "template_group"); }); it('should verify that everything works', () => { diff --git a/e2e-tests/cypress/e2e/Sanity-check.cy.ts b/e2e-tests/cypress/e2e/Sanity-check.cy.ts index 6f6b0f3..2a8d879 100644 --- a/e2e-tests/cypress/e2e/Sanity-check.cy.ts +++ b/e2e-tests/cypress/e2e/Sanity-check.cy.ts @@ -6,74 +6,28 @@ import { Reporting } from '../support/page-objects/Reporting'; import { KibanaNavigation } from '../support/page-objects/KibanaNavigation'; import { getKibanaVersion } from '../support/helpers'; import { Loader } from '../support/page-objects/Loader'; -import { DirectKibanaRequest, GetIndices, GetObject, GetReport } from '../support/page-objects/DirectKibanaRequest'; +import { esApiAdvancedClient } from '../support/helpers/EsApiAdvancedClient'; +import { kbnApiAdvancedClient } from '../support/helpers/KbnApiAdvancedClient'; +import { SampleData } from '../support/helpers/SampleData'; describe('sanity check', () => { beforeEach(() => { + SampleData.createSampleData("sample_index", 1) Login.initialization(); }); afterEach(() => { - const clearSanityCheckState = () => { - cy.getRequest({ url: DirectKibanaRequest.getObjectsUrl() }).then((result: GetObject) => { - result.saved_objects.map(savedObject => - cy.deleteRequest({ url: DirectKibanaRequest.deleteObjectUrl(savedObject.type, savedObject.id) }) - ); - }); - - cy.getRequest({ url: DirectKibanaRequest.getObjectsUrl(), header: 'x-ror-current-group: infosec_group' }).then( - (result: GetObject) => { - result.saved_objects.map(savedObject => - cy.deleteRequest({ - url: DirectKibanaRequest.deleteObjectUrl(savedObject.type, savedObject.id), - header: 'x-ror-current-group: infosec_group' - }) - ); - } - ); - - cy.getRequest({ url: DirectKibanaRequest.getIndices, user: 'kibana:kibana' }).then((result: GetIndices[]) => { - const reportingIndex = result.find(index => index.index.startsWith('.reporting')); - - cy.getRequest({ url: DirectKibanaRequest.getReportUrl(reportingIndex.index) }).then((result: GetReport) => { - result.hits.hits.map(report => - cy.deleteRequest({ - url: DirectKibanaRequest.deleteReportUrl(reportingIndex.index, report._id), - user: 'kibana:kibana' - }) - ); - }); - }); - - cy.getRequest({ - url: DirectKibanaRequest.getIndices, - user: 'kibana:kibana', - header: 'x-ror-current-group: infosec_group' - }).then((result: GetIndices[]) => { - const reportingIndex = result.find(index => index.index.startsWith('.reporting')); - - cy.getRequest({ - url: DirectKibanaRequest.getReportUrl(reportingIndex.index), - header: 'x-ror-current-group: infosec_group' - }).then((result: GetReport) => { - result.hits.hits.map(report => - cy.deleteRequest({ - url: DirectKibanaRequest.deleteReportUrl(reportingIndex.index, report._id), - header: 'x-ror-current-group: infosec_group', - user: 'kibana:kibana' - }) - ); - }); - }); - }; - - clearSanityCheckState(); + esApiAdvancedClient.deleteIndex("sample_index"); + kbnApiAdvancedClient.deleteSavedObjects("admin:dev"); + kbnApiAdvancedClient.deleteSavedObjects("admin:dev", "infosec_group") + esApiAdvancedClient.pruneAllReportingIndices(); }); it('should verify that everything works', () => { cy.log('Initialize Administrator tenancy'); + Discover.openDataViewPage(); - Discover.createIndexPattern('r'); + Discover.createIndexPattern('s'); cy.log('Create a CSV report'); Discover.saveReport('admin_search'); @@ -86,16 +40,16 @@ describe('sanity check', () => { if (semver.gte(getKibanaVersion(), '8.8.0')) { Reporting.noReportsCreatedCheck('rorMenu'); RorMenu.openDataViewsPage(); - Discover.createIndexPattern('re'); + Discover.createIndexPattern('sa'); } else if (semver.gte(getKibanaVersion(), '8.1.0')) { Reporting.noReportsCreatedCheck('rorMenu'); RorMenu.openDataViewsPage(); Discover.openDataViewPage(); - Discover.createIndexPattern('re'); + Discover.createIndexPattern('sa'); } else { Reporting.noReportsCreatedCheck('rorMenu'); Discover.openDataViewPage(); - Discover.createIndexPattern('re'); + Discover.createIndexPattern('sa'); cy.log('Create CSV report for the second tenancy'); Discover.saveReport('infosec_search'); diff --git a/e2e-tests/cypress/e2e/Saved-objects.cy.ts b/e2e-tests/cypress/e2e/Saved-objects.cy.ts index 70377c6..2a098f0 100644 --- a/e2e-tests/cypress/e2e/Saved-objects.cy.ts +++ b/e2e-tests/cypress/e2e/Saved-objects.cy.ts @@ -1,8 +1,8 @@ import * as semver from 'semver'; import { Login } from '../support/page-objects/Login'; import { StackManagement } from '../support/page-objects/StackManagement'; -import { DirectKibanaRequest, GetObject } from '../support/page-objects/DirectKibanaRequest'; import { getKibanaVersion } from '../support/helpers'; +import { kbnApiAdvancedClient } from '../support/helpers/KbnApiAdvancedClient'; describe('Saved objects', () => { beforeEach(() => { @@ -11,15 +11,7 @@ describe('Saved objects', () => { }); afterEach(() => { - const clearSavedObjects = () => { - cy.getRequest({ url: DirectKibanaRequest.getObjectsUrl() }).then((result: GetObject) => { - result.saved_objects.map(savedObject => - cy.deleteRequest({ url: DirectKibanaRequest.deleteObjectUrl(savedObject.type, savedObject.id) }) - ); - }); - }; - - clearSavedObjects(); + kbnApiAdvancedClient.deleteSavedObjects("admin:dev"); }); it('should display saved objects list', () => { diff --git a/e2e-tests/cypress/fixtures/defaultSettings.json b/e2e-tests/cypress/fixtures/defaultSettings.json index 534e79e..8128f51 100644 --- a/e2e-tests/cypress/fixtures/defaultSettings.json +++ b/e2e-tests/cypress/fixtures/defaultSettings.json @@ -1,3 +1,3 @@ { - "settings": "helpers:\n cr: &common-rules\n verbosity: error\n kibana_access: rw\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: \".kibana_@{acl:current_group}\"\n\n ag: &all-groups\n groups:\n - id: admins_group\n name: administrators\n - id: infosec_group\n name: infosec\n - id: template_group\n name: template\n\n\nreadonlyrest:\n response_if_req_forbidden: Forbidden by ReadonlyREST ES plugin\n prompt_for_basic_auth: false\n audit:\n enabled: true\n outputs:\n - type: index\n index_template: \"'readonlyrest-audit-'-yyyy-MM-dd\"\n serializer: tech.beshu.ror.requestcontext.QueryAuditLogSerializer\n\n access_control_rules:\n - name: KIBANA_SERVER\n auth_key: kibana:kibana\n verbosity: error\n\n - name: PERSONAL_GRP\n groups: [ Personal ]\n <<: *common-rules\n kibana_index: '.kibana_@{user}'\n\n - name: ADMIN_GRP\n groups: [ admins_group ]\n <<: *common-rules\n kibana_access: admin\n\n # - name: infosec4search\n # groups: [ infosec_group ]\n # indices: [\"readonlyrest_audit*\"]\n # #filter: '{\"bool\": { \"must_not\": { \"match\": { \"type\": \"xxxx\" }}}}'\n # kibana_index: .kibana_infosec_group\n # verbosity: error\n\n - name: infosec\n groups: [ infosec_group ]\n <<: *common-rules\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\", \"Management\" ]\n\n - name: Template Tenancy\n groups: [ template_group ]\n <<: *common-rules\n\n - name: \"ReadonlyREST Enterprise instance #1\"\n kibana_index: \".kibana_external_auth\"\n ror_kbn_auth:\n name: \"kbn1\"\n\n # USERS TO GROUPS ############\n users:\n - username: admin\n auth_key: admin:dev\n <<: *all-groups\n\n - username: user1\n auth_key: user1:dev\n <<: *all-groups\n\n ror_kbn:\n - name: kbn1\n signature_key: \"9yzBfnLaTYLfGPzyKW9es76RKYhUVgmuv6ZtehaScj5msGpBpa5FWpwk295uJYaaffTFnQC5tsknh2AguVDaTrqCLfM5zCTqdE4UGNL73h28Bg4dPrvTAFQyygQqv4xfgnevBED6VZYdfjXAQLc8J8ywaHQQSmprZqYCWGE6sM3vzNUEWWB3kmGrEKa4sGbXhmXZCvL6NDnEJhXPDJAzu9BMQxn8CzVLqrx6BxDgPYF8gZCxtyxMckXwCaYXrxAGbjkYH69F4wYhuAdHSWgRAQCuWwYmWCA6g39j4VPge5pv962XYvxwJpvn23Y5KvNZ5S5c6crdG4f4gTCXnU36x92fKMQzsQV9K4phcuNvMWkpqVB6xMA5aPzUeHcGytD93dG8D52P5BxsgaJJE6QqDrk3Y2vyLw9ZEbJhPRJxbuBKVCBtVx26Ldd46dq5eyyzmNEyQGLrjQ4qd978VtG8TNT5rkn4ETJQEju5HfCBbjm3urGLFVqxhGVawecT4YM9Rry4EqXWkRJGTFQWQRnweUFbKNbVTC9NxcXEp6K5rSPEy9trb5UYLYhhMJ9fWSBMuenGRjNSJxeurMRCaxPpNppBLFnp8qW5ezfHgCBpEjkSNNzP4uXMZFAXmdUfJ8XQdPTWuYfdHYc5TZWnzrdq9wcfFQRDpDB2zX5Myu96krDt9vA7wNKfYwkSczA6qUQV66jA8nV4Cs38cDAKVBXnxz22ddAVrPv8ajpu7hgBtULMURjvLt94Nc5FDKw79CTTQxffWEj9BJCDCpQnTufmT8xenywwVJvtj49yv2MP2mGECrVDRmcGUAYBKR8G6ZnFAYDVC9UhY46FGWDcyVX3HKwgtHeb45Ww7dsW8JdMnZYctaEU585GZmqTJp2LcAWRcQPH25JewnPX8pjzVpJNcy7avfA2bcU86bfASvQBDUCrhjgRmK2ECR6vzPwTsYKRgFrDqb62FeMdrKgJ9vKs435T5ACN7MNtdRXHQ4fj5pNpUMDW26Wd7tt9bkBTqEGf\"\n\n impersonation:\n - impersonator: admin\n users: [\"*\"]\n auth_key: admin:dev\n" + "settings": "helpers:\n cr: &common-rules\n kibana_access: rw\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: \".kibana_@{acl:current_group}\"\n\n ag: &all-groups\n groups:\n - id: admins_group\n name: administrators\n - id: infosec_group\n name: infosec\n - id: template_group\n name: template\n\n\nreadonlyrest:\n response_if_req_forbidden: Forbidden by ReadonlyREST ES plugin\n prompt_for_basic_auth: false\n audit:\n enabled: true\n outputs:\n - type: index\n index_template: \"'readonlyrest_audit_'yyyy-MM-dd\"\n serializer: tech.beshu.ror.requestcontext.QueryAuditLogSerializer\n\n access_control_rules:\n - name: KIBANA_SERVER\n auth_key: kibana:kibana\n verbosity: error\n\n - name: PERSONAL_GRP\n groups: [ Personal ]\n <<: *common-rules\n kibana_index: '.kibana_@{user}'\n\n - name: ADMIN_GRP\n groups: [ admins_group ]\n <<: *common-rules\n kibana_access: admin\n\n # - name: infosec4search\n # groups: [ infosec_group ]\n # indices: [\"readonlyrest_audit*\"]\n # #filter: '{\"bool\": { \"must_not\": { \"match\": { \"type\": \"xxxx\" }}}}'\n # kibana_index: .kibana_infosec_group\n # verbosity: error\n\n - name: infosec\n groups: [ infosec_group ]\n <<: *common-rules\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\", \"Management\" ]\n\n - name: Template Tenancy\n groups: [ template_group ]\n <<: *common-rules\n\n - name: \"ReadonlyREST Enterprise instance #1\"\n kibana_index: \".kibana_external_auth\"\n ror_kbn_auth:\n name: \"kbn1\"\n\n # USERS TO GROUPS ############\n users:\n - username: admin\n auth_key: admin:dev\n <<: *all-groups\n\n - username: user1\n auth_key: user1:dev\n <<: *all-groups\n\n ror_kbn:\n - name: kbn1\n signature_key: \"9yzBfnLaTYLfGPzyKW9es76RKYhUVgmuv6ZtehaScj5msGpBpa5FWpwk295uJYaaffTFnQC5tsknh2AguVDaTrqCLfM5zCTqdE4UGNL73h28Bg4dPrvTAFQyygQqv4xfgnevBED6VZYdfjXAQLc8J8ywaHQQSmprZqYCWGE6sM3vzNUEWWB3kmGrEKa4sGbXhmXZCvL6NDnEJhXPDJAzu9BMQxn8CzVLqrx6BxDgPYF8gZCxtyxMckXwCaYXrxAGbjkYH69F4wYhuAdHSWgRAQCuWwYmWCA6g39j4VPge5pv962XYvxwJpvn23Y5KvNZ5S5c6crdG4f4gTCXnU36x92fKMQzsQV9K4phcuNvMWkpqVB6xMA5aPzUeHcGytD93dG8D52P5BxsgaJJE6QqDrk3Y2vyLw9ZEbJhPRJxbuBKVCBtVx26Ldd46dq5eyyzmNEyQGLrjQ4qd978VtG8TNT5rkn4ETJQEju5HfCBbjm3urGLFVqxhGVawecT4YM9Rry4EqXWkRJGTFQWQRnweUFbKNbVTC9NxcXEp6K5rSPEy9trb5UYLYhhMJ9fWSBMuenGRjNSJxeurMRCaxPpNppBLFnp8qW5ezfHgCBpEjkSNNzP4uXMZFAXmdUfJ8XQdPTWuYfdHYc5TZWnzrdq9wcfFQRDpDB2zX5Myu96krDt9vA7wNKfYwkSczA6qUQV66jA8nV4Cs38cDAKVBXnxz22ddAVrPv8ajpu7hgBtULMURjvLt94Nc5FDKw79CTTQxffWEj9BJCDCpQnTufmT8xenywwVJvtj49yv2MP2mGECrVDRmcGUAYBKR8G6ZnFAYDVC9UhY46FGWDcyVX3HKwgtHeb45Ww7dsW8JdMnZYctaEU585GZmqTJp2LcAWRcQPH25JewnPX8pjzVpJNcy7avfA2bcU86bfASvQBDUCrhjgRmK2ECR6vzPwTsYKRgFrDqb62FeMdrKgJ9vKs435T5ACN7MNtdRXHQ4fj5pNpUMDW26Wd7tt9bkBTqEGf\"\n\n impersonation:\n - impersonator: admin\n users: [\"*\"]\n auth_key: admin:dev\n" } diff --git a/e2e-tests/cypress/fixtures/reportingSettings.json b/e2e-tests/cypress/fixtures/reportingSettings.json index dd62a9f..80d9032 100644 --- a/e2e-tests/cypress/fixtures/reportingSettings.json +++ b/e2e-tests/cypress/fixtures/reportingSettings.json @@ -1,3 +1,3 @@ { - "settings": "helpers:\n cr: &common-rules\n verbosity: error\n kibana_access: rw\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: \".kibana_@{acl:current_group}\"\n\n ag: &all-groups\n groups:\n - id: admins_group\n name: administrators\n - id: infosec_group\n name: infosec\n - id: template_group\n name: template\n\n\nreadonlyrest:\n response_if_req_forbidden: Forbidden by ReadonlyREST ES plugin\n prompt_for_basic_auth: false\n audit:\n enabled: true\n outputs:\n - type: index\n index_template: \"'xxx.reporting-'YYYY-MM\"\n serializer: tech.beshu.ror.requestcontext.QueryAuditLogSerializer\n\n access_control_rules:\n - name: KIBANA_SERVER\n auth_key: kibana:kibana\n verbosity: error\n\n - name: PERSONAL_GRP\n groups: [ personal_group ]\n <<: *common-rules\n kibana_index: '.kibana_@{user}'\n\n - name: ADMIN_GRP\n groups: [ admins_group ]\n <<: *common-rules\n kibana_access: admin\n\n # - name: infosec4search\n # groups: [ infosec_group ]\n # indices: [\"readonlyrest_audit*\"]\n # #filter: '{\"bool\": { \"must_not\": { \"match\": { \"type\": \"xxxx\" }}}}'\n # kibana_index: .kibana_infosec\n # verbosity: error\n\n - name: infosec\n groups: [ infosec_group ]\n <<: *common-rules\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\", \"Management\" ]\n\n - name: Template Tenancy\n groups: [ template_group ]\n <<: *common-rules\n\n - name: \"ReadonlyREST Enterprise instance #1\"\n kibana_index: \".kibana_external_auth\"\n ror_kbn_auth:\n name: \"kbn1\"\n\n # USERS TO GROUPS ############\n users:\n - username: admin\n auth_key: admin:dev\n <<: *all-groups\n\n - username: user1\n auth_key: user1:dev\n <<: *all-groups\n\n ror_kbn:\n - name: kbn1\n signature_key: \"9yzBfnLaTYLfGPzyKW9es76RKYhUVgmuv6ZtehaScj5msGpBpa5FWpwk295uJYaaffTFnQC5tsknh2AguVDaTrqCLfM5zCTqdE4UGNL73h28Bg4dPrvTAFQyygQqv4xfgnevBED6VZYdfjXAQLc8J8ywaHQQSmprZqYCWGE6sM3vzNUEWWB3kmGrEKa4sGbXhmXZCvL6NDnEJhXPDJAzu9BMQxn8CzVLqrx6BxDgPYF8gZCxtyxMckXwCaYXrxAGbjkYH69F4wYhuAdHSWgRAQCuWwYmWCA6g39j4VPge5pv962XYvxwJpvn23Y5KvNZ5S5c6crdG4f4gTCXnU36x92fKMQzsQV9K4phcuNvMWkpqVB6xMA5aPzUeHcGytD93dG8D52P5BxsgaJJE6QqDrk3Y2vyLw9ZEbJhPRJxbuBKVCBtVx26Ldd46dq5eyyzmNEyQGLrjQ4qd978VtG8TNT5rkn4ETJQEju5HfCBbjm3urGLFVqxhGVawecT4YM9Rry4EqXWkRJGTFQWQRnweUFbKNbVTC9NxcXEp6K5rSPEy9trb5UYLYhhMJ9fWSBMuenGRjNSJxeurMRCaxPpNppBLFnp8qW5ezfHgCBpEjkSNNzP4uXMZFAXmdUfJ8XQdPTWuYfdHYc5TZWnzrdq9wcfFQRDpDB2zX5Myu96krDt9vA7wNKfYwkSczA6qUQV66jA8nV4Cs38cDAKVBXnxz22ddAVrPv8ajpu7hgBtULMURjvLt94Nc5FDKw79CTTQxffWEj9BJCDCpQnTufmT8xenywwVJvtj49yv2MP2mGECrVDRmcGUAYBKR8G6ZnFAYDVC9UhY46FGWDcyVX3HKwgtHeb45Ww7dsW8JdMnZYctaEU585GZmqTJp2LcAWRcQPH25JewnPX8pjzVpJNcy7avfA2bcU86bfASvQBDUCrhjgRmK2ECR6vzPwTsYKRgFrDqb62FeMdrKgJ9vKs435T5ACN7MNtdRXHQ4fj5pNpUMDW26Wd7tt9bkBTqEGf\"\n\n impersonation:\n - impersonator: admin\n users: [\"*\"]\n auth_key: admin:dev\n" + "settings": "helpers:\n cr: &common-rules\n kibana_access: rw\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: \".kibana_@{acl:current_group}\"\n\n ag: &all-groups\n groups:\n - id: admins_group\n name: administrators\n - id: infosec_group\n name: infosec\n - id: template_group\n name: template\n\n\nreadonlyrest:\n response_if_req_forbidden: Forbidden by ReadonlyREST ES plugin\n prompt_for_basic_auth: false\n audit:\n enabled: true\n outputs:\n - type: index\n index_template: \"'xxx.reporting-'YYYY-MM\"\n serializer: tech.beshu.ror.requestcontext.QueryAuditLogSerializer\n\n access_control_rules:\n - name: KIBANA_SERVER\n auth_key: kibana:kibana\n verbosity: error\n\n - name: PERSONAL_GRP\n groups: [ personal_group ]\n <<: *common-rules\n kibana_index: '.kibana_@{user}'\n\n - name: ADMIN_GRP\n groups: [ admins_group ]\n <<: *common-rules\n kibana_access: admin\n\n # - name: infosec4search\n # groups: [ infosec_group ]\n # indices: [\"readonlyrest_audit*\"]\n # #filter: '{\"bool\": { \"must_not\": { \"match\": { \"type\": \"xxxx\" }}}}'\n # kibana_index: .kibana_infosec\n # verbosity: error\n\n - name: infosec\n groups: [ infosec_group ]\n <<: *common-rules\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\", \"Management\" ]\n\n - name: Template Tenancy\n groups: [ template_group ]\n <<: *common-rules\n\n - name: \"ReadonlyREST Enterprise instance #1\"\n kibana_index: \".kibana_external_auth\"\n ror_kbn_auth:\n name: \"kbn1\"\n\n # USERS TO GROUPS ############\n users:\n - username: admin\n auth_key: admin:dev\n <<: *all-groups\n\n - username: user1\n auth_key: user1:dev\n <<: *all-groups\n\n ror_kbn:\n - name: kbn1\n signature_key: \"9yzBfnLaTYLfGPzyKW9es76RKYhUVgmuv6ZtehaScj5msGpBpa5FWpwk295uJYaaffTFnQC5tsknh2AguVDaTrqCLfM5zCTqdE4UGNL73h28Bg4dPrvTAFQyygQqv4xfgnevBED6VZYdfjXAQLc8J8ywaHQQSmprZqYCWGE6sM3vzNUEWWB3kmGrEKa4sGbXhmXZCvL6NDnEJhXPDJAzu9BMQxn8CzVLqrx6BxDgPYF8gZCxtyxMckXwCaYXrxAGbjkYH69F4wYhuAdHSWgRAQCuWwYmWCA6g39j4VPge5pv962XYvxwJpvn23Y5KvNZ5S5c6crdG4f4gTCXnU36x92fKMQzsQV9K4phcuNvMWkpqVB6xMA5aPzUeHcGytD93dG8D52P5BxsgaJJE6QqDrk3Y2vyLw9ZEbJhPRJxbuBKVCBtVx26Ldd46dq5eyyzmNEyQGLrjQ4qd978VtG8TNT5rkn4ETJQEju5HfCBbjm3urGLFVqxhGVawecT4YM9Rry4EqXWkRJGTFQWQRnweUFbKNbVTC9NxcXEp6K5rSPEy9trb5UYLYhhMJ9fWSBMuenGRjNSJxeurMRCaxPpNppBLFnp8qW5ezfHgCBpEjkSNNzP4uXMZFAXmdUfJ8XQdPTWuYfdHYc5TZWnzrdq9wcfFQRDpDB2zX5Myu96krDt9vA7wNKfYwkSczA6qUQV66jA8nV4Cs38cDAKVBXnxz22ddAVrPv8ajpu7hgBtULMURjvLt94Nc5FDKw79CTTQxffWEj9BJCDCpQnTufmT8xenywwVJvtj49yv2MP2mGECrVDRmcGUAYBKR8G6ZnFAYDVC9UhY46FGWDcyVX3HKwgtHeb45Ww7dsW8JdMnZYctaEU585GZmqTJp2LcAWRcQPH25JewnPX8pjzVpJNcy7avfA2bcU86bfASvQBDUCrhjgRmK2ECR6vzPwTsYKRgFrDqb62FeMdrKgJ9vKs435T5ACN7MNtdRXHQ4fj5pNpUMDW26Wd7tt9bkBTqEGf\"\n\n impersonation:\n - impersonator: admin\n users: [\"*\"]\n auth_key: admin:dev\n" } diff --git a/e2e-tests/cypress/fixtures/roSettings.json b/e2e-tests/cypress/fixtures/roSettings.json index 9ac6acb..20e5716 100644 --- a/e2e-tests/cypress/fixtures/roSettings.json +++ b/e2e-tests/cypress/fixtures/roSettings.json @@ -1,3 +1,3 @@ { - "settings": "helpers:\n cr: &common-rules\n verbosity: error\n kibana_access: ro\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: \".kibana_@{acl:current_group}\"\n\n ag: &all-groups\n groups:\n - id: admins_group\n name: administrators\n - id: infosec_group\n name: infosec\n - id: template_group\n name: template\n\n\nreadonlyrest:\n response_if_req_forbidden: Forbidden by ReadonlyREST ES plugin\n prompt_for_basic_auth: false\n audit:\n enabled: true\n outputs:\n - type: index\n index_template: \"'readonlyrest-audit-'-yyyy-MM-dd\"\n serializer: tech.beshu.ror.requestcontext.QueryAuditLogSerializer\n\n access_control_rules:\n - name: KIBANA_SERVER\n auth_key: kibana:kibana\n verbosity: error\n\n - name: PERSONAL_GRP\n groups: [ personal_group ]\n <<: *common-rules\n kibana_index: '.kibana_@{user}'\n\n - name: ADMIN_GRP\n groups: [ admins_group ]\n <<: *common-rules\n kibana_access: admin\n\n # - name: infosec4search\n # groups: [ infosec_group ]\n # indices: [\"readonlyrest_audit*\"]\n # #filter: '{\"bool\": { \"must_not\": { \"match\": { \"type\": \"xxxx\" }}}}'\n # kibana_index: .kibana_infosec\n # verbosity: error\n\n - name: infosec\n groups: [ infosec_group ]\n <<: *common-rules\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\", \"Management\" ]\n\n - name: Template Tenancy\n groups: [ template_group ]\n <<: *common-rules\n\n - name: \"ReadonlyREST Enterprise instance #1\"\n kibana_index: \".kibana_external_auth\"\n ror_kbn_auth:\n name: \"kbn1\"\n\n # USERS TO GROUPS ############\n users:\n - username: admin\n auth_key: admin:dev\n <<: *all-groups\n\n - username: user1\n auth_key: user1:dev\n <<: *all-groups\n\n ror_kbn:\n - name: kbn1\n signature_key: \"9yzBfnLaTYLfGPzyKW9es76RKYhUVgmuv6ZtehaScj5msGpBpa5FWpwk295uJYaaffTFnQC5tsknh2AguVDaTrqCLfM5zCTqdE4UGNL73h28Bg4dPrvTAFQyygQqv4xfgnevBED6VZYdfjXAQLc8J8ywaHQQSmprZqYCWGE6sM3vzNUEWWB3kmGrEKa4sGbXhmXZCvL6NDnEJhXPDJAzu9BMQxn8CzVLqrx6BxDgPYF8gZCxtyxMckXwCaYXrxAGbjkYH69F4wYhuAdHSWgRAQCuWwYmWCA6g39j4VPge5pv962XYvxwJpvn23Y5KvNZ5S5c6crdG4f4gTCXnU36x92fKMQzsQV9K4phcuNvMWkpqVB6xMA5aPzUeHcGytD93dG8D52P5BxsgaJJE6QqDrk3Y2vyLw9ZEbJhPRJxbuBKVCBtVx26Ldd46dq5eyyzmNEyQGLrjQ4qd978VtG8TNT5rkn4ETJQEju5HfCBbjm3urGLFVqxhGVawecT4YM9Rry4EqXWkRJGTFQWQRnweUFbKNbVTC9NxcXEp6K5rSPEy9trb5UYLYhhMJ9fWSBMuenGRjNSJxeurMRCaxPpNppBLFnp8qW5ezfHgCBpEjkSNNzP4uXMZFAXmdUfJ8XQdPTWuYfdHYc5TZWnzrdq9wcfFQRDpDB2zX5Myu96krDt9vA7wNKfYwkSczA6qUQV66jA8nV4Cs38cDAKVBXnxz22ddAVrPv8ajpu7hgBtULMURjvLt94Nc5FDKw79CTTQxffWEj9BJCDCpQnTufmT8xenywwVJvtj49yv2MP2mGECrVDRmcGUAYBKR8G6ZnFAYDVC9UhY46FGWDcyVX3HKwgtHeb45Ww7dsW8JdMnZYctaEU585GZmqTJp2LcAWRcQPH25JewnPX8pjzVpJNcy7avfA2bcU86bfASvQBDUCrhjgRmK2ECR6vzPwTsYKRgFrDqb62FeMdrKgJ9vKs435T5ACN7MNtdRXHQ4fj5pNpUMDW26Wd7tt9bkBTqEGf\"\n\n impersonation:\n - impersonator: admin\n users: [\"*\"]\n auth_key: admin:dev\n" + "settings": "helpers:\n cr: &common-rules\n kibana_access: ro\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: \".kibana_@{acl:current_group}\"\n\n ag: &all-groups\n groups:\n - id: admins_group\n name: administrators\n - id: infosec_group\n name: infosec\n - id: template_group\n name: template\n\n\nreadonlyrest:\n response_if_req_forbidden: Forbidden by ReadonlyREST ES plugin\n prompt_for_basic_auth: false\n audit:\n enabled: true\n outputs:\n - type: index\n index_template: \"'readonlyrest_audit_'yyyy-MM-dd\"\n serializer: tech.beshu.ror.requestcontext.QueryAuditLogSerializer\n\n access_control_rules:\n - name: KIBANA_SERVER\n auth_key: kibana:kibana\n verbosity: error\n\n - name: PERSONAL_GRP\n groups: [ personal_group ]\n <<: *common-rules\n kibana_index: '.kibana_@{user}'\n\n - name: ADMIN_GRP\n groups: [ admins_group ]\n <<: *common-rules\n kibana_access: admin\n\n # - name: infosec4search\n # groups: [ infosec_group ]\n # indices: [\"readonlyrest_audit*\"]\n # #filter: '{\"bool\": { \"must_not\": { \"match\": { \"type\": \"xxxx\" }}}}'\n # kibana_index: .kibana_infosec\n # verbosity: error\n\n - name: infosec\n groups: [ infosec_group ]\n <<: *common-rules\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\", \"Management\" ]\n\n - name: Template Tenancy\n groups: [ template_group ]\n <<: *common-rules\n\n - name: \"ReadonlyREST Enterprise instance #1\"\n kibana_index: \".kibana_external_auth\"\n ror_kbn_auth:\n name: \"kbn1\"\n\n # USERS TO GROUPS ############\n users:\n - username: admin\n auth_key: admin:dev\n <<: *all-groups\n\n - username: user1\n auth_key: user1:dev\n <<: *all-groups\n\n ror_kbn:\n - name: kbn1\n signature_key: \"9yzBfnLaTYLfGPzyKW9es76RKYhUVgmuv6ZtehaScj5msGpBpa5FWpwk295uJYaaffTFnQC5tsknh2AguVDaTrqCLfM5zCTqdE4UGNL73h28Bg4dPrvTAFQyygQqv4xfgnevBED6VZYdfjXAQLc8J8ywaHQQSmprZqYCWGE6sM3vzNUEWWB3kmGrEKa4sGbXhmXZCvL6NDnEJhXPDJAzu9BMQxn8CzVLqrx6BxDgPYF8gZCxtyxMckXwCaYXrxAGbjkYH69F4wYhuAdHSWgRAQCuWwYmWCA6g39j4VPge5pv962XYvxwJpvn23Y5KvNZ5S5c6crdG4f4gTCXnU36x92fKMQzsQV9K4phcuNvMWkpqVB6xMA5aPzUeHcGytD93dG8D52P5BxsgaJJE6QqDrk3Y2vyLw9ZEbJhPRJxbuBKVCBtVx26Ldd46dq5eyyzmNEyQGLrjQ4qd978VtG8TNT5rkn4ETJQEju5HfCBbjm3urGLFVqxhGVawecT4YM9Rry4EqXWkRJGTFQWQRnweUFbKNbVTC9NxcXEp6K5rSPEy9trb5UYLYhhMJ9fWSBMuenGRjNSJxeurMRCaxPpNppBLFnp8qW5ezfHgCBpEjkSNNzP4uXMZFAXmdUfJ8XQdPTWuYfdHYc5TZWnzrdq9wcfFQRDpDB2zX5Myu96krDt9vA7wNKfYwkSczA6qUQV66jA8nV4Cs38cDAKVBXnxz22ddAVrPv8ajpu7hgBtULMURjvLt94Nc5FDKw79CTTQxffWEj9BJCDCpQnTufmT8xenywwVJvtj49yv2MP2mGECrVDRmcGUAYBKR8G6ZnFAYDVC9UhY46FGWDcyVX3HKwgtHeb45Ww7dsW8JdMnZYctaEU585GZmqTJp2LcAWRcQPH25JewnPX8pjzVpJNcy7avfA2bcU86bfASvQBDUCrhjgRmK2ECR6vzPwTsYKRgFrDqb62FeMdrKgJ9vKs435T5ACN7MNtdRXHQ4fj5pNpUMDW26Wd7tt9bkBTqEGf\"\n\n impersonation:\n - impersonator: admin\n users: [\"*\"]\n auth_key: admin:dev\n" } diff --git a/e2e-tests/cypress/fixtures/roStrictSettings.json b/e2e-tests/cypress/fixtures/roStrictSettings.json index 9ac6acb..1049a08 100644 --- a/e2e-tests/cypress/fixtures/roStrictSettings.json +++ b/e2e-tests/cypress/fixtures/roStrictSettings.json @@ -1,3 +1,3 @@ { - "settings": "helpers:\n cr: &common-rules\n verbosity: error\n kibana_access: ro\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: \".kibana_@{acl:current_group}\"\n\n ag: &all-groups\n groups:\n - id: admins_group\n name: administrators\n - id: infosec_group\n name: infosec\n - id: template_group\n name: template\n\n\nreadonlyrest:\n response_if_req_forbidden: Forbidden by ReadonlyREST ES plugin\n prompt_for_basic_auth: false\n audit:\n enabled: true\n outputs:\n - type: index\n index_template: \"'readonlyrest-audit-'-yyyy-MM-dd\"\n serializer: tech.beshu.ror.requestcontext.QueryAuditLogSerializer\n\n access_control_rules:\n - name: KIBANA_SERVER\n auth_key: kibana:kibana\n verbosity: error\n\n - name: PERSONAL_GRP\n groups: [ personal_group ]\n <<: *common-rules\n kibana_index: '.kibana_@{user}'\n\n - name: ADMIN_GRP\n groups: [ admins_group ]\n <<: *common-rules\n kibana_access: admin\n\n # - name: infosec4search\n # groups: [ infosec_group ]\n # indices: [\"readonlyrest_audit*\"]\n # #filter: '{\"bool\": { \"must_not\": { \"match\": { \"type\": \"xxxx\" }}}}'\n # kibana_index: .kibana_infosec\n # verbosity: error\n\n - name: infosec\n groups: [ infosec_group ]\n <<: *common-rules\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\", \"Management\" ]\n\n - name: Template Tenancy\n groups: [ template_group ]\n <<: *common-rules\n\n - name: \"ReadonlyREST Enterprise instance #1\"\n kibana_index: \".kibana_external_auth\"\n ror_kbn_auth:\n name: \"kbn1\"\n\n # USERS TO GROUPS ############\n users:\n - username: admin\n auth_key: admin:dev\n <<: *all-groups\n\n - username: user1\n auth_key: user1:dev\n <<: *all-groups\n\n ror_kbn:\n - name: kbn1\n signature_key: \"9yzBfnLaTYLfGPzyKW9es76RKYhUVgmuv6ZtehaScj5msGpBpa5FWpwk295uJYaaffTFnQC5tsknh2AguVDaTrqCLfM5zCTqdE4UGNL73h28Bg4dPrvTAFQyygQqv4xfgnevBED6VZYdfjXAQLc8J8ywaHQQSmprZqYCWGE6sM3vzNUEWWB3kmGrEKa4sGbXhmXZCvL6NDnEJhXPDJAzu9BMQxn8CzVLqrx6BxDgPYF8gZCxtyxMckXwCaYXrxAGbjkYH69F4wYhuAdHSWgRAQCuWwYmWCA6g39j4VPge5pv962XYvxwJpvn23Y5KvNZ5S5c6crdG4f4gTCXnU36x92fKMQzsQV9K4phcuNvMWkpqVB6xMA5aPzUeHcGytD93dG8D52P5BxsgaJJE6QqDrk3Y2vyLw9ZEbJhPRJxbuBKVCBtVx26Ldd46dq5eyyzmNEyQGLrjQ4qd978VtG8TNT5rkn4ETJQEju5HfCBbjm3urGLFVqxhGVawecT4YM9Rry4EqXWkRJGTFQWQRnweUFbKNbVTC9NxcXEp6K5rSPEy9trb5UYLYhhMJ9fWSBMuenGRjNSJxeurMRCaxPpNppBLFnp8qW5ezfHgCBpEjkSNNzP4uXMZFAXmdUfJ8XQdPTWuYfdHYc5TZWnzrdq9wcfFQRDpDB2zX5Myu96krDt9vA7wNKfYwkSczA6qUQV66jA8nV4Cs38cDAKVBXnxz22ddAVrPv8ajpu7hgBtULMURjvLt94Nc5FDKw79CTTQxffWEj9BJCDCpQnTufmT8xenywwVJvtj49yv2MP2mGECrVDRmcGUAYBKR8G6ZnFAYDVC9UhY46FGWDcyVX3HKwgtHeb45Ww7dsW8JdMnZYctaEU585GZmqTJp2LcAWRcQPH25JewnPX8pjzVpJNcy7avfA2bcU86bfASvQBDUCrhjgRmK2ECR6vzPwTsYKRgFrDqb62FeMdrKgJ9vKs435T5ACN7MNtdRXHQ4fj5pNpUMDW26Wd7tt9bkBTqEGf\"\n\n impersonation:\n - impersonator: admin\n users: [\"*\"]\n auth_key: admin:dev\n" + "settings": "helpers:\n cr: &common-rules\n kibana_access: ro\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: \".kibana_@{acl:current_group}\"\n\n ag: &all-groups\n groups:\n - id: admins_group\n name: administrators\n - id: infosec_group\n name: infosec\n - id: template_group\n name: template\n\n\nreadonlyrest:\n response_if_req_forbidden: Forbidden by ReadonlyREST ES plugin\n prompt_for_basic_auth: false\n audit:\n enabled: true\n outputs:\n - type: index\n index_template: \"'readonlyrest_audit'-yyyy-MM-dd\"\n serializer: tech.beshu.ror.requestcontext.QueryAuditLogSerializer\n\n access_control_rules:\n - name: KIBANA_SERVER\n auth_key: kibana:kibana\n verbosity: error\n\n - name: PERSONAL_GRP\n groups: [ personal_group ]\n <<: *common-rules\n kibana_index: '.kibana_@{user}'\n\n - name: ADMIN_GRP\n groups: [ admins_group ]\n <<: *common-rules\n kibana_access: admin\n\n # - name: infosec4search\n # groups: [ infosec_group ]\n # indices: [\"readonlyrest_audit*\"]\n # #filter: '{\"bool\": { \"must_not\": { \"match\": { \"type\": \"xxxx\" }}}}'\n # kibana_index: .kibana_infosec\n # verbosity: error\n\n - name: infosec\n groups: [ infosec_group ]\n <<: *common-rules\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\", \"Management\" ]\n\n - name: Template Tenancy\n groups: [ template_group ]\n <<: *common-rules\n\n - name: \"ReadonlyREST Enterprise instance #1\"\n kibana_index: \".kibana_external_auth\"\n ror_kbn_auth:\n name: \"kbn1\"\n\n # USERS TO GROUPS ############\n users:\n - username: admin\n auth_key: admin:dev\n <<: *all-groups\n\n - username: user1\n auth_key: user1:dev\n <<: *all-groups\n\n ror_kbn:\n - name: kbn1\n signature_key: \"9yzBfnLaTYLfGPzyKW9es76RKYhUVgmuv6ZtehaScj5msGpBpa5FWpwk295uJYaaffTFnQC5tsknh2AguVDaTrqCLfM5zCTqdE4UGNL73h28Bg4dPrvTAFQyygQqv4xfgnevBED6VZYdfjXAQLc8J8ywaHQQSmprZqYCWGE6sM3vzNUEWWB3kmGrEKa4sGbXhmXZCvL6NDnEJhXPDJAzu9BMQxn8CzVLqrx6BxDgPYF8gZCxtyxMckXwCaYXrxAGbjkYH69F4wYhuAdHSWgRAQCuWwYmWCA6g39j4VPge5pv962XYvxwJpvn23Y5KvNZ5S5c6crdG4f4gTCXnU36x92fKMQzsQV9K4phcuNvMWkpqVB6xMA5aPzUeHcGytD93dG8D52P5BxsgaJJE6QqDrk3Y2vyLw9ZEbJhPRJxbuBKVCBtVx26Ldd46dq5eyyzmNEyQGLrjQ4qd978VtG8TNT5rkn4ETJQEju5HfCBbjm3urGLFVqxhGVawecT4YM9Rry4EqXWkRJGTFQWQRnweUFbKNbVTC9NxcXEp6K5rSPEy9trb5UYLYhhMJ9fWSBMuenGRjNSJxeurMRCaxPpNppBLFnp8qW5ezfHgCBpEjkSNNzP4uXMZFAXmdUfJ8XQdPTWuYfdHYc5TZWnzrdq9wcfFQRDpDB2zX5Myu96krDt9vA7wNKfYwkSczA6qUQV66jA8nV4Cs38cDAKVBXnxz22ddAVrPv8ajpu7hgBtULMURjvLt94Nc5FDKw79CTTQxffWEj9BJCDCpQnTufmT8xenywwVJvtj49yv2MP2mGECrVDRmcGUAYBKR8G6ZnFAYDVC9UhY46FGWDcyVX3HKwgtHeb45Ww7dsW8JdMnZYctaEU585GZmqTJp2LcAWRcQPH25JewnPX8pjzVpJNcy7avfA2bcU86bfASvQBDUCrhjgRmK2ECR6vzPwTsYKRgFrDqb62FeMdrKgJ9vKs435T5ACN7MNtdRXHQ4fj5pNpUMDW26Wd7tt9bkBTqEGf\"\n\n impersonation:\n - impersonator: admin\n users: [\"*\"]\n auth_key: admin:dev\n" } diff --git a/e2e-tests/cypress/fixtures/testSettings.json b/e2e-tests/cypress/fixtures/testSettings.json index 0be6a93..a341ea8 100644 --- a/e2e-tests/cypress/fixtures/testSettings.json +++ b/e2e-tests/cypress/fixtures/testSettings.json @@ -1,4 +1,4 @@ { - "settings": "readonlyrest:\n prompt_for_basic_auth: false\n audit:\n enabled: true\n outputs:\n - type: index\n index_template: \"'roraudit.reporting'-yyyy-MM\"\n access_control_rules:\n - name: \"::Tweets1::\"\n methods: [GET, POST]\n indices: [\"twitter\", \".kibana\"]\n proxy_auth:\n proxy_auth_config: \"proxy1\"\n users: [\"kibana\"]\n groups_provider_authorization:\n user_groups_provider: \"ACME2 External Authentication Service\"\n groups: [\"group3\"]\n\n - name: \"::Facebook2 posts::\"\n methods: [GET, POST]\n indices: [\"facebook\", \".kibana\"]\n proxy_auth:\n proxy_auth_config: \"proxy1\"\n users: [\"kibana\"]\n groups_provider_authorization:\n user_groups_provider: \"ACME2 External Authentication Service\"\n groups: [\"group1\"]\n cache_ttl_in_sec: 60\n\n - name: \"::Tweets::\"\n methods: [GET, POST]\n indices: [\"twitter\", \".kibana\"]\n external_authentication: \"ACME1 External Authorization Service\"\n\n - name: Accept requests to index2 from users with valid LDAP credentials, belonging to LDAP group 'team2'\n ldap_authentication: LDAP 1\n ldap_authorization:\n name: \"LDAP 1\"\n groups: [\"group3\"]\n\n - name: KIBANA_SERVER\n auth_key: kibana:kibana\n verbosity: error\n\n - name: PERSONAL_GRP\n groups: [ personal_group ]\n kibana_access: rw\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: '.kibana_@{user}'\n verbosity: error\n\n - name: ADMIN_GRP\n groups: [ admins_group ]\n kibana_access: admin\n kibana_hide_apps: [ \"Security\", \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: '.kibana_admins'\n verbosity: error\n\n # - name: Infosec4search\n # groups: [ infosec_group ]\n # indices: [\"readonlyrest_audit*\"]\n # #filter: '{\"bool\": { \"must_not\": { \"match\": { \"type\": \"xxxx\" }}}}'\n # kibana_index: .kibana_infosec\n # verbosity: error\n\n - name: INFOSEC_GRP\n groups: [ infosec_group ]\n kibana_access: rw\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\", \"Management\" ]\n kibana_index: .kibana_infosec\n verbosity: error\n\n - name: Template Tenancy\n groups: [ template_group ]\n verbosity: error\n kibana_access: admin\n kibana_index: \".kibana_template\"\n\n - name: \"ReadonlyREST Enterprise instance #1\"\n kibana_index: \".kibana_external_auth\"\n ror_kbn_auth:\n name: \"kbn1\"\n\n # USERS TO GROUPS ############\n users:\n - username: admin\n auth_key: admin:dev\n groups:\n - id: admins_group\n name: Administrators\n - id: infosec_group\n name: Infosec\n - id: Template\n name: Template\n\n - username: user1\n auth_key: user1:dev\n groups:\n - id: admins_group\n name: Administrators\n - id: personal_group\n name: Personal\n - id: infosec_group\n name: Infosec\n\n - username: new_user\n auth_key: new_user:dev\n groups:\n - id: admins_group\n name: Administrators\n - id: personal_group\n name: Personal\n - id: infosec_group\n name: Infosec\n\n - username: 'wildcard_user#*'\n groups:\n - g1: group1\n ldap_auth:\n name: \"LDAP 1\"\n groups: [\"group1\"]\n ror_kbn:\n - name: kbn1\n signature_key: \"9yzBfnLaTYLfGPzyKW9es76RKYhUVgmuv6ZtehaScj5msGpBpa5FWpwk295uJYaaffTFnQC5tsknh2AguVDaTrqCLfM5zCTqdE4UGNL73h28Bg4dPrvTAFQyygQqv4xfgnevBED6VZYdfjXAQLc8J8ywaHQQSmprZqYCWGE6sM3vzNUEWWB3kmGrEKa4sGbXhmXZCvL6NDnEJhXPDJAzu9BMQxn8CzVLqrx6BxDgPYF8gZCxtyxMckXwCaYXrxAGbjkYH69F4wYhuAdHSWgRAQCuWwYmWCA6g39j4VPge5pv962XYvxwJpvn23Y5KvNZ5S5c6crdG4f4gTCXnU36x92fKMQzsQV9K4phcuNvMWkpqVB6xMA5aPzUeHcGytD93dG8D52P5BxsgaJJE6QqDrk3Y2vyLw9ZEbJhPRJxbuBKVCBtVx26Ldd46dq5eyyzmNEyQGLrjQ4qd978VtG8TNT5rkn4ETJQEju5HfCBbjm3urGLFVqxhGVawecT4YM9Rry4EqXWkRJGTFQWQRnweUFbKNbVTC9NxcXEp6K5rSPEy9trb5UYLYhhMJ9fWSBMuenGRjNSJxeurMRCaxPpNppBLFnp8qW5ezfHgCBpEjkSNNzP4uXMZFAXmdUfJ8XQdPTWuYfdHYc5TZWnzrdq9wcfFQRDpDB2zX5Myu96krDt9vA7wNKfYwkSczA6qUQV66jA8nV4Cs38cDAKVBXnxz22ddAVrPv8ajpu7hgBtULMURjvLt94Nc5FDKw79CTTQxffWEj9BJCDCpQnTufmT8xenywwVJvtj49yv2MP2mGECrVDRmcGUAYBKR8G6ZnFAYDVC9UhY46FGWDcyVX3HKwgtHeb45Ww7dsW8JdMnZYctaEU585GZmqTJp2LcAWRcQPH25JewnPX8pjzVpJNcy7avfA2bcU86bfASvQBDUCrhjgRmK2ECR6vzPwTsYKRgFrDqb62FeMdrKgJ9vKs435T5ACN7MNtdRXHQ4fj5pNpUMDW26Wd7tt9bkBTqEGf\"\n\n impersonation:\n - impersonator: admin\n users: [\"*\"]\n auth_key: admin:dev\n ldaps:\n\n - name: LDAP 1\n host: \"ldap1.example.com\"\n port: 389\n ssl_enabled: false\n ssl_trust_all_certs: true\n ignore_ldap_connectivity_problems: true\n bind_dn: \"cn=admin,dc=example,dc=com\"\n bind_password: \"password\"\n search_user_base_DN: \"ou=People,dc=example,dc=com\"\n user_id_attribute: \"uid\"\n search_groups_base_DN: \"ou=Groups,dc=example,dc=com\"\n unique_member_attribute: \"uniqueMember\"\n connection_pool_size: 10\n connection_timeout: 10s\n request_timeout: 10s\n cache_ttl: 60s\n group_search_filter: \"(objectClass=group)(cn=application*)\"\n group_name_attribute: \"cn\"\n circuit_breaker:\n max_retries: 2\n reset_duration: 5s\n external_authentication_service_configs:\n - name: \"ACME1 External Authorization Service\"\n authentication_endpoint: \"http://external-website1:8080/auth1\"\n success_status_code: 200\n cache_ttl_in_sec: 60\n validate: false # SSL certificate validation (default to true)\n\n proxy_auth_configs:\n\n - name: \"proxy1\"\n user_id_header: \"X-Auth-Token\" # default X-Forwarded-User\n\n user_groups_providers:\n - name: ACME2 External Authentication Service\n groups_endpoint: \"http://localhost:8080/groups\"\n auth_token_name: \"token\"\n auth_token_passed_as: QUERY_PARAM # HEADER OR QUERY_PARAM\n response_groups_json_path: \"$..groups[?(@.id)].id\" # see: https://github.com/json-path/JsonPath\n cache_ttl_in_sec: 60\n http_connection_settings:\n connection_timeout_in_sec: 5 # default 2\n socket_timeout_in_sec: 3 # default 5\n connection_request_timeout_in_sec: 3 # default 5\n connection_pool_size: 10 # default 30\n", + "settings": "readonlyrest:\n prompt_for_basic_auth: false\n audit:\n enabled: true\n outputs:\n - type: index\n index_template: \"'roraudit.reporting'-yyyy-MM\"\n access_control_rules:\n - name: \"::Tweets1::\"\n methods: [GET, POST]\n indices: [\"twitter\", \".kibana\"]\n proxy_auth:\n proxy_auth_config: \"proxy1\"\n users: [\"kibana\"]\n groups_provider_authorization:\n user_groups_provider: \"ACME2 External Authentication Service\"\n groups: [\"group3\"]\n\n - name: \"::Facebook2 posts::\"\n methods: [GET, POST]\n indices: [\"facebook\", \".kibana\"]\n proxy_auth:\n proxy_auth_config: \"proxy1\"\n users: [\"kibana\"]\n groups_provider_authorization:\n user_groups_provider: \"ACME2 External Authentication Service\"\n groups: [\"group1\"]\n cache_ttl_in_sec: 60\n\n - name: \"::Tweets::\"\n methods: [GET, POST]\n indices: [\"twitter\", \".kibana\"]\n external_authentication: \"ACME1 External Authorization Service\"\n\n - name: Accept requests to index2 from users with valid LDAP credentials, belonging to LDAP group 'team2'\n ldap_authentication: LDAP 1\n ldap_authorization:\n name: \"LDAP 1\"\n groups: [\"group3\"]\n\n - name: KIBANA_SERVER\n auth_key: kibana:kibana\n verbosity: error\n\n - name: PERSONAL_GRP\n groups: [ personal_group ]\n kibana_access: rw\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: '.kibana_@{user}'\n\n - name: ADMIN_GRP\n groups: [ admins_group ]\n kibana_access: admin\n kibana_hide_apps: [ \"Security\", \"Enterprise Search|Overview\", \"Observability\" ]\n kibana_index: '.kibana_admins'\n\n # - name: Infosec4search\n # groups: [ infosec_group ]\n # indices: [\"readonlyrest_audit*\"]\n # #filter: '{\"bool\": { \"must_not\": { \"match\": { \"type\": \"xxxx\" }}}}'\n # kibana_index: .kibana_infosec\n # verbosity: error\n\n - name: INFOSEC_GRP\n groups: [ infosec_group ]\n kibana_access: rw\n kibana_hide_apps: [ \"Enterprise Search|Overview\", \"Observability\", \"Management\" ]\n kibana_index: .kibana_infosec\n\n - name: Template Tenancy\n groups: [ template_group ]\n kibana_access: admin\n kibana_index: \".kibana_template\"\n\n - name: \"ReadonlyREST Enterprise instance #1\"\n kibana_index: \".kibana_external_auth\"\n ror_kbn_auth:\n name: \"kbn1\"\n\n # USERS TO GROUPS ############\n users:\n - username: admin\n auth_key: admin:dev\n groups:\n - id: admins_group\n name: Administrators\n - id: infosec_group\n name: Infosec\n - id: Template\n name: Template\n\n - username: user1\n auth_key: user1:dev\n groups:\n - id: admins_group\n name: Administrators\n - id: personal_group\n name: Personal\n - id: infosec_group\n name: Infosec\n\n - username: new_user\n auth_key: new_user:dev\n groups:\n - id: admins_group\n name: Administrators\n - id: personal_group\n name: Personal\n - id: infosec_group\n name: Infosec\n\n - username: 'wildcard_user#*'\n groups:\n - g1: group1\n ldap_auth:\n name: \"LDAP 1\"\n groups: [\"group1\"]\n ror_kbn:\n - name: kbn1\n signature_key: \"9yzBfnLaTYLfGPzyKW9es76RKYhUVgmuv6ZtehaScj5msGpBpa5FWpwk295uJYaaffTFnQC5tsknh2AguVDaTrqCLfM5zCTqdE4UGNL73h28Bg4dPrvTAFQyygQqv4xfgnevBED6VZYdfjXAQLc8J8ywaHQQSmprZqYCWGE6sM3vzNUEWWB3kmGrEKa4sGbXhmXZCvL6NDnEJhXPDJAzu9BMQxn8CzVLqrx6BxDgPYF8gZCxtyxMckXwCaYXrxAGbjkYH69F4wYhuAdHSWgRAQCuWwYmWCA6g39j4VPge5pv962XYvxwJpvn23Y5KvNZ5S5c6crdG4f4gTCXnU36x92fKMQzsQV9K4phcuNvMWkpqVB6xMA5aPzUeHcGytD93dG8D52P5BxsgaJJE6QqDrk3Y2vyLw9ZEbJhPRJxbuBKVCBtVx26Ldd46dq5eyyzmNEyQGLrjQ4qd978VtG8TNT5rkn4ETJQEju5HfCBbjm3urGLFVqxhGVawecT4YM9Rry4EqXWkRJGTFQWQRnweUFbKNbVTC9NxcXEp6K5rSPEy9trb5UYLYhhMJ9fWSBMuenGRjNSJxeurMRCaxPpNppBLFnp8qW5ezfHgCBpEjkSNNzP4uXMZFAXmdUfJ8XQdPTWuYfdHYc5TZWnzrdq9wcfFQRDpDB2zX5Myu96krDt9vA7wNKfYwkSczA6qUQV66jA8nV4Cs38cDAKVBXnxz22ddAVrPv8ajpu7hgBtULMURjvLt94Nc5FDKw79CTTQxffWEj9BJCDCpQnTufmT8xenywwVJvtj49yv2MP2mGECrVDRmcGUAYBKR8G6ZnFAYDVC9UhY46FGWDcyVX3HKwgtHeb45Ww7dsW8JdMnZYctaEU585GZmqTJp2LcAWRcQPH25JewnPX8pjzVpJNcy7avfA2bcU86bfASvQBDUCrhjgRmK2ECR6vzPwTsYKRgFrDqb62FeMdrKgJ9vKs435T5ACN7MNtdRXHQ4fj5pNpUMDW26Wd7tt9bkBTqEGf\"\n\n impersonation:\n - impersonator: admin\n users: [\"*\"]\n auth_key: admin:dev\n ldaps:\n\n - name: LDAP 1\n host: \"ldap1.example.com\"\n port: 389\n ssl_enabled: false\n ssl_trust_all_certs: true\n ignore_ldap_connectivity_problems: true\n bind_dn: \"cn=admin,dc=example,dc=com\"\n bind_password: \"password\"\n search_user_base_DN: \"ou=People,dc=example,dc=com\"\n user_id_attribute: \"uid\"\n search_groups_base_DN: \"ou=Groups,dc=example,dc=com\"\n unique_member_attribute: \"uniqueMember\"\n connection_pool_size: 10\n connection_timeout: 10s\n request_timeout: 10s\n cache_ttl: 60s\n group_search_filter: \"(objectClass=group)(cn=application*)\"\n group_name_attribute: \"cn\"\n circuit_breaker:\n max_retries: 2\n reset_duration: 5s\n external_authentication_service_configs:\n - name: \"ACME1 External Authorization Service\"\n authentication_endpoint: \"http://external-website1:8080/auth1\"\n success_status_code: 200\n cache_ttl_in_sec: 60\n validate: false # SSL certificate validation (default to true)\n\n proxy_auth_configs:\n\n - name: \"proxy1\"\n user_id_header: \"X-Auth-Token\" # default X-Forwarded-User\n\n user_groups_providers:\n - name: ACME2 External Authentication Service\n groups_endpoint: \"http://localhost:8080/groups\"\n auth_token_name: \"token\"\n auth_token_passed_as: QUERY_PARAM # HEADER OR QUERY_PARAM\n response_groups_json_path: \"$..groups[?(@.id)].id\" # see: https://github.com/json-path/JsonPath\n cache_ttl_in_sec: 60\n http_connection_settings:\n connection_timeout_in_sec: 5 # default 2\n socket_timeout_in_sec: 3 # default 5\n connection_request_timeout_in_sec: 3 # default 5\n connection_pool_size: 10 # default 30\n", "ttl": "30 minutes" } diff --git a/e2e-tests/cypress/plugins/index.js b/e2e-tests/cypress/plugins/index.js index 8229063..59b2bab 100644 --- a/e2e-tests/cypress/plugins/index.js +++ b/e2e-tests/cypress/plugins/index.js @@ -19,4 +19,4 @@ module.exports = (on, config) => { // `on` is used to hook into various events Cypress emits // `config` is the resolved Cypress config -}; +} diff --git a/e2e-tests/cypress/support/commands.ts b/e2e-tests/cypress/support/commands.ts index 54b4cc3..b6e4837 100644 --- a/e2e-tests/cypress/support/commands.ts +++ b/e2e-tests/cypress/support/commands.ts @@ -1,46 +1,120 @@ import '@testing-library/cypress/add-commands'; import { isJsonString } from './helpers'; -Cypress.Commands.add('post', ({ url, user = `${Cypress.env().login}:${Cypress.env().password}`, payload }, ...args) => { - const escapedAndStringifyPayload = JSON.stringify(JSON.stringify(payload)); - - return cy - .exec( - `curl -v -k -H "Content-Type: application/json" -H "kbn-xsrf: true" -d ${escapedAndStringifyPayload} -X POST ${url} --user ${user}` - ) - .then(result => { - console.log(url, result); - return isJsonString(result.stdout) ? JSON.parse(result.stdout) : result.stdout; - }); +Cypress.Commands.add('kbnPost', ({ endpoint, credentials, payload, currentGroupHeader }, ...args) => { + const payloadCurlPart = `-H "Content-Type: application/json" -d ${JSON.stringify(JSON.stringify(payload || {}))}` + cy.kbnRequest({ + method: "POST", + endpoint: endpoint, + credentials: credentials, + options: currentGroupHeader ? `${payloadCurlPart} -H "x-ror-current-group: ${currentGroupHeader}"` : payloadCurlPart + }) }); +Cypress.Commands.add('esPost', ({ endpoint, credentials, payload }, ...args) => + cy.esRequest({ + method: "POST", + endpoint: endpoint, + credentials: credentials, + options: `-H "Content-Type: application/json" -d ${JSON.stringify(JSON.stringify(payload || {}))}` + }) +); + +Cypress.Commands.add('kbnPut', ({ endpoint, credentials, payload }, ...args) => + cy.kbnRequest({ + method: "PUT", + endpoint: endpoint, + credentials: credentials, + options: `-H "Content-Type: application/json" -d ${JSON.stringify(JSON.stringify(payload || {}))}` + }) +); + +Cypress.Commands.add('esPut', ({ endpoint, credentials, payload }, ...args) => + cy.esRequest({ + method: "PUT", + endpoint: endpoint, + credentials: credentials, + options: `-H "Content-Type: application/json" -d ${JSON.stringify(JSON.stringify(payload || {}))}` + }) +); + +Cypress.Commands.add( + 'kbnImport', + ({ endpoint, credentials, filename }, ...args) => + cy.kbnRequest({ + method: "POST", + endpoint: endpoint, + credentials: credentials, + options: `--form file=@${filename}` + }) +); + Cypress.Commands.add( - 'import', - ({ url, filename, user = `${Cypress.env().login}:${Cypress.env().password}` }, ...args) => - cy.exec(`curl -v -k -H "kbn-xsrf: true" --form file=@${filename} -X POST "${url}" --user ${user}`).then(result => { - console.log(url, result); - return isJsonString(result.stdout) ? JSON.parse(result.stdout) : result.stdout; + 'kbnGet', + ({ endpoint, credentials, currentGroupHeader }, ...args) => + cy.kbnRequest({ + method: "GET", + endpoint: endpoint, + credentials: credentials, + options: currentGroupHeader ? `-H "x-ror-current-group: ${currentGroupHeader}"` : undefined + }) +) + +Cypress.Commands.add( + 'esGet', + ({ endpoint, credentials }, ...args) => + cy.esRequest({ + method: "GET", + endpoint: endpoint, + credentials: credentials }) ); Cypress.Commands.add( - 'getRequest', - ({ url, user = `${Cypress.env().login}:${Cypress.env().password}`, header }, ...args) => - cy.exec(`curl -v -k "${url}" --user ${user} ${header ? `-H "${header}"` : ''}`).then(result => { - console.log(url, result); - return isJsonString(result.stdout) ? JSON.parse(result.stdout) : result.stdout; + 'kbnDelete', + ({ endpoint, credentials, currentGroupHeader }, ...args) => + cy.kbnRequest({ + method: "DELETE", + endpoint: endpoint, + credentials: credentials, + options: currentGroupHeader ? `-H "x-ror-current-group: ${currentGroupHeader}"` : undefined }) ); Cypress.Commands.add( - 'deleteRequest', - ({ url, header, user = `${Cypress.env().login}:${Cypress.env().password}` }, ...args) => + 'esDelete', + ({ endpoint, credentials }, ...args) => + cy.esRequest({ + method: "DELETE", + endpoint: endpoint, + credentials: credentials + }) +); + +Cypress.Commands.add( + 'kbnRequest', + ({ method, endpoint, credentials, options}) => { + const url = `${Cypress.config().baseUrl}/${endpoint}` cy - .exec(`curl -H "kbn-xsrf: true" -v -k -X DELETE "${url}" --user ${user} ${header ? `-H "${header}"` : ''}`) + .exec(`curl -H "kbn-xsrf: true" -v -k -X ${method} "${url}" --user ${credentials} ${options || ""}`) .then(result => { console.log(url, result); return isJsonString(result.stdout) ? JSON.parse(result.stdout) : result.stdout; }) + } +); + +Cypress.Commands.add( + 'esRequest', + ({ method, endpoint, credentials, options }) => { + const url = `${Cypress.env().elasticsearchUrl}/${endpoint}` + cy + .exec(`curl -H "kbn-xsrf: true" -v -k -X ${method} "${url}" --user ${credentials} ${options || ""}`) + .then(result => { + console.log(url, result); + return isJsonString(result.stdout) ? JSON.parse(result.stdout) : result.stdout; + }) + } ); Cypress.on('uncaught:exception', (err, runnable) => { @@ -53,7 +127,8 @@ Cypress.on('uncaught:exception', (err, runnable) => { err.message.includes('Unexpected token') || // Sometimes kibana js file chunks are not available, app works as expected but throw unhandled errors which fail the tests err.message.includes('ScopedHistory instance has fell out of navigation scope for basePath') || err.message.includes("Cannot read properties of undefined (reading 'includes')") || // kibana 8.7.0 throws this error - err.message.includes('Markdown content is required in [readOnly] mode') // kibana 8.13.0 throws this error on sample data canvas open + err.message.includes('Markdown content is required in [readOnly] mode') || // kibana 8.13.0 throws this error on sample data canvas open + err.message.includes('e.toSorted is not a function') // kibana 8.15.0 throws this error on report generation ) { return false; } diff --git a/e2e-tests/cypress/support/e2e.ts b/e2e-tests/cypress/support/e2e.ts index 7dd26ad..e149882 100644 --- a/e2e-tests/cypress/support/e2e.ts +++ b/e2e-tests/cypress/support/e2e.ts @@ -24,10 +24,18 @@ declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace Cypress { export interface Chainable { - post({ url, user, payload }: { url: string; user?: string; payload: unknown }): Chainable; - import({ url, user, filename }: { url: string; user?: string; filename: string }): Chainable; - getRequest({ url, user, header }: { url: string; user?: string; header?: string }): Chainable; - deleteRequest({ url, user, header }: { url: string; user?: string; header?: string }): Chainable; + kbnRequest({ method, endpoint, credentials, options }: { method: string, endpoint: string, credentials: string, options?: string }): Chainable; + kbnGet({ endpoint, credentials, currentGroupHeader }: { endpoint: string, credentials: string, currentGroupHeader?: string }): Chainable; + kbnPost({ endpoint, credentials, payload, currentGroupHeader }: { endpoint: string, credentials: string, payload?: unknown, currentGroupHeader?: string }): Chainable; + kbnPut({ endpoint, credentials, payload }: { endpoint: string, credentials: string, payload?: unknown }): Chainable; + kbnImport({endpoint, credentials, filename}: {endpoint: string, credentials: string, filename: string}): Chainable; + kbnDelete({ endpoint, credentials, currentGroupHeader }: { endpoint: string, credentials: string, currentGroupHeader?: string }): Chainable; + + esRequest({ method, endpoint, credentials, options }: { method: string, endpoint: string, credentials: string, options?: string }): Chainable; + esGet({ endpoint, credentials }: { endpoint: string, credentials: string }): Chainable; + esPost({ endpoint, credentials, payload }: { endpoint: string, credentials: string, payload?: unknown }): Chainable; + esPut({ endpoint, credentials, payload }: { endpoint: string, credentials: string, payload?: unknown }): Chainable; + esDelete({ endpoint, credentials }: { endpoint: string, credentials: string }): Chainable; } } } diff --git a/e2e-tests/cypress/support/helpers/EsApiAdvancedClient.ts b/e2e-tests/cypress/support/helpers/EsApiAdvancedClient.ts new file mode 100644 index 0000000..8d34f42 --- /dev/null +++ b/e2e-tests/cypress/support/helpers/EsApiAdvancedClient.ts @@ -0,0 +1,20 @@ +import { EsApiClient } from './EsApiClient'; + +export class EsApiAdvancedClient extends EsApiClient { + + public pruneAllReportingIndices(): void { + cy.log('Pruning all reporting indices...'); + this.indices().then(result => { + result + .filter(index => index.index.startsWith('.reporting')) + .forEach(reportingIndex => { + this.deleteIndexDocsByQuery(reportingIndex.index); + this.refreshIndex(reportingIndex.index); + }); + }); + cy.log('Pruning all reporting indices - DONE!'); + } + +} + +export const esApiAdvancedClient = new EsApiAdvancedClient(); diff --git a/e2e-tests/cypress/support/helpers/EsApiClient.ts b/e2e-tests/cypress/support/helpers/EsApiClient.ts new file mode 100644 index 0000000..9c82642 --- /dev/null +++ b/e2e-tests/cypress/support/helpers/EsApiClient.ts @@ -0,0 +1,50 @@ +export class EsApiClient { + + public deleteIndexDocsByQuery(index: string): void { + cy.esPost({ + endpoint: `${index}/_delete_by_query`, + credentials: Cypress.env().kibanaUserCredentials, + payload: { + query: { + match_all: {} + } + } + }) + } + + public refreshIndex(index: string): void { + cy.esPost({ + endpoint: `${index}/_refresh`, + credentials: Cypress.env().kibanaUserCredentials, + }) + } + + public deleteIndex(index: string): void { + cy.esDelete({ + endpoint: index, + credentials: Cypress.env().kibanaUserCredentials + }) + } + + public addDocument(index: string, id: string, doc: unknown): void { + cy.esPost({ + endpoint: `${index}/_doc/${id}`, + credentials: Cypress.env().kibanaUserCredentials, + payload: doc + }) + } + + public indices(): Cypress.Chainable { + return cy + .esGet({ + endpoint: "_cat/indices?format=json", + credentials: Cypress.env().kibanaUserCredentials + }) + } +} + +export const esApiClient = new EsApiClient(); + +export interface GetIndices { + index: string; +} \ No newline at end of file diff --git a/e2e-tests/cypress/support/helpers/KbnApiAdvancedClient.ts b/e2e-tests/cypress/support/helpers/KbnApiAdvancedClient.ts new file mode 100644 index 0000000..435eff3 --- /dev/null +++ b/e2e-tests/cypress/support/helpers/KbnApiAdvancedClient.ts @@ -0,0 +1,27 @@ +import { KbnApiClient } from './KbnApiClient'; + +export class KbnApiAdvancedClient extends KbnApiClient { + + public deleteSavedObjects(credentials: string, group?: string): void { + cy.log(`Get all saved objects for the ${credentials}`); + this.getSavedObjects(credentials, group).then(result => { + result.saved_objects.map(savedObject => { + cy.log(`Remove ${savedObject.id} saved object for ${credentials}`); + this.deleteSavedObject(savedObject, credentials, group); + }); + }); + }; + + public deleteDataViews(credentials: string) { + cy.log(`get all data_views for the ${credentials}`); + this.getDataViews(credentials).then(result => { + result.data_view.forEach(dataView => { + cy.log(`Remove ${dataView.id} saved object for ${credentials}`); + this.deleteDataView(dataView.id, credentials); + }); + }); + }; + +} + +export const kbnApiAdvancedClient = new KbnApiAdvancedClient(); diff --git a/e2e-tests/cypress/support/helpers/KbnApiClient.ts b/e2e-tests/cypress/support/helpers/KbnApiClient.ts new file mode 100644 index 0000000..e50d26a --- /dev/null +++ b/e2e-tests/cypress/support/helpers/KbnApiClient.ts @@ -0,0 +1,70 @@ +export class KbnApiClient { + + public getDataViews(credentials: string, group?: string): Cypress.Chainable { + return cy.kbnGet({ + endpoint: "api/data_views", + credentials: credentials, + currentGroupHeader: group + }); + } + + public createDataView(dataView: unknown, credentials: string, group?: string): void { + cy.kbnPost({ + endpoint: "api/data_views/data_view", + credentials: credentials, + currentGroupHeader: group, + payload: dataView + }); + } + + public deleteDataView(dataViewId: string, credentials: string, group?: string): void { + cy.kbnDelete({ + endpoint: `api/data_views/data_view/${dataViewId}`, + credentials: credentials, + currentGroupHeader: group + }); + } + + public getSavedObjects(credentials: string, group?: string): Cypress.Chainable { + return cy.kbnGet({ + endpoint: "api/saved_objects/_find?type=index-pattern&type=search&type=visualization&type=dashboard&type=config", + credentials: credentials, + currentGroupHeader: group + }); + } + + public deleteSavedObject(savedObject: SavedObject, credentials: string, group?: string): void { + cy.kbnDelete({ + endpoint: `api/saved_objects/${savedObject.type}/${savedObject.id}`, + credentials: credentials, + currentGroupHeader: group + }); + } + + public deleteSampleData(sampleDatasetName: string, credentials: string, group?: string): void { + cy.kbnDelete({ + endpoint: `api/sample_data/${sampleDatasetName}`, + credentials: credentials, + currentGroupHeader: group + }); + } +} + +export const kbnApiClient = new KbnApiClient(); + +interface DataView { + id: string; +} + +export interface DataViews { + data_view: DataView[]; +} + +interface SavedObject { + type: string; + id: string; +} + +export interface GetObject { + saved_objects: SavedObject[]; +} \ No newline at end of file diff --git a/e2e-tests/cypress/support/helpers/SampleData.ts b/e2e-tests/cypress/support/helpers/SampleData.ts new file mode 100644 index 0000000..5122ea4 --- /dev/null +++ b/e2e-tests/cypress/support/helpers/SampleData.ts @@ -0,0 +1,19 @@ +import { esApiClient } from "./EsApiClient" + +export class SampleData { + + static createSampleData = (index: string, docsCount: number) => { + for (let i = 1; i <= docsCount; i++) { + esApiClient.addDocument( + index, + i.toString(), + { + name: 'Jane Smith', + age: 25, + occupation: 'Designer', + '@timestamp': new Date().toISOString() + } + ); + } + } +} \ No newline at end of file diff --git a/e2e-tests/cypress/support/helpers/index.ts b/e2e-tests/cypress/support/helpers/index.ts index b25f35d..3f905ac 100644 --- a/e2e-tests/cypress/support/helpers/index.ts +++ b/e2e-tests/cypress/support/helpers/index.ts @@ -16,3 +16,5 @@ export function isJsonString(str) { } return true; } + +export const userCredentials = `${Cypress.env().login}:${Cypress.env().password}` \ No newline at end of file diff --git a/e2e-tests/cypress/support/page-objects/DirectKibanaRequest.ts b/e2e-tests/cypress/support/page-objects/DirectKibanaRequest.ts deleted file mode 100644 index 3648725..0000000 --- a/e2e-tests/cypress/support/page-objects/DirectKibanaRequest.ts +++ /dev/null @@ -1,69 +0,0 @@ -interface SavedObject { - type: string; - id: string; -} - -interface DataView { - id: string; -} - -export interface GetObject { - saved_objects: SavedObject[]; -} - -export interface GetReport { - hits: { - hits: { _id: string }[]; - }; -} - -export interface GetIndices { - index: string; -} - -export interface DataViews { - data_view: DataView[]; -} - -export class DirectKibanaRequest { - public static getObjectsUrl = (type = '&type=visualization&type=dashboard&type=config') => - `${Cypress.config().baseUrl}/api/saved_objects/_find?type=index-pattern&type=search&${type}`; - - public static deleteObjectUrl = (type, id) => `${Cypress.config().baseUrl}/api/saved_objects/${type}/${id}`; - - public static getIndices = `${Cypress.env().elasticsearchUrl}/_cat/indices?format=json`; - - public static getReportUrl = (reportingIndex: string) => - `${Cypress.env().elasticsearchUrl}/${reportingIndex}/_search`; - - public static deleteReportUrl = (reportingIndex: string, id: string) => - `${Cypress.env().elasticsearchUrl}/${reportingIndex}/_doc/${id}?refresh=wait_for`; - - public static deleteDataView = id => `${Cypress.config().baseUrl}/api/data_views/data_view/${id}`; - - static deleteSavedObjects = (user: string) => { - cy.log(`Get all saved objects for the ${user}`); - cy.getRequest({ url: DirectKibanaRequest.getObjectsUrl(), user }).then((result: GetObject) => { - result.saved_objects.map(savedObject => { - cy.log(`Remove ${savedObject.id} saved object for user1`); - return cy.deleteRequest({ - url: DirectKibanaRequest.deleteObjectUrl(savedObject.type, savedObject.id), - user - }); - }); - }); - }; - - static deleteDataViews = (user: string) => { - cy.log(`get all data_views for the ${user}`); - cy.getRequest({ url: `${Cypress.config().baseUrl}/api/data_views` }).then((result: DataViews) => { - result.data_view.map(dataView => { - cy.log(`Remove ${dataView.id} saved object for user1`); - return cy.deleteRequest({ - url: DirectKibanaRequest.deleteDataView(dataView.id), - user - }); - }); - }); - }; -} diff --git a/e2e-tests/cypress/support/page-objects/Discover.ts b/e2e-tests/cypress/support/page-objects/Discover.ts index c4b7105..6b206bb 100644 --- a/e2e-tests/cypress/support/page-objects/Discover.ts +++ b/e2e-tests/cypress/support/page-objects/Discover.ts @@ -32,7 +32,11 @@ export class Discover { static exportToCsv() { cy.log('exportToCsv'); cy.get('[data-test-subj=shareTopNavButton]').click(); - cy.get('[data-test-subj=sharePanel-CSVReports]').click(); + if (semver.gte(getKibanaVersion(), '8.15.0')) { + cy.get('[data-test-subj=export]').click(); + } else { + cy.get('[data-test-subj=sharePanel-CSVReports]').click(); + } cy.get('[data-test-subj=generateReportButton]').click(); cy.contains('Queued report for search', { timeout: 10000 }).should('exist'); cy.contains('Queued report for search', { timeout: 10000 }).should('not.exist'); @@ -91,8 +95,8 @@ const createKibanaIndexPattern = (indexPatternName: string) => { cy.get('[data-test-subj=createIndexPatternNameInput]').type(indexPatternName); cy.contains('Next step').click(); cy.get('[data-test-subj=createIndexPatternTimeFieldSelect]').select('@timestamp'); - cy.get('[data-test-subj=createIndexPatternButton]').click({ force: true }); cy.intercept('/s/default/api/saved_objects/index-pattern').as('indexPattern'); + cy.get('[data-test-subj=createIndexPatternButton]').click({ force: true }); cy.wait('@indexPattern'); }; @@ -102,8 +106,8 @@ const createKibanaIndexPattern = (indexPatternName: string) => { cy.contains('Select a timestamp field for use with the global time filter.'); cy.get('[data-test-subj=timestampField]').click(); cy.contains('@timestamp').click({ force: true }); - cy.get('[data-test-subj=saveIndexPatternButton]').click({ force: true }); cy.intercept('/s/default/api/saved_objects/index-pattern').as('indexPattern'); + cy.get('[data-test-subj=saveIndexPatternButton]').click({ force: true }); cy.wait('@indexPattern'); }; @@ -127,7 +131,6 @@ const createKibanaIndexPattern = (indexPatternName: string) => { cy.contains('Select a timestamp field for use with the global time filter.'); cy.get('[data-test-subj=timestampField]').click(); cy.contains('@timestamp').click({ force: true }); - cy.get('[data-test-subj=saveIndexPatternButton]').click({ force: true }); if (semver.gte(getKibanaVersion(), '8.9.0')) { cy.intercept('/s/default/api/kibana/management/saved_objects/**').as('indexPattern'); @@ -135,6 +138,8 @@ const createKibanaIndexPattern = (indexPatternName: string) => { cy.intercept('/s/default/api/saved_objects/**').as('indexPattern'); } + cy.get('[data-test-subj=saveIndexPatternButton]').click({ force: true }); + cy.wait('@indexPattern'); }; diff --git a/e2e-tests/cypress/support/page-objects/Editor.ts b/e2e-tests/cypress/support/page-objects/Editor.ts index c55345a..94519d5 100644 --- a/e2e-tests/cypress/support/page-objects/Editor.ts +++ b/e2e-tests/cypress/support/page-objects/Editor.ts @@ -6,8 +6,7 @@ export class Editor { const selectAllKeys = Cypress.platform === 'darwin' ? '{cmd}a' : '{ctrl}a'; SecuritySettings.getIframeBody() .findByRole('code') - .find('textarea') - .eq(0) + .find('textarea').eq(0) .focus() .type(`${selectAllKeys}{backspace}`, { force: true }) .type(config, { force: true }); @@ -22,11 +21,10 @@ export class Editor { cy.get('@iframeBody') .findByRole('code') - .find('textarea') - .eq(0) + .find('textarea').eq(0) .focus() .type(closeSearchBoxIfExist, { force: true }) - .type(findKeys, { force: true }); + .type(findKeys, { force: true }) SecuritySettings.getIframeBody() .findByRole('button', { name: /toggle replace/i }) diff --git a/e2e-tests/cypress/support/page-objects/Impersonate.ts b/e2e-tests/cypress/support/page-objects/Impersonate.ts index ed2d6ea..eb0ec3f 100644 --- a/e2e-tests/cypress/support/page-objects/Impersonate.ts +++ b/e2e-tests/cypress/support/page-objects/Impersonate.ts @@ -3,6 +3,7 @@ import { SecuritySettings } from './SecuritySettings'; import { Loader } from './Loader'; import testSettings from '../../fixtures/testSettings.json'; import authMocks from '../../fixtures/authMocks.json'; +import { userCredentials } from '../helpers'; export class Impersonate { static open() { @@ -180,7 +181,15 @@ export class Impersonate { static setTestSettingsData() { cy.log('Initialize Test ACL data'); - cy.post({ url: `${Cypress.env().elasticsearchUrl}/_readonlyrest/admin/config/test`, payload: testSettings }); - cy.post({ url: `${Cypress.env().elasticsearchUrl}/_readonlyrest/admin/config/test/authmock`, payload: authMocks }); + cy.esPost({ + endpoint: "_readonlyrest/admin/config/test", + credentials: userCredentials, + payload: testSettings + }); + cy.esPost({ + endpoint: "_readonlyrest/admin/config/test/authmock", + credentials: userCredentials, + payload: authMocks + }); } } diff --git a/e2e-tests/cypress/support/page-objects/Loader.ts b/e2e-tests/cypress/support/page-objects/Loader.ts index 741a800..fe542ce 100644 --- a/e2e-tests/cypress/support/page-objects/Loader.ts +++ b/e2e-tests/cypress/support/page-objects/Loader.ts @@ -14,6 +14,6 @@ export class Loader { cy.log('loading finish'); cy.contains('Loading Elastic', { timeout: 80000 }).should('not.exist'); cy.url().should('include', `${Cypress.config().baseUrl}${spacePrefix}${finishUrl}`); - cy.get('[data-test-subj=globalLoadingIndicator-hidden]').should('be.visible'); + cy.get('[data-test-subj=globalLoadingIndicator-hidden]').should('be.visible') } } diff --git a/e2e-tests/cypress/support/page-objects/Reporting.ts b/e2e-tests/cypress/support/page-objects/Reporting.ts index 5aad3b3..77f63af 100644 --- a/e2e-tests/cypress/support/page-objects/Reporting.ts +++ b/e2e-tests/cypress/support/page-objects/Reporting.ts @@ -14,14 +14,22 @@ export class Reporting { cy.log('verifySavedReport'); this.openReportingPage(openBy); cy.contains(reportName).should('be.visible'); - cy.get('[data-test-subj=reportJobListing]').get('.euiTableRow').should('have.length', reportsCount); + cy.get('[data-test-subj=reportJobListing]') + .get('.euiTableRow') + .should('have.length', reportsCount); } static verifyIfReportingPageAfterRefresh() { cy.log('Verify if reporting page open after refresh'); - cy.url().should('include', `${Cypress.config().baseUrl}/s/default/app/management/insightsAndAlerting/reporting`); + cy.url().should( + 'include', + `${Cypress.config().baseUrl}/s/default/app/management/insightsAndAlerting/reporting` + ); cy.reload(); - cy.url().should('include', `${Cypress.config().baseUrl}/s/default/app/management/insightsAndAlerting/reporting`); + cy.url().should( + 'include', + `${Cypress.config().baseUrl}/s/default/app/management/insightsAndAlerting/reporting` + ); } private static openReportingPage(openBy: OpenBy) { if (openBy === 'rorMenu') { diff --git a/e2e-tests/cypress/support/page-objects/RorMenu.ts b/e2e-tests/cypress/support/page-objects/RorMenu.ts index da94ee2..df42736 100644 --- a/e2e-tests/cypress/support/page-objects/RorMenu.ts +++ b/e2e-tests/cypress/support/page-objects/RorMenu.ts @@ -1,6 +1,7 @@ import { Loader } from './Loader'; export class RorMenu { + static openRorMenu() { cy.get('#rorMenuPopover').click(); } diff --git a/e2e-tests/cypress/support/page-objects/Settings.ts b/e2e-tests/cypress/support/page-objects/Settings.ts index 8c14986..f358c72 100644 --- a/e2e-tests/cypress/support/page-objects/Settings.ts +++ b/e2e-tests/cypress/support/page-objects/Settings.ts @@ -1,3 +1,4 @@ +import { userCredentials } from '../helpers'; import { RorMenu } from './RorMenu'; import { SecuritySettings } from './SecuritySettings'; @@ -86,6 +87,10 @@ export class Settings { static setSettingsData(settings: Record) { cy.log('Set settings data'); - cy.post({ url: `${Cypress.env().elasticsearchUrl}/_readonlyrest/admin/config`, payload: settings }); + cy.esPost({ + endpoint: "_readonlyrest/admin/config", + credentials: userCredentials, + payload: settings + }); } } diff --git a/e2e-tests/cypress/support/page-objects/StackManagement.ts b/e2e-tests/cypress/support/page-objects/StackManagement.ts index d09ac5b..18aec53 100644 --- a/e2e-tests/cypress/support/page-objects/StackManagement.ts +++ b/e2e-tests/cypress/support/page-objects/StackManagement.ts @@ -12,4 +12,32 @@ export class StackManagement { KibanaNavigation.openPage('Stack Management'); cy.contains('Saved Objects').click(); } + + static openAlertsPage() { + cy.log('open alerts page'); + KibanaNavigation.openKibanaNavigation(); + KibanaNavigation.openPage('Stack Management'); + KibanaNavigation.openSubPage('Alerts'); + } + + static openRulesPage() { + cy.log('open rules page'); + KibanaNavigation.openKibanaNavigation(); + KibanaNavigation.openPage('Stack Management'); + KibanaNavigation.openSubPage('Rules'); + } + + static openConnectorsPage() { + cy.log('open connectors page'); + KibanaNavigation.openKibanaNavigation(); + KibanaNavigation.openPage('Stack Management'); + KibanaNavigation.openSubPage('Connectors'); + } + + static openRulesAndConnectorsPage() { + cy.log('open rules and connectors page'); + KibanaNavigation.openKibanaNavigation(); + KibanaNavigation.openPage('Stack Management'); + KibanaNavigation.openSubPage('Rules and Connectors'); + } } diff --git a/e2e-tests/package.json b/e2e-tests/package.json index 9885d69..89e5aa7 100644 --- a/e2e-tests/package.json +++ b/e2e-tests/package.json @@ -12,7 +12,7 @@ "license": "Beshu Limited, All rights reserved", "dependencies": { "@testing-library/cypress": "^10.0.1", - "cypress": "12.17.4", + "cypress": "13.14.2", "semver": "7.5.2" }, "devDependencies": { diff --git a/e2e-tests/yarn.lock b/e2e-tests/yarn.lock index 715ac35..cd2937a 100644 --- a/e2e-tests/yarn.lock +++ b/e2e-tests/yarn.lock @@ -30,10 +30,10 @@ dependencies: regenerator-runtime "^0.13.4" -"@cypress/request@2.88.12": - version "2.88.12" - resolved "https://registry.npmjs.org/@cypress/request/-/request-2.88.12.tgz" - integrity sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA== +"@cypress/request@^3.0.1": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.5.tgz#d893a6e68ce2636c085fcd8d7283c3186499ba63" + integrity sha512-v+XHd9XmWbufxF1/bTaVm2yhbxY+TB4YtWRqF2zaXBlDNMkls34KiATz0AVDLavL3iB6bQk9/7n3oY1EoLSWGA== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -41,14 +41,14 @@ combined-stream "~1.0.6" extend "~3.0.2" forever-agent "~0.6.1" - form-data "~2.3.2" - http-signature "~1.3.6" + form-data "~4.0.0" + http-signature "~1.4.0" is-typedarray "~1.0.0" isstream "~0.1.2" json-stringify-safe "~5.0.1" mime-types "~2.1.19" performance-now "^2.1.0" - qs "~6.10.3" + qs "6.13.0" safe-buffer "^5.1.2" tough-cookie "^4.1.3" tunnel-agent "^0.6.0" @@ -134,9 +134,14 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@rtsao/scc@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" + integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== + "@testing-library/cypress@^10.0.1": version "10.0.1" - resolved "https://registry.npmjs.org/@testing-library/cypress/-/cypress-10.0.1.tgz" + resolved "https://registry.yarnpkg.com/@testing-library/cypress/-/cypress-10.0.1.tgz#15abae0edb83237316ec6d07e152b71a50b38387" integrity sha512-e8uswjTZIBhaIXjzEcrQQ8nHRWHgZH7XBxKuIWxZ/T7FxfWhCR48nFhUX5nfPizjVOKSThEfOSv67jquc1ASkw== dependencies: "@babel/runtime" "^7.14.6" @@ -144,7 +149,7 @@ "@testing-library/dom@^9.0.0": version "9.3.1" - resolved "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.1.tgz" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-9.3.1.tgz#8094f560e9389fb973fe957af41bf766937a9ee9" integrity sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w== dependencies: "@babel/code-frame" "^7.10.4" @@ -158,7 +163,7 @@ "@types/aria-query@^5.0.1": version "5.0.1" - resolved "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.1.tgz" + resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.1.tgz#3286741fb8f1e1580ac28784add4c7a1d49bdfbc" integrity sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q== "@types/json-schema@^7.0.9": @@ -176,21 +181,16 @@ resolved "https://registry.npmjs.org/@types/node/-/node-16.4.4.tgz" integrity sha512-BH/jX0HjzElFCQdAwaEMwuGBQwm6ViDZ00X6LKdnRRmGWOzkWugEH4+7a0BwfHQ8DfPPCSd/mdsm3Nu8FKFu0w== -"@types/node@^16.18.39": - version "16.18.50" - resolved "https://registry.npmjs.org/@types/node/-/node-16.18.50.tgz" - integrity sha512-OiDU5xRgYTJ203v4cprTs0RwOCd5c5Zjv+K5P8KSqfiCsB1W3LcamTUMcnQarpq5kOYbhHfSOgIEJvdPyb5xyw== - "@types/node@^20.14.10": - version "20.14.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.10.tgz#a1a218290f1b6428682e3af044785e5874db469a" - integrity sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ== + version "20.16.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.5.tgz#d43c7f973b32ffdf9aa7bd4f80e1072310fd7a53" + integrity sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA== dependencies: - undici-types "~5.26.4" + undici-types "~6.19.2" "@types/semver@^7.3.12", "@types/semver@^7.5.8": version "7.5.8" - resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== "@types/sinonjs__fake-timers@8.1.1": @@ -375,14 +375,14 @@ argparse@^2.0.1: aria-query@5.1.3: version "5.1.3" - resolved "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e" integrity sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ== dependencies: deep-equal "^2.0.5" array-buffer-byte-length@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== dependencies: call-bind "^1.0.2" @@ -396,7 +396,7 @@ array-buffer-byte-length@^1.0.1: call-bind "^1.0.5" is-array-buffer "^3.0.4" -array-includes@^3.1.7: +array-includes@^3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d" integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ== @@ -413,7 +413,7 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== -array.prototype.findlastindex@^1.2.3: +array.prototype.findlastindex@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz#8c35a755c72908719453f87145ca011e39334d0d" integrity sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ== @@ -493,7 +493,7 @@ at-least-node@^1.0.0: available-typed-arrays@^1.0.5: version "1.0.5" - resolved "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== available-typed-arrays@^1.0.7: @@ -515,7 +515,7 @@ aws4@^1.8.0: balanced-match@^1.0.0: version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base64-js@^1.3.1: @@ -542,7 +542,7 @@ bluebird@^3.7.2: brace-expansion@^1.1.7: version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" @@ -560,9 +560,9 @@ buffer-crc32@~0.2.3: resolved "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz" integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= -buffer@^5.6.0: +buffer@^5.7.1: version "5.7.1" - resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== dependencies: base64-js "^1.3.1" @@ -632,10 +632,10 @@ check-more-types@^2.24.0: resolved "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz" integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= -ci-info@^3.1.1: - version "3.2.0" - resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz" - integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A== +ci-info@^3.2.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== clean-stack@^2.0.0: version "2.2.0" @@ -700,7 +700,7 @@ colors@1.4.0: resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@^1.0.6, combined-stream@~1.0.6: +combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -709,7 +709,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: commander@^6.2.1: version "6.2.1" - resolved "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c" integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== common-tags@^1.8.0: @@ -719,7 +719,7 @@ common-tags@^1.8.0: concat-map@0.0.1: version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== core-util-is@1.0.2: @@ -736,20 +736,19 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" -cypress@12.17.4: - version "12.17.4" - resolved "https://registry.npmjs.org/cypress/-/cypress-12.17.4.tgz" - integrity sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ== +cypress@13.14.2: + version "13.14.2" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.14.2.tgz#4237eb7b26de2baeaa1f01e585f965d88fca7f39" + integrity sha512-lsiQrN17vHMB2fnvxIrKLAjOr9bPwsNbPZNrWf99s4u+DVmCY6U+w7O3GGG9FvP4EUVYaDu+guWeNLiUzBrqvA== dependencies: - "@cypress/request" "2.88.12" + "@cypress/request" "^3.0.1" "@cypress/xvfb" "^1.2.4" - "@types/node" "^16.18.39" "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" arch "^2.2.0" blob-util "^2.0.2" bluebird "^3.7.2" - buffer "^5.6.0" + buffer "^5.7.1" cachedir "^2.3.0" chalk "^4.1.0" check-more-types "^2.24.0" @@ -767,7 +766,7 @@ cypress@12.17.4: figures "^3.2.0" fs-extra "^9.1.0" getos "^3.2.1" - is-ci "^3.0.0" + is-ci "^3.0.1" is-installed-globally "~0.4.0" lazy-ass "^1.6.0" listr2 "^3.8.3" @@ -781,7 +780,7 @@ cypress@12.17.4: request-progress "^3.0.0" semver "^7.5.3" supports-color "^8.1.1" - tmp "~0.2.1" + tmp "~0.2.3" untildify "^4.0.0" yauzl "^2.10.0" @@ -839,22 +838,22 @@ debug@^4.1.1: ms "2.1.2" debug@^4.3.1, debug@^4.3.2: - version "4.3.5" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" - integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== dependencies: - ms "2.1.2" + ms "^2.1.3" debug@^4.3.4: version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" deep-equal@^2.0.5: version "2.2.2" - resolved "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.2.tgz" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.2.tgz#9b2635da569a13ba8e1cc159c2f744071b115daa" integrity sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA== dependencies: array-buffer-byte-length "^1.0.0" @@ -883,7 +882,7 @@ deep-is@^0.1.3: define-data-property@^1.0.1: version "1.1.0" - resolved "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.0.tgz#0db13540704e1d8d479a0656cf781267531b9451" integrity sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g== dependencies: get-intrinsic "^1.2.1" @@ -901,7 +900,7 @@ define-data-property@^1.1.4: define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0, define-properties@^1.2.1: version "1.2.1" - resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== dependencies: define-data-property "^1.0.1" @@ -1032,7 +1031,7 @@ es-errors@^1.2.1, es-errors@^1.3.0: es-get-iterator@^1.1.3: version "1.1.3" - resolved "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz" + resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== dependencies: call-bind "^1.0.2" @@ -1101,33 +1100,34 @@ eslint-import-resolver-node@^0.3.9: is-core-module "^2.13.0" resolve "^1.22.4" -eslint-module-utils@^2.8.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz#52f2404300c3bd33deece9d7372fb337cc1d7c34" - integrity sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q== +eslint-module-utils@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.11.0.tgz#b99b211ca4318243f09661fae088f373ad5243c4" + integrity sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ== dependencies: debug "^3.2.7" eslint-plugin-import@^2.26.0: - version "2.29.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz#d45b37b5ef5901d639c15270d74d46d161150643" - integrity sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw== + version "2.30.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz#21ceea0fc462657195989dd780e50c92fe95f449" + integrity sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw== dependencies: - array-includes "^3.1.7" - array.prototype.findlastindex "^1.2.3" + "@rtsao/scc" "^1.1.0" + array-includes "^3.1.8" + array.prototype.findlastindex "^1.2.5" array.prototype.flat "^1.3.2" array.prototype.flatmap "^1.3.2" debug "^3.2.7" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.9" - eslint-module-utils "^2.8.0" - hasown "^2.0.0" - is-core-module "^2.13.1" + eslint-module-utils "^2.9.0" + hasown "^2.0.2" + is-core-module "^2.15.1" is-glob "^4.0.3" minimatch "^3.1.2" - object.fromentries "^2.0.7" - object.groupby "^1.0.1" - object.values "^1.1.7" + object.fromentries "^2.0.8" + object.groupby "^1.0.3" + object.values "^1.2.0" semver "^6.3.1" tsconfig-paths "^3.15.0" @@ -1384,7 +1384,7 @@ flatted@^3.2.9: for-each@^0.3.3: version "0.3.3" - resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== dependencies: is-callable "^1.1.3" @@ -1394,13 +1394,13 @@ forever-agent@~0.6.1: resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== +form-data@~4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== dependencies: asynckit "^0.4.0" - combined-stream "^1.0.6" + combined-stream "^1.0.8" mime-types "^2.1.12" fs-extra@^9.1.0: @@ -1440,12 +1440,12 @@ function.prototype.name@^1.1.6: functions-have-names@^1.2.3: version "1.2.3" - resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: version "1.2.1" - resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== dependencies: function-bind "^1.1.1" @@ -1556,7 +1556,7 @@ globby@^11.1.0: gopd@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== dependencies: get-intrinsic "^1.1.3" @@ -1573,7 +1573,7 @@ graphemer@^1.4.0: has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== has-flag@^3.0.0: @@ -1588,7 +1588,7 @@ has-flag@^4.0.0: has-property-descriptors@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== dependencies: get-intrinsic "^1.1.1" @@ -1602,7 +1602,7 @@ has-property-descriptors@^1.0.2: has-proto@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== has-proto@^1.0.3: @@ -1643,14 +1643,14 @@ hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2: dependencies: function-bind "^1.1.2" -http-signature@~1.3.6: - version "1.3.6" - resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz" - integrity sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw== +http-signature@~1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.4.0.tgz#dee5a9ba2bf49416abc544abd6d967f6a94c8c3f" + integrity sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg== dependencies: assert-plus "^1.0.0" jsprim "^2.0.2" - sshpk "^1.14.1" + sshpk "^1.18.0" human-signals@^1.1.1: version "1.1.1" @@ -1663,9 +1663,9 @@ ieee754@^1.1.13: integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== ignore@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" - integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== import-fresh@^3.2.1: version "3.3.0" @@ -1705,7 +1705,7 @@ ini@2.0.0: internal-slot@^1.0.4: version "1.0.5" - resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== dependencies: get-intrinsic "^1.2.0" @@ -1731,7 +1731,7 @@ is-arguments@^1.1.1: is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: version "3.0.2" - resolved "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== dependencies: call-bind "^1.0.2" @@ -1763,20 +1763,20 @@ is-boolean-object@^1.1.0: is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" - resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-ci@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz" - integrity sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ== +is-ci@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" + integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== dependencies: - ci-info "^3.1.1" + ci-info "^3.2.0" -is-core-module@^2.13.0, is-core-module@^2.13.1: - version "2.14.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.14.0.tgz#43b8ef9f46a6a08888db67b1ffd4ec9e3dfd59d1" - integrity sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A== +is-core-module@^2.13.0, is-core-module@^2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== dependencies: hasown "^2.0.2" @@ -1821,7 +1821,7 @@ is-installed-globally@~0.4.0: is-map@^2.0.1, is-map@^2.0.2: version "2.0.2" - resolved "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== is-negative-zero@^2.0.3: @@ -1831,7 +1831,7 @@ is-negative-zero@^2.0.3: is-number-object@^1.0.4: version "1.0.7" - resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== dependencies: has-tostringtag "^1.0.0" @@ -1856,12 +1856,12 @@ is-regex@^1.1.4: is-set@^2.0.1, is-set@^2.0.2: version "2.0.2" - resolved "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz" + resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== is-shared-array-buffer@^1.0.2: version "1.0.2" - resolved "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== dependencies: call-bind "^1.0.2" @@ -1894,7 +1894,7 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: is-typed-array@^1.1.10: version "1.1.10" - resolved "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== dependencies: available-typed-arrays "^1.0.5" @@ -1922,7 +1922,7 @@ is-unicode-supported@^0.1.0: is-weakmap@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== is-weakref@^1.0.2: @@ -1934,12 +1934,12 @@ is-weakref@^1.0.2: is-weakset@^2.0.1: version "2.0.1" - resolved "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83" integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw== isarray@^2.0.5: version "2.0.5" - resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== isexe@^2.0.0: @@ -2102,7 +2102,7 @@ lru-cache@^6.0.0: lz-string@^1.5.0: version "1.5.0" - resolved "https://registry.npmjs.org/lz-string/-/lz-string-1.5.0.tgz" + resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== merge-stream@^2.0.0: @@ -2116,9 +2116,9 @@ merge2@^1.3.0, merge2@^1.4.1: integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== micromatch@^4.0.4: - version "4.0.7" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5" - integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q== + version "4.0.8" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202" + integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA== dependencies: braces "^3.0.3" picomatch "^2.3.1" @@ -2142,14 +2142,14 @@ mimic-fn@^2.1.0: minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.2: version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" minimist@^1.2.0, minimist@^1.2.6, minimist@^1.2.8: version "1.2.8" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== ms@2.1.2: @@ -2157,7 +2157,7 @@ ms@2.1.2: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1: +ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -2186,7 +2186,7 @@ object-inspect@^1.13.1: object-inspect@^1.9.0: version "1.12.3" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== object-is@^1.1.5: @@ -2204,7 +2204,7 @@ object-keys@^1.1.1: object.assign@^4.1.4: version "4.1.4" - resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== dependencies: call-bind "^1.0.2" @@ -2222,7 +2222,7 @@ object.assign@^4.1.5: has-symbols "^1.0.3" object-keys "^1.1.1" -object.fromentries@^2.0.7: +object.fromentries@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65" integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ== @@ -2232,7 +2232,7 @@ object.fromentries@^2.0.7: es-abstract "^1.23.2" es-object-atoms "^1.0.0" -object.groupby@^1.0.1: +object.groupby@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.3.tgz#9b125c36238129f6f7b61954a1e7176148d5002e" integrity sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ== @@ -2241,7 +2241,7 @@ object.groupby@^1.0.1: define-properties "^1.2.1" es-abstract "^1.23.2" -object.values@^1.1.7: +object.values@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b" integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ== @@ -2392,7 +2392,7 @@ pretty-format@^27.0.2: process@^0.11.10: version "0.11.10" - resolved "https://registry.npmjs.org/process/-/process-0.11.10.tgz" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= proxy-from-env@1.0.0: @@ -2402,7 +2402,7 @@ proxy-from-env@1.0.0: psl@^1.1.33: version "1.9.0" - resolved "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== pump@^3.0.0: @@ -2423,12 +2423,12 @@ punycode@^2.1.1: resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -qs@~6.10.3: - version "6.10.4" - resolved "https://registry.npmjs.org/qs/-/qs-6.10.4.tgz" - integrity sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g== +qs@6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" + integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg== dependencies: - side-channel "^1.0.4" + side-channel "^1.0.6" querystringify@^2.1.1: version "2.2.0" @@ -2452,7 +2452,7 @@ regenerator-runtime@^0.13.4: regexp.prototype.flags@^1.5.0: version "1.5.1" - resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== dependencies: call-bind "^1.0.2" @@ -2508,7 +2508,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -2560,7 +2560,7 @@ safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: semver@7.5.2: version "7.5.2" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== dependencies: lru-cache "^6.0.0" @@ -2571,13 +2571,13 @@ semver@^6.3.1: integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.7: - version "7.6.2" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" - integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== + version "7.6.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== semver@^7.5.3: version "7.5.4" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" @@ -2596,7 +2596,7 @@ set-function-length@^1.2.1: set-function-name@^2.0.0: version "2.0.1" - resolved "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== dependencies: define-data-property "^1.0.1" @@ -2634,6 +2634,16 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" +side-channel@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2" + integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA== + dependencies: + call-bind "^1.0.7" + es-errors "^1.3.0" + get-intrinsic "^1.2.4" + object-inspect "^1.13.1" + signal-exit@^3.0.2: version "3.0.3" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz" @@ -2662,10 +2672,10 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -sshpk@^1.14.1: - version "1.16.1" - resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== +sshpk@^1.18.0: + version "1.18.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" + integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -2679,7 +2689,7 @@ sshpk@^1.14.1: stop-iteration-iterator@^1.0.0: version "1.0.0" - resolved "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz" + resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== dependencies: internal-slot "^1.0.4" @@ -2791,12 +2801,10 @@ through@^2.3.8: resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -tmp@~0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" +tmp@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" + integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== to-regex-range@^5.0.1: version "5.0.1" @@ -2807,7 +2815,7 @@ to-regex-range@^5.0.1: tough-cookie@^4.1.3: version "4.1.3" - resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== dependencies: psl "^1.1.33" @@ -2912,7 +2920,7 @@ typed-array-length@^1.0.6: typescript@4.8.4: version "4.8.4" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== unbox-primitive@^1.0.2: @@ -2925,14 +2933,14 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -undici-types@~5.26.4: - version "5.26.5" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" - integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.19.2: + version "6.19.8" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02" + integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw== universalify@^0.2.0: version "0.2.0" - resolved "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== universalify@^2.0.0: @@ -2987,7 +2995,7 @@ which-boxed-primitive@^1.0.2: which-collection@^1.0.1: version "1.0.1" - resolved "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz" + resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== dependencies: is-map "^2.0.1" @@ -3008,7 +3016,7 @@ which-typed-array@^1.1.14, which-typed-array@^1.1.15: which-typed-array@^1.1.9: version "1.1.9" - resolved "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== dependencies: available-typed-arrays "^1.0.5" diff --git a/elk-ror/conf/es/readonlyrest.yml b/elk-ror/conf/es/readonlyrest.yml index 0d80cc8..1b8ed94 100644 --- a/elk-ror/conf/es/readonlyrest.yml +++ b/elk-ror/conf/es/readonlyrest.yml @@ -1,6 +1,5 @@ helpers: cr: &common-rules - verbosity: error kibana_access: rw kibana_hide_apps: [ "Enterprise Search|Overview", "Observability" ] kibana_index: ".kibana_@{acl:current_group}" @@ -21,8 +20,7 @@ readonlyrest: enabled: true outputs: - type: index - serializer: tech.beshu.ror.requestcontext.QueryAuditLogSerializer - index_template: "'readonlyrest_audit-'-yyyy-MM-dd" + index_template: "'readonlyrest_audit_'yyyy-MM-dd" access_control_rules: - name: KIBANA_SERVER @@ -39,13 +37,6 @@ readonlyrest: <<: *common-rules kibana_access: admin -# - name: infosec4search -# groups: [ infosec_group ] -# indices: ["readonlyrest_audit*"] -# #filter: '{"bool": { "must_not": { "match": { "type": "xxxx" }}}}' -# kibana_index: .kibana_infosec -# verbosity: error - - name: infosec groups: [ infosec_group ] <<: *common-rules diff --git a/elk-ror/docker-compose.yml b/elk-ror/docker-compose.yml index e36568e..28e5e1c 100644 --- a/elk-ror/docker-compose.yml +++ b/elk-ror/docker-compose.yml @@ -11,13 +11,18 @@ services: - "19200:9200" - "19300:9300" - "5000:5000" + deploy: + resources: + limits: + memory: 2G # ES heap will get 1GB environment: + - ES_VERSION=$ES_VERSION - cluster.name=ror-es-cluster - node.name=es-ror-single - discovery.type=single-node - bootstrap.memory_lock=true - - "ES_JAVA_OPTS=-Xms512m -Xmx512m -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5000" - - ES_VERSION=$ES_VERSION + # for a sake of debugging and profiling + - "ES_JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5000 -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.rmi.port=9010 -Djava.rmi.server.hostname=127.0.0.1" healthcheck: test: [ "CMD", "curl", "-fk", "-u", "kibana:kibana", "http://localhost:9200/_cluster/health" ] interval: 10s @@ -30,6 +35,8 @@ services: memlock: soft: -1 hard: -1 + volumes: + - /tmp/visualvm:/tmp/visualvm kbn-ror: build: @@ -45,6 +52,9 @@ services: deploy: mode: replicated replicas: 3 + resources: + limits: + memory: 756G environment: ELASTIC_USER_PASSWORD: elastic ES_API_URL: http://es-ror:9200 @@ -59,7 +69,7 @@ services: ulimits: memlock: soft: -1 - hard: -1 + hard: -1 kbn-proxy: build: diff --git a/run-7x.sh b/run-7x.sh index c1ea8c9..ea14c1d 100755 --- a/run-7x.sh +++ b/run-7x.sh @@ -1,3 +1,3 @@ #!/bin/bash -e -./run.sh "7.17.23" \ No newline at end of file +./run.sh "7.17.24" \ No newline at end of file diff --git a/run-8x.sh b/run-8x.sh index ffc92a3..305c69f 100755 --- a/run-8x.sh +++ b/run-8x.sh @@ -1,3 +1,3 @@ #!/bin/bash -e -./run.sh "8.14.3" \ No newline at end of file +./run.sh "8.15.1" \ No newline at end of file