Skip to content

[8.19] Add kbn/test-saml-auth package (#259074)#260138

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

[8.19] Add kbn/test-saml-auth package (#259074)#260138
dmlemeshko merged 7 commits intoelastic:8.19from
dmlemeshko:backport/8.19/pr-259074

Conversation

@dmlemeshko
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

## 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 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:21
@dmlemeshko dmlemeshko requested a review from a team March 30, 2026 04:55
Comment thread .github/CODEOWNERS Outdated
src/platform/packages/private/kbn-test-eui-helpers @elastic/kibana-visualizations
x-pack/platform/test/licensing_plugin/plugins/test_feature_usage @elastic/kibana-security
src/platform/packages/shared/kbn-test-jest-helpers @elastic/kibana-operations @elastic/appex-qa
src/platform/packages/shared/kbn/test-saml-auth @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.

Does the path look correct? Shouldn't it be like this:

Suggested change
src/platform/packages/shared/kbn/test-saml-auth @elastic/appex-qa
src/platform/packages/shared/kbn-test-saml-auth @elastic/appex-qa

@dmlemeshko dmlemeshko requested a review from csr March 30, 2026 10:09
@dmlemeshko dmlemeshko merged commit 06de2eb into elastic:8.19 Mar 30, 2026
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 346 347 +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 412 413 +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.

4 participants