kibana/.gitignore
Dzmitry Lemechko d75103eacb
[FTR] add service to test user roles on serverless (#170417)
## Summary

### This PR enables user roles testing in FTR

We use SAML authentication to get session cookie for user with the
specific role. The cookie is cached on FTR service side so we only make
SAML auth one time per user within FTR config run. For Kibana CI service
relies on changes coming in #170852

In order to run FTR tests locally against existing MKI project:
- add `.ftr/role_users.json` in Kibana root dir
```
{
  "viewer": {
    "email": "...",
    "password": "..."
  },
  "developer": {
    "email": "...",
    "password": "..."
  }
}

```
- set Cloud hostname (!not project hostname!) with TEST_CLOUD_HOST_NAME,
e.g.
`export TEST_CLOUD_HOST_NAME=console.qa.cld.elstc.co`


### How to use:

- functional tests:
```
const svlCommonPage = getPageObject('svlCommonPage');

before(async () => {
  // login with Viewer role  
  await svlCommonPage.loginWithRole('viewer');
  // you are logged in in browser and on project home page, start the test 
});

it('has project header', async () => {
  await svlCommonPage.assertProjectHeaderExists();
});
```

- API integration tests:
```
const svlUserManager = getService('svlUserManager');
const supertestWithoutAuth = getService('supertestWithoutAuth');
let credentials: { Cookie: string };

before(async () => {
  // get auth header for Viewer role  
 credentials = await svlUserManager.getApiCredentialsForRole('viewer');
});

it('returns full status payload for authenticated request', async () => {
    const { body } = await supertestWithoutAuth
    .get('/api/status')
    .set(credentials)
    .set('kbn-xsrf', 'kibana');

    expect(body.name).to.be.a('string');
    expect(body.uuid).to.be.a('string');
    expect(body.version.number).to.be.a('string');
});
```

Flaky-test-runner: 

#1
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4081
#2
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4114

---------

Co-authored-by: Robert Oskamp <traeluki@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2023-12-04 12:09:05 -07:00

147 lines
3.4 KiB
Text

.aws-config.json
.signing-config.json
.ackrc
/.es
/.chromium
.DS_Store
.node_binaries
/.beats
.native_modules
node_modules
!/src/dev/npm/integration_tests/__fixtures__/fixture1/node_modules
!/src/dev/notice/__fixtures__/node_modules
!/packages/kbn-import-resolver/src/__fixtures__/node_modules
!/packages/kbn-import-resolver/src/__fixtures__/packages/box/node_modules
trash
/optimize
/built_assets
target
/build
.jruby
.idea
*.iml
*.log
types.eslint.config.js
__tmp__
# Ignore example plugin builds
/examples/*/build
/x-pack/examples/*/build
# Ignore certain functional test runner artifacts
/test/*/failure_debug
/test/*/screenshots/diff
/test/*/screenshots/failure
/test/*/screenshots/session
/test/*/screenshots/visual_regression_gallery.html
# Ignore the same artifacts in x-pack
/x-pack/test/*/failure_debug
/x-pack/test/*/screenshots/diff
/x-pack/test/*/screenshots/failure
/x-pack/test/*/screenshots/session
/x-pack/test/*/screenshots/visual_regression_gallery.html
/x-pack/test/functional/apps/*/*/reporting/reports/failure
# Ignore the same artifacts in x-pack/test_serverless
/x-pack/test_serverless/*/failure_debug
/x-pack/test_serverless/*/screenshots/diff
/x-pack/test_serverless/*/screenshots/failure
/x-pack/test_serverless/*/screenshots/session
/x-pack/test_serverless/*/screenshots/visual_regression_gallery.html
/x-pack/test_serverless/functional/apps/*/*/reporting/reports/failure
/html_docs
.eslintcache
/plugins/
/data
disabledPlugins
webpackstats.json
/config/*
!/config/kibana.yml
!/config/README.md
!/config/serverless.yml
!/config/serverless.es.yml
!/config/serverless.oblt.yml
!/config/serverless.security.yml
!/config/node.options
coverage
!/test/common/fixtures/plugins/coverage
selenium
.babel_register_cache.json
.webpack.babelcache
*.swp
*.swo
*.out
package-lock.json
!/.buildkite/package-lock.json
.yo-rc.json
.vscode
*.sublime-*
npm-debug.log*
.tern-project
.nyc_output
.ci/pipeline-library/build/
.ci/runbld
.ci/bash_standard_lib.sh
.gradle
.vagrant
.envrc
## Snyk
.dccache
## @cypress/snapshot from apm plugin
/snapshots.js
/apm-diagnostics*.json
/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_map/snapshots/*.actual.png
/x-pack/plugins/apm/ftr_e2e/cypress/e2e/service_map/snapshots/*.diff.png
# transpiled cypress config
x-pack/plugins/fleet/cypress.config.d.ts
x-pack/plugins/fleet/cypress.config.js
x-pack/plugins/osquery/cypress.config.d.ts
x-pack/plugins/osquery/cypress.config.js
x-pack/plugins/enterprise_search/cypress.config.d.ts
x-pack/plugins/enterprise_search/cypress.config.js
x-pack/plugins/security_solution/public/management/cypress.config.d.ts
x-pack/plugins/security_solution/public/management/cypress.config.js
x-pack/plugins/security_solution/public/management/cypress_endpoint.config.d.ts
x-pack/plugins/security_solution/public/management/cypress_endpoint.config.js
# release notes script output
report.csv
report.asciidoc
# TS incremental build cache
*.tsbuildinfo
# Automatically generated and user-modifiable
/tsconfig.refs.json
*.type_check.json
# Yarn local mirror content
.yarn-local-mirror
# Bazel
.ijwb
/bazel
/bazel-*
.bazelrc.user
.bazelrc.cache
elastic-agent-*
fleet-server-*
elastic-agent.yml
fleet-server.yml
/packages/*/package-map.json
/packages/*/config-paths.json
/packages/kbn-synthetic-package-map/
**/.synthetics/
**/.journeys/
x-pack/test/security_api_integration/plugins/audit_log/audit.log
# ignore FTR temp directory
.ftr
role_users.json