Skip to content

[One Workflow] fix: spaces in internal actions#241066

Merged
shahargl merged 3 commits intoelastic:mainfrom
shahargl:bugfix/internal-actions-space
Oct 29, 2025
Merged

[One Workflow] fix: spaces in internal actions#241066
shahargl merged 3 commits intoelastic:mainfrom
shahargl:bugfix/internal-actions-space

Conversation

@shahargl
Copy link
Copy Markdown
Contributor

Summary

Fixes internal Kibana actions not respecting space context when executed through workflows.

Problem

Actions were executing in the default space regardless of which space the workflow was running in, breaking space isolation.

Solution

  • Pass spaceId from workflow context to buildKibanaRequestFromAction
  • Apply /s/{spaceId} prefix to API paths for non-default spaces
  • Maintain correct behavior for default space (no prefix required)

Impact

All 454+ Kibana internal actions now correctly execute in their intended space context.

Closes https://github.com/elastic/security-team/issues/14425

@shahargl shahargl requested a review from a team as a code owner October 29, 2025 08:04
@shahargl shahargl self-assigned this Oct 29, 2025
@shahargl shahargl added backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes labels Oct 29, 2025
@rosomri rosomri added the Team:One Workflow Team label for One Workflow (Workflow automation) label Oct 29, 2025
Copy link
Copy Markdown
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

LGTM!

@semd semd changed the title fix: spaces in internal actions [One Workflow] fix: spaces in internal actions Oct 29, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #91 / discover/context_awareness extension getAdditionalCellActions data view mode should render additional cell actions for logs data source

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/workflows 302 303 +1
Unknown metric groups

API count

id before after diff
@kbn/workflows 324 325 +1

cc @shahargl

@shahargl shahargl merged commit c7c5715 into elastic:main Oct 29, 2025
14 checks passed
tkajtoch pushed a commit to tkajtoch/kibana that referenced this pull request Oct 29, 2025
## Summary
Fixes internal Kibana actions not respecting space context when executed
through workflows.

## Problem
Actions were executing in the default space regardless of which space
the workflow was running in, breaking space isolation.

## Solution
- Pass `spaceId` from workflow context to `buildKibanaRequestFromAction`
- Apply `/s/{spaceId}` prefix to API paths for non-default spaces
- Maintain correct behavior for default space (no prefix required)

## Impact
All 454+ Kibana internal actions now correctly execute in their intended
space context.

Closes elastic/security-team#14425
qn895 pushed a commit to qn895/kibana that referenced this pull request Oct 30, 2025
## Summary
Fixes internal Kibana actions not respecting space context when executed
through workflows.

## Problem
Actions were executing in the default space regardless of which space
the workflow was running in, breaking space isolation.

## Solution
- Pass `spaceId` from workflow context to `buildKibanaRequestFromAction`
- Apply `/s/{spaceId}` prefix to API paths for non-default spaces
- Maintain correct behavior for default space (no prefix required)

## Impact
All 454+ Kibana internal actions now correctly execute in their intended
space context.

Closes elastic/security-team#14425
ana-davydova pushed a commit to ana-davydova/kibana that referenced this pull request Nov 3, 2025
## Summary
Fixes internal Kibana actions not respecting space context when executed
through workflows.

## Problem
Actions were executing in the default space regardless of which space
the workflow was running in, breaking space isolation.

## Solution
- Pass `spaceId` from workflow context to `buildKibanaRequestFromAction`
- Apply `/s/{spaceId}` prefix to API paths for non-default spaces
- Maintain correct behavior for default space (no prefix required)

## Impact
All 454+ Kibana internal actions now correctly execute in their intended
space context.

Closes elastic/security-team#14425
albertoblaz pushed a commit to albertoblaz/kibana that referenced this pull request Nov 4, 2025
## Summary
Fixes internal Kibana actions not respecting space context when executed
through workflows.

## Problem
Actions were executing in the default space regardless of which space
the workflow was running in, breaking space isolation.

## Solution
- Pass `spaceId` from workflow context to `buildKibanaRequestFromAction`
- Apply `/s/{spaceId}` prefix to API paths for non-default spaces
- Maintain correct behavior for default space (no prefix required)

## Impact
All 454+ Kibana internal actions now correctly execute in their intended
space context.

Closes elastic/security-team#14425
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:One Workflow Team label for One Workflow (Workflow automation) v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants