Skip to content

[9.2] Add kbn/test-saml-auth package (#259074)#260137

Merged
dmlemeshko merged 3 commits intoelastic:9.2from
dmlemeshko:backport/9.2/pr-259074
Mar 30, 2026
Merged

[9.2] Add kbn/test-saml-auth package (#259074)#260137
dmlemeshko merged 3 commits intoelastic:9.2from
dmlemeshko:backport/9.2/pr-259074

Conversation

@dmlemeshko
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.2:

Questions ?

Please refer to the Backport tool documentation

## 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 dmlemeshko added the backport This PR is a backport of another PR label Mar 28, 2026
@dmlemeshko dmlemeshko enabled auto-merge (squash) March 28, 2026 09:11
@dmlemeshko dmlemeshko requested a review from a team March 30, 2026 04:33
src/platform/packages/shared/kbn-telemetry-config @elastic/kibana-core
src/platform/packages/shared/kbn-test @elastic/kibana-operations @elastic/appex-qa
src/platform/packages/shared/kbn-test-jest-helpers @elastic/kibana-operations @elastic/appex-qa
src/platform/packages/shared/kbn-test-saml-auth @elastic/kibana-operations @elastic/appex-qa
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see in some PRs we're setting ownership to both QA and Ops, in other ones just QA (example: https://github.com/elastic/kibana/pull/260138/files). I'm sure you're already aware, just checking if intentional.

@dmlemeshko dmlemeshko merged commit 0a64035 into elastic:9.2 Mar 30, 2026
12 of 14 checks passed
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/test 348 349 +1
@kbn/test-saml-auth - 32 +32
total +33

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/test 5 3 -2
@kbn/test-saml-auth - 2 +2
total -0
Unknown metric groups

API count

id before after diff
@kbn/test 414 415 +1
@kbn/test-saml-auth - 33 +33
total +34

History

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