Skip to content

[8.19] [kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)#247794

Merged
kibanamachine merged 3 commits intoelastic:8.19from
kibanamachine:backport/8.19/pr-247630
Jan 5, 2026
Merged

[8.19] [kbn/scout] move samlAuth call to create ES security indexes after servers start (#247630)#247794
kibanamachine merged 3 commits intoelastic:8.19from
kibanamachine:backport/8.19/pr-247630

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

…rvers start (elastic#247630)

Originally we added this code as part of
`preCreateSecurityIndexesFixture` called in `globalSetupHook`.

It automatically enforces `global.setup.ts` creation even if the hook
has no tests-specific logic: file existence triggers the hook call.

This PR moves the logic to server start assuming it is only needed for
the local cluster and it should simplify Scout/Playwright hook logic and
make hook optional as it was originally intended.

From CI logs we can see indexes were created before Playwright tests
were started:
```

2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-tokens-7] with alias [.security-tokens] in project [default]
2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-tokens-7] in project [default], cause [api], templates [], shards [1]/[1]
2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-tokens-7]
2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-tokens-7][0]]])." previous.health="YELLOW" reason="shards started [[.security-tokens-7][0]]"
2025-12-30 15:41:35 UTC | info [o.e.x.s.s.SecurityIndexManager] [scout] security index does not exist, creating [.security-profile-8] with alias [.security-profile] in project [default]
2025-12-30 15:41:35 UTC | info [o.e.c.m.MetadataCreateIndexService] [scout] creating index [.security-profile-8] in project [default], cause [api], templates [], shards [1]/[1]
2025-12-30 15:41:35 UTC | info [o.e.c.r.a.AllocationService] [scout] in project [default] updating number_of_replicas to [0] for indices [.security-profile-8]
2025-12-30 15:41:36 UTC | info [o.e.c.r.a.AllocationService] [scout] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.security-profile-8][0]]])." previous.health="YELLOW" reason="shards started [[.security-profile-8][0]]"
2025-12-30 15:41:37 UTC | proc [kibana] [2025-12-30T15:41:37.010+00:00][INFO ][plugins.security.authentication] Login attempt with "saml" provider succeeded (requires redirect: true). {"service":{"node":{"roles":["background_tasks","ui"]}}}
2025-12-30 15:41:37 UTC | info starting [playwright] > /<redacted>kibana/node_modules/.bin/playwright test --config=x-pack/platform/plugins/private/discover_enhanced/test/scout/ui/parallel.playwright.config.ts --grep=@ess --project=local
```

(cherry picked from commit f109902)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jan 5, 2026
@kibanamachine kibanamachine enabled auto-merge (squash) January 5, 2026 10:41
@elasticmachine
Copy link
Copy Markdown
Contributor

💔 Build Failed

Failed CI Steps

cc @dmlemeshko

@kibanamachine kibanamachine merged commit c1863b9 into elastic:8.19 Jan 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants