Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust user management functional tests to work in Cloud. #118315

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

azasypkin
Copy link
Member

@azasypkin azasypkin commented Nov 11, 2021

Summary

Some of our user management functional tests are failing when run against Cloud deployment. The reason is that default users in Cloud are defined in the file realm and hence not returned from the users APIs.

It turned out that we already tried to fix this test to work in Cloud using the workaround (config.get('servers.elasticsearch.hostname') !== 'localhost'), but the test broke again when the Cloud disabled anonymous access by default.

In this PR I'm reusing the same Cloud-detection workaround and updating the test.

Blocked: We cannot verify fix at the moment, 8.1.0-SHANPSHOT is failing in Cloud and latest 7.16.0-SNAPSHOT doesn't include #118413 yet. The tests with the same fix have passed on 7.16 branch (link is internal, ping me and I'll share the link),

Fixes: #63276

@azasypkin azasypkin added test Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! test-cloud v7.16.0 v8.0.0 v8.1.0 labels Nov 11, 2021
@azasypkin azasypkin force-pushed the issue-63276-cloud-user-tests branch from 6b44a8d to f488f91 Compare November 16, 2021 08:05
@elastic elastic deleted a comment from kibanamachine Nov 16, 2021
@azasypkin azasypkin force-pushed the issue-63276-cloud-user-tests branch from f488f91 to b93e9f0 Compare November 17, 2021 07:05
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

  • 💛 Build #6909 was flaky f488f916931bdc0181d5fdcba5c3b78453f64add
  • 💚 Build #6129 succeeded 6b44a8d23e06512705ac7a00a793a8da4c7d9713

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

@azasypkin azasypkin removed the blocked label Nov 17, 2021
@azasypkin azasypkin marked this pull request as ready for review November 17, 2021 08:42
@azasypkin azasypkin requested a review from a team as a code owner November 17, 2021 08:42
@elasticmachine
Copy link
Contributor

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

@azasypkin azasypkin added auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes labels Nov 17, 2021

// In Cloud default users are defined in file realm, such users aren't exposed through the Users API.
if (isCloudEnvironment()) {
expect(Object.keys(users)).to.eql(['test_user']);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this change? Is there a skipCloud tag we could use similar to skipFirefox?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a skipCloud tag we could use similar to skipFirefox?

There is skipCloud, but it'd still be beneficial to test the Cloud default users (or lack thereof). I think what we need is onlyCloud so that we can have a separate test suite for the Cloud, but afaik we don't have this yet.

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0
7.16

The backport PRs will be merged automatically after passing CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! test test-cloud v7.16.0 v8.0.0 v8.1.0
Projects
None yet
5 participants