Skip to content

Add kbn/test-saml-auth package#259074

Merged
dmlemeshko merged 20 commits intoelastic:mainfrom
dmlemeshko:add-kbn-test-saml-auth
Mar 27, 2026
Merged

Add kbn/test-saml-auth package#259074
dmlemeshko merged 20 commits intoelastic:mainfrom
dmlemeshko:add-kbn-test-saml-auth

Conversation

@dmlemeshko
Copy link
Copy Markdown
Contributor

@dmlemeshko dmlemeshko commented Mar 23, 2026

Summary

@kbn/test-saml-auth is a dev-only shared package used by FTR, Scout, Cypress, and similar tooling to obtain SAML-backed session cookies / API credentials for predefined roles against Kibana (local or Elastic Cloud). It exposes SamlSessionManager and related types (HostOptions, GetCookieOptions, Role, etc.).

Why

@kbn/test is the bigger FTR / test-runner harness (servers, configs, providers, etc.). SAML session handling is a narrow, reusable capability used by @kbn/test, kbn/scout, Cypress helpers, and other tooling that only need “log in as role X” without the rest of the FTR stack.

Keeping SAML in @kbn/test-saml-auth:

  • Lets those consumers depend on a small, focused package instead of @kbn/test.
  • Avoids tying every SAML use case to the full test-runner dependency graph.
  • Keeps SamlSessionManager and its HTTP/auth details in one place; @kbn/test can stay a thin re-export for FTR ergonomics without owning the implementation.

@dmlemeshko dmlemeshko changed the title Add kbn test saml auth Add kbn/test-saml-auth Mar 23, 2026
@dmlemeshko dmlemeshko added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels labels Mar 23, 2026
@dmlemeshko dmlemeshko changed the title Add kbn/test-saml-auth Add kbn/test-saml-auth package Mar 23, 2026
@dmlemeshko dmlemeshko added backport:all-open Backport to all branches that could still receive a release and removed backport:version Backport to applied version labels labels Mar 23, 2026
@dmlemeshko dmlemeshko marked this pull request as ready for review March 23, 2026 13:56
@dmlemeshko dmlemeshko requested a review from a team as a code owner March 23, 2026 13:56
@dmlemeshko dmlemeshko requested review from a team as code owners March 23, 2026 13:56
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 51b4c0b3-02e8-4d6a-9f67-6c10a84219bc

📥 Commits

Reviewing files that changed from the base of the PR and between 52e79ca and 0c048e2.

📒 Files selected for processing (1)
  • .github/CODEOWNERS
✅ Files skipped from review due to trivial changes (1)
  • .github/CODEOWNERS

📝 Walkthrough

Walkthrough

This pull request extracts SAML authentication functionality from the @kbn/test package into a new standalone package, @kbn/test-saml-auth. The changes include creating package scaffolding files (package.json, kibana.jsonc, moon.yml, jest.config.js, tsconfig.json), implementing SAML-related modules (fetch_kibana_version, refactored session_manager), and updating imports across multiple packages to reference the new source. TypeScript references and build dependencies are added to consuming packages, and CODEOWNERS is configured for the new package.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

@maximpn maximpn requested review from maximpn and removed request for dplumlee March 23, 2026 14:35
@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress

  • Buildkite Build
  • Commit: 45b3cf4
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-259074-45b3cf469df0

History

@dmlemeshko dmlemeshko merged commit d9cdddc into elastic:main Mar 27, 2026
19 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.19, 9.2, 9.3

https://github.com/elastic/kibana/actions/runs/23637253096

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.19:
- Add shared validation runner package (#258768)
- move kbn-client into its own package (#258963)
- Update dependency @moonrepo/cli to v2 (main) (#256118)
- [Ai4DSoc][Serverless] Update search_ai_lake tier specific roles (#229919)
- [Security Solution] [SKA] Moved cypress folder (#230198)
9.2 Backport failed because of merge conflicts
9.3 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.3:
- move kbn-client into its own package (#258963)
- Update dependency @moonrepo/cli to v2 (main) (#256118)

Manual backport

To create the backport manually run:

node scripts/backport --pr 259074

Questions ?

Please refer to the Backport tool documentation

dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Mar 28, 2026
## Summary

`@kbn/test-saml-auth` is a `dev-only` shared package used by FTR, Scout,
Cypress, and similar tooling to obtain SAML-backed session cookies / API
credentials for predefined roles against Kibana (local or Elastic
Cloud). It exposes SamlSessionManager and related types (HostOptions,
GetCookieOptions, Role, etc.).

### Why

`@kbn/test` is the bigger FTR / test-runner harness (servers, configs,
providers, etc.). SAML session handling is a narrow, reusable capability
used by `@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling
that only need “log in as role X” without the rest of the FTR stack.

Keeping SAML in `@kbn/test-saml-auth`:

- Lets those consumers depend on a small, focused package instead of
`@kbn/test`.
- Avoids tying every SAML use case to the full test-runner dependency
graph.
- Keeps `SamlSessionManager` and its HTTP/auth details in one place;
`@kbn/test` can stay a thin re-export for FTR ergonomics without owning
the implementation.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d9cdddc)

# Conflicts:
#	packages/kbn-repo-source-classifier/src/repo_source_classifier.ts
@dmlemeshko
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Mar 28, 2026
## Summary

`@kbn/test-saml-auth` is a `dev-only` shared package used by FTR, Scout,
Cypress, and similar tooling to obtain SAML-backed session cookies / API
credentials for predefined roles against Kibana (local or Elastic
Cloud). It exposes SamlSessionManager and related types (HostOptions,
GetCookieOptions, Role, etc.).

### Why

`@kbn/test` is the bigger FTR / test-runner harness (servers, configs,
providers, etc.). SAML session handling is a narrow, reusable capability
used by `@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling
that only need “log in as role X” without the rest of the FTR stack.

Keeping SAML in `@kbn/test-saml-auth`:

- Lets those consumers depend on a small, focused package instead of
`@kbn/test`.
- Avoids tying every SAML use case to the full test-runner dependency
graph.
- Keeps `SamlSessionManager` and its HTTP/auth details in one place;
`@kbn/test` can stay a thin re-export for FTR ergonomics without owning
the implementation.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d9cdddc)

# Conflicts:
#	packages/kbn-repo-source-classifier/src/repo_source_classifier.ts
#	src/platform/packages/shared/kbn-test-saml-auth/src/session_manager.ts
#	x-pack/solutions/security/test/security_solution_cypress/cypress/tsconfig.json
@dmlemeshko
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.2

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Mar 28, 2026
## Summary

`@kbn/test-saml-auth` is a `dev-only` shared package used by FTR, Scout,
Cypress, and similar tooling to obtain SAML-backed session cookies / API
credentials for predefined roles against Kibana (local or Elastic
Cloud). It exposes SamlSessionManager and related types (HostOptions,
GetCookieOptions, Role, etc.).

### Why

`@kbn/test` is the bigger FTR / test-runner harness (servers, configs,
providers, etc.). SAML session handling is a narrow, reusable capability
used by `@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling
that only need “log in as role X” without the rest of the FTR stack.

Keeping SAML in `@kbn/test-saml-auth`:

- Lets those consumers depend on a small, focused package instead of
`@kbn/test`.
- Avoids tying every SAML use case to the full test-runner dependency
graph.
- Keeps `SamlSessionManager` and its HTTP/auth details in one place;
`@kbn/test` can stay a thin re-export for FTR ergonomics without owning
the implementation.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit d9cdddc)

# Conflicts:
#	.github/CODEOWNERS
#	packages/kbn-repo-source-classifier/src/repo_source_classifier.ts
#	src/platform/packages/shared/kbn-ftr-common-functional-services/services/saml_auth/serverless/auth_provider.ts
#	src/platform/packages/shared/kbn-scout/src/common/constants.ts
#	src/platform/packages/shared/kbn-scout/src/common/services/saml_auth.ts
#	src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/core_fixtures.ts
#	src/platform/packages/shared/kbn-test-saml-auth/src/session_manager.test.ts
#	src/platform/packages/shared/kbn-test-saml-auth/src/session_manager.ts
#	x-pack/solutions/security/test/security_solution_cypress/cypress/support/saml_auth.ts
#	x-pack/solutions/security/test/security_solution_cypress/cypress/tsconfig.json
@dmlemeshko
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Mar 30, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @dmlemeshko

dmlemeshko added a commit that referenced this pull request Mar 30, 2026
# Backport

This will backport the following commits from `main` to `9.2`:
- [Add kbn/test-saml-auth package
(#259074)](#259074)

<!--- Backport version: 11.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2026-03-27T08:13:23Z","message":"Add
kbn/test-saml-auth package (#259074)\n\n##
Summary\n\n`@kbn/test-saml-auth` is a `dev-only` shared package used by
FTR, Scout,\nCypress, and similar tooling to obtain SAML-backed session
cookies / API\ncredentials for predefined roles against Kibana (local or
Elastic\nCloud). It exposes SamlSessionManager and related types
(HostOptions,\nGetCookieOptions, Role, etc.).\n\n### Why\n\n`@kbn/test`
is the bigger FTR / test-runner harness (servers, configs,\nproviders,
etc.). SAML session handling is a narrow, reusable capability\nused by
`@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling\nthat only
need “log in as role X” without the rest of the FTR stack.\n\nKeeping
SAML in `@kbn/test-saml-auth`:\n\n- Lets those consumers depend on a
small, focused package instead of\n`@kbn/test`.\n- Avoids tying every
SAML use case to the full test-runner dependency\ngraph.\n- Keeps
`SamlSessionManager` and its HTTP/auth details in one
place;\n`@kbn/test` can stay a thin re-export for FTR ergonomics without
owning\nthe implementation.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d9cdddc9730c89c0c05753fa2127f7495f63fe9f","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","ci:build-serverless-image","v9.4.0"],"title":"Add
kbn/test-saml-auth
package","number":259074,"url":"https://github.com/elastic/kibana/pull/259074","mergeCommit":{"message":"Add
kbn/test-saml-auth package (#259074)\n\n##
Summary\n\n`@kbn/test-saml-auth` is a `dev-only` shared package used by
FTR, Scout,\nCypress, and similar tooling to obtain SAML-backed session
cookies / API\ncredentials for predefined roles against Kibana (local or
Elastic\nCloud). It exposes SamlSessionManager and related types
(HostOptions,\nGetCookieOptions, Role, etc.).\n\n### Why\n\n`@kbn/test`
is the bigger FTR / test-runner harness (servers, configs,\nproviders,
etc.). SAML session handling is a narrow, reusable capability\nused by
`@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling\nthat only
need “log in as role X” without the rest of the FTR stack.\n\nKeeping
SAML in `@kbn/test-saml-auth`:\n\n- Lets those consumers depend on a
small, focused package instead of\n`@kbn/test`.\n- Avoids tying every
SAML use case to the full test-runner dependency\ngraph.\n- Keeps
`SamlSessionManager` and its HTTP/auth details in one
place;\n`@kbn/test` can stay a thin re-export for FTR ergonomics without
owning\nthe implementation.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d9cdddc9730c89c0c05753fa2127f7495f63fe9f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/259074","number":259074,"mergeCommit":{"message":"Add
kbn/test-saml-auth package (#259074)\n\n##
Summary\n\n`@kbn/test-saml-auth` is a `dev-only` shared package used by
FTR, Scout,\nCypress, and similar tooling to obtain SAML-backed session
cookies / API\ncredentials for predefined roles against Kibana (local or
Elastic\nCloud). It exposes SamlSessionManager and related types
(HostOptions,\nGetCookieOptions, Role, etc.).\n\n### Why\n\n`@kbn/test`
is the bigger FTR / test-runner harness (servers, configs,\nproviders,
etc.). SAML session handling is a narrow, reusable capability\nused by
`@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling\nthat only
need “log in as role X” without the rest of the FTR stack.\n\nKeeping
SAML in `@kbn/test-saml-auth`:\n\n- Lets those consumers depend on a
small, focused package instead of\n`@kbn/test`.\n- Avoids tying every
SAML use case to the full test-runner dependency\ngraph.\n- Keeps
`SamlSessionManager` and its HTTP/auth details in one
place;\n`@kbn/test` can stay a thin re-export for FTR ergonomics without
owning\nthe implementation.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d9cdddc9730c89c0c05753fa2127f7495f63fe9f"}},{"url":"https://github.com/elastic/kibana/pull/260136","number":260136,"branch":"9.3","state":"OPEN"}]}]
BACKPORT-->
dmlemeshko added a commit that referenced this pull request Mar 30, 2026
# Backport

This will backport the following commits from `main` to `9.3`:
- [Add kbn/test-saml-auth package
(#259074)](#259074)

<!--- Backport version: 11.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2026-03-27T08:13:23Z","message":"Add
kbn/test-saml-auth package (#259074)\n\n##
Summary\n\n`@kbn/test-saml-auth` is a `dev-only` shared package used by
FTR, Scout,\nCypress, and similar tooling to obtain SAML-backed session
cookies / API\ncredentials for predefined roles against Kibana (local or
Elastic\nCloud). It exposes SamlSessionManager and related types
(HostOptions,\nGetCookieOptions, Role, etc.).\n\n### Why\n\n`@kbn/test`
is the bigger FTR / test-runner harness (servers, configs,\nproviders,
etc.). SAML session handling is a narrow, reusable capability\nused by
`@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling\nthat only
need “log in as role X” without the rest of the FTR stack.\n\nKeeping
SAML in `@kbn/test-saml-auth`:\n\n- Lets those consumers depend on a
small, focused package instead of\n`@kbn/test`.\n- Avoids tying every
SAML use case to the full test-runner dependency\ngraph.\n- Keeps
`SamlSessionManager` and its HTTP/auth details in one
place;\n`@kbn/test` can stay a thin re-export for FTR ergonomics without
owning\nthe implementation.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d9cdddc9730c89c0c05753fa2127f7495f63fe9f","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","ci:build-serverless-image","v9.4.0"],"title":"Add
kbn/test-saml-auth
package","number":259074,"url":"https://github.com/elastic/kibana/pull/259074","mergeCommit":{"message":"Add
kbn/test-saml-auth package (#259074)\n\n##
Summary\n\n`@kbn/test-saml-auth` is a `dev-only` shared package used by
FTR, Scout,\nCypress, and similar tooling to obtain SAML-backed session
cookies / API\ncredentials for predefined roles against Kibana (local or
Elastic\nCloud). It exposes SamlSessionManager and related types
(HostOptions,\nGetCookieOptions, Role, etc.).\n\n### Why\n\n`@kbn/test`
is the bigger FTR / test-runner harness (servers, configs,\nproviders,
etc.). SAML session handling is a narrow, reusable capability\nused by
`@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling\nthat only
need “log in as role X” without the rest of the FTR stack.\n\nKeeping
SAML in `@kbn/test-saml-auth`:\n\n- Lets those consumers depend on a
small, focused package instead of\n`@kbn/test`.\n- Avoids tying every
SAML use case to the full test-runner dependency\ngraph.\n- Keeps
`SamlSessionManager` and its HTTP/auth details in one
place;\n`@kbn/test` can stay a thin re-export for FTR ergonomics without
owning\nthe implementation.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d9cdddc9730c89c0c05753fa2127f7495f63fe9f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/259074","number":259074,"mergeCommit":{"message":"Add
kbn/test-saml-auth package (#259074)\n\n##
Summary\n\n`@kbn/test-saml-auth` is a `dev-only` shared package used by
FTR, Scout,\nCypress, and similar tooling to obtain SAML-backed session
cookies / API\ncredentials for predefined roles against Kibana (local or
Elastic\nCloud). It exposes SamlSessionManager and related types
(HostOptions,\nGetCookieOptions, Role, etc.).\n\n### Why\n\n`@kbn/test`
is the bigger FTR / test-runner harness (servers, configs,\nproviders,
etc.). SAML session handling is a narrow, reusable capability\nused by
`@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling\nthat only
need “log in as role X” without the rest of the FTR stack.\n\nKeeping
SAML in `@kbn/test-saml-auth`:\n\n- Lets those consumers depend on a
small, focused package instead of\n`@kbn/test`.\n- Avoids tying every
SAML use case to the full test-runner dependency\ngraph.\n- Keeps
`SamlSessionManager` and its HTTP/auth details in one
place;\n`@kbn/test` can stay a thin re-export for FTR ergonomics without
owning\nthe implementation.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d9cdddc9730c89c0c05753fa2127f7495f63fe9f"}}]}]
BACKPORT-->
dmlemeshko added a commit that referenced this pull request Mar 30, 2026
# Backport

This will backport the following commits from `main` to `8.19`:
- [Add kbn/test-saml-auth package
(#259074)](#259074)

<!--- Backport version: 11.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2026-03-27T08:13:23Z","message":"Add
kbn/test-saml-auth package (#259074)\n\n##
Summary\n\n`@kbn/test-saml-auth` is a `dev-only` shared package used by
FTR, Scout,\nCypress, and similar tooling to obtain SAML-backed session
cookies / API\ncredentials for predefined roles against Kibana (local or
Elastic\nCloud). It exposes SamlSessionManager and related types
(HostOptions,\nGetCookieOptions, Role, etc.).\n\n### Why\n\n`@kbn/test`
is the bigger FTR / test-runner harness (servers, configs,\nproviders,
etc.). SAML session handling is a narrow, reusable capability\nused by
`@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling\nthat only
need “log in as role X” without the rest of the FTR stack.\n\nKeeping
SAML in `@kbn/test-saml-auth`:\n\n- Lets those consumers depend on a
small, focused package instead of\n`@kbn/test`.\n- Avoids tying every
SAML use case to the full test-runner dependency\ngraph.\n- Keeps
`SamlSessionManager` and its HTTP/auth details in one
place;\n`@kbn/test` can stay a thin re-export for FTR ergonomics without
owning\nthe implementation.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d9cdddc9730c89c0c05753fa2127f7495f63fe9f","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","ci:build-serverless-image","v9.4.0"],"title":"Add
kbn/test-saml-auth
package","number":259074,"url":"https://github.com/elastic/kibana/pull/259074","mergeCommit":{"message":"Add
kbn/test-saml-auth package (#259074)\n\n##
Summary\n\n`@kbn/test-saml-auth` is a `dev-only` shared package used by
FTR, Scout,\nCypress, and similar tooling to obtain SAML-backed session
cookies / API\ncredentials for predefined roles against Kibana (local or
Elastic\nCloud). It exposes SamlSessionManager and related types
(HostOptions,\nGetCookieOptions, Role, etc.).\n\n### Why\n\n`@kbn/test`
is the bigger FTR / test-runner harness (servers, configs,\nproviders,
etc.). SAML session handling is a narrow, reusable capability\nused by
`@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling\nthat only
need “log in as role X” without the rest of the FTR stack.\n\nKeeping
SAML in `@kbn/test-saml-auth`:\n\n- Lets those consumers depend on a
small, focused package instead of\n`@kbn/test`.\n- Avoids tying every
SAML use case to the full test-runner dependency\ngraph.\n- Keeps
`SamlSessionManager` and its HTTP/auth details in one
place;\n`@kbn/test` can stay a thin re-export for FTR ergonomics without
owning\nthe implementation.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d9cdddc9730c89c0c05753fa2127f7495f63fe9f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/259074","number":259074,"mergeCommit":{"message":"Add
kbn/test-saml-auth package (#259074)\n\n##
Summary\n\n`@kbn/test-saml-auth` is a `dev-only` shared package used by
FTR, Scout,\nCypress, and similar tooling to obtain SAML-backed session
cookies / API\ncredentials for predefined roles against Kibana (local or
Elastic\nCloud). It exposes SamlSessionManager and related types
(HostOptions,\nGetCookieOptions, Role, etc.).\n\n### Why\n\n`@kbn/test`
is the bigger FTR / test-runner harness (servers, configs,\nproviders,
etc.). SAML session handling is a narrow, reusable capability\nused by
`@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling\nthat only
need “log in as role X” without the rest of the FTR stack.\n\nKeeping
SAML in `@kbn/test-saml-auth`:\n\n- Lets those consumers depend on a
small, focused package instead of\n`@kbn/test`.\n- Avoids tying every
SAML use case to the full test-runner dependency\ngraph.\n- Keeps
`SamlSessionManager` and its HTTP/auth details in one
place;\n`@kbn/test` can stay a thin re-export for FTR ergonomics without
owning\nthe implementation.\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d9cdddc9730c89c0c05753fa2127f7495f63fe9f"}},{"url":"https://github.com/elastic/kibana/pull/260136","number":260136,"branch":"9.3","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/260137","number":260137,"branch":"9.2","state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine added v8.19.14 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Mar 30, 2026
jeramysoucy pushed a commit to jeramysoucy/kibana that referenced this pull request Apr 1, 2026
## Summary

`@kbn/test-saml-auth` is a `dev-only` shared package used by FTR, Scout,
Cypress, and similar tooling to obtain SAML-backed session cookies / API
credentials for predefined roles against Kibana (local or Elastic
Cloud). It exposes SamlSessionManager and related types (HostOptions,
GetCookieOptions, Role, etc.).

### Why

`@kbn/test` is the bigger FTR / test-runner harness (servers, configs,
providers, etc.). SAML session handling is a narrow, reusable capability
used by `@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling
that only need “log in as role X” without the rest of the FTR stack.

Keeping SAML in `@kbn/test-saml-auth`:

- Lets those consumers depend on a small, focused package instead of
`@kbn/test`.
- Avoids tying every SAML use case to the full test-runner dependency
graph.
- Keeps `SamlSessionManager` and its HTTP/auth details in one place;
`@kbn/test` can stay a thin re-export for FTR ergonomics without owning
the implementation.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
paulinashakirova pushed a commit to paulinashakirova/kibana that referenced this pull request Apr 2, 2026
## Summary

`@kbn/test-saml-auth` is a `dev-only` shared package used by FTR, Scout,
Cypress, and similar tooling to obtain SAML-backed session cookies / API
credentials for predefined roles against Kibana (local or Elastic
Cloud). It exposes SamlSessionManager and related types (HostOptions,
GetCookieOptions, Role, etc.).

### Why

`@kbn/test` is the bigger FTR / test-runner harness (servers, configs,
providers, etc.). SAML session handling is a narrow, reusable capability
used by `@kbn/test`, `kbn/scout`, Cypress helpers, and other tooling
that only need “log in as role X” without the rest of the FTR stack.

Keeping SAML in `@kbn/test-saml-auth`:

- Lets those consumers depend on a small, focused package instead of
`@kbn/test`.
- Avoids tying every SAML use case to the full test-runner dependency
graph.
- Keeps `SamlSessionManager` and its HTTP/auth details in one place;
`@kbn/test` can stay a thin re-export for FTR ergonomics without owning
the implementation.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:all-open Backport to all branches that could still receive a release ci:build-serverless-image release_note:skip Skip the PR/issue when compiling release notes v8.19.14 v9.2.8 v9.3.3 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants