Skip to content

Conversation

szwarckonrad
Copy link
Contributor

@szwarckonrad szwarckonrad commented Jul 8, 2025

Add read permissions for osquery manager result index pattern logs-osquery_manager.result-* to kibana_system role.

We need to be able to query these indices with full access using internal clients and set privileges in our services.

@szwarckonrad szwarckonrad added >enhancement :Security/Security Security issues without another label labels Jul 8, 2025
@szwarckonrad szwarckonrad requested a review from a team as a code owner July 8, 2025 14:20
@szwarckonrad szwarckonrad added Team:Security Meta label for security team v9.2.0 labels Jul 8, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

@elasticsearchmachine elasticsearchmachine added the external-contributor Pull request authored by a developer outside the Elasticsearch team label Jul 8, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @szwarckonrad, I've created a changelog YAML for you.

@szwarckonrad szwarckonrad added the cloud-deploy Publish cloud docker image for Cloud-First-Testing label Jul 10, 2025
@SiddharthMantri
Copy link
Contributor

The privileges are being added for a data index that matches the known collision pattern logs-* so we can allow this privilege. This pattern is documented here

@szwarckonrad szwarckonrad enabled auto-merge (squash) August 27, 2025 07:55
@szwarckonrad szwarckonrad merged commit 061562a into elastic:main Aug 27, 2025
40 checks passed
szwarckonrad added a commit to elastic/kibana that referenced this pull request Sep 10, 2025
# Add Namespace Awareness to Osquery Live Query and Action Results

## Dependencies

Depends on elastic/elasticsearch#130824

## Summary

Adds namespace awareness to osquery live query and action results to
ensure proper space isolation. Refactors frontend hooks to use API
endpoints as a necessary step to implement server-side namespace
filtering.

**Removed constraint requiring user to have access to
logs.osquery_manager.results-default index. Now user can use results
index from any namespace**

## Changes Made

### Namespace Awareness Implementation
- Added space-scoped integration namespace retrieval for osquery results
- Enhanced DSL queries to support space-aware index patterns
- Implemented proper space isolation to prevent cross-space data leakage
- Extended `OsqueryAppContextService` with namespace-aware capabilities

### Frontend Hook Refactoring (Required for Namespace Support)
- `use_all_results.ts`: Refactored to call API endpoint instead of
direct search strategy
- `use_action_results.ts`: Refactored to call new API endpoint instead
of direct search strategy
- Moved complex namespace logic to server-side for proper space
isolation
- Maintained backward compatibility for consuming components

### New API Infrastructure
- Created `action_results/get_action_results_route.ts` endpoint with
namespace support
- Enhanced existing live query results endpoint with namespace filtering
- Added proper request/response validation and route registration

### Server-Side Utilities
- New utility: `get_integration_namespaces.ts` for space-scoped
namespace retrieval
- New utility: `build_index_name_with_namespace.ts` for consistent index
pattern building
- Enhanced action results DSL with `integrationNamespaces` parameter
support
- Improved live query results DSL namespace handling

### Elasticsearch:
- Added `logs-osquery_manager.result-*` to `kibana_system` role so that
we can use internal es client (which in the end uses user with
`kibana_system` role) to query all indices but filter by user accessible
namespaces in our own services.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Tomasz Ciecierski <[email protected]>
eleonoramicozzi pushed a commit to eleonoramicozzi/kibana that referenced this pull request Sep 10, 2025
…225617)

# Add Namespace Awareness to Osquery Live Query and Action Results

## Dependencies

Depends on elastic/elasticsearch#130824

## Summary

Adds namespace awareness to osquery live query and action results to
ensure proper space isolation. Refactors frontend hooks to use API
endpoints as a necessary step to implement server-side namespace
filtering.

**Removed constraint requiring user to have access to
logs.osquery_manager.results-default index. Now user can use results
index from any namespace**

## Changes Made

### Namespace Awareness Implementation
- Added space-scoped integration namespace retrieval for osquery results
- Enhanced DSL queries to support space-aware index patterns
- Implemented proper space isolation to prevent cross-space data leakage
- Extended `OsqueryAppContextService` with namespace-aware capabilities

### Frontend Hook Refactoring (Required for Namespace Support)
- `use_all_results.ts`: Refactored to call API endpoint instead of
direct search strategy
- `use_action_results.ts`: Refactored to call new API endpoint instead
of direct search strategy
- Moved complex namespace logic to server-side for proper space
isolation
- Maintained backward compatibility for consuming components

### New API Infrastructure
- Created `action_results/get_action_results_route.ts` endpoint with
namespace support
- Enhanced existing live query results endpoint with namespace filtering
- Added proper request/response validation and route registration

### Server-Side Utilities
- New utility: `get_integration_namespaces.ts` for space-scoped
namespace retrieval
- New utility: `build_index_name_with_namespace.ts` for consistent index
pattern building
- Enhanced action results DSL with `integrationNamespaces` parameter
support
- Improved live query results DSL namespace handling

### Elasticsearch:
- Added `logs-osquery_manager.result-*` to `kibana_system` role so that
we can use internal es client (which in the end uses user with
`kibana_system` role) to query all indices but filter by user accessible
namespaces in our own services.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Tomasz Ciecierski <[email protected]>
KodeRad pushed a commit to KodeRad/kibana that referenced this pull request Sep 15, 2025
…225617)

# Add Namespace Awareness to Osquery Live Query and Action Results

## Dependencies

Depends on elastic/elasticsearch#130824

## Summary

Adds namespace awareness to osquery live query and action results to
ensure proper space isolation. Refactors frontend hooks to use API
endpoints as a necessary step to implement server-side namespace
filtering.

**Removed constraint requiring user to have access to
logs.osquery_manager.results-default index. Now user can use results
index from any namespace**

## Changes Made

### Namespace Awareness Implementation
- Added space-scoped integration namespace retrieval for osquery results
- Enhanced DSL queries to support space-aware index patterns
- Implemented proper space isolation to prevent cross-space data leakage
- Extended `OsqueryAppContextService` with namespace-aware capabilities

### Frontend Hook Refactoring (Required for Namespace Support)
- `use_all_results.ts`: Refactored to call API endpoint instead of
direct search strategy
- `use_action_results.ts`: Refactored to call new API endpoint instead
of direct search strategy
- Moved complex namespace logic to server-side for proper space
isolation
- Maintained backward compatibility for consuming components

### New API Infrastructure
- Created `action_results/get_action_results_route.ts` endpoint with
namespace support
- Enhanced existing live query results endpoint with namespace filtering
- Added proper request/response validation and route registration

### Server-Side Utilities
- New utility: `get_integration_namespaces.ts` for space-scoped
namespace retrieval
- New utility: `build_index_name_with_namespace.ts` for consistent index
pattern building
- Enhanced action results DSL with `integrationNamespaces` parameter
support
- Improved live query results DSL namespace handling

### Elasticsearch:
- Added `logs-osquery_manager.result-*` to `kibana_system` role so that
we can use internal es client (which in the end uses user with
`kibana_system` role) to query all indices but filter by user accessible
namespaces in our own services.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Tomasz Ciecierski <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Sep 24, 2025
…225617)

# Add Namespace Awareness to Osquery Live Query and Action Results

## Dependencies

Depends on elastic/elasticsearch#130824

## Summary

Adds namespace awareness to osquery live query and action results to
ensure proper space isolation. Refactors frontend hooks to use API
endpoints as a necessary step to implement server-side namespace
filtering.

**Removed constraint requiring user to have access to
logs.osquery_manager.results-default index. Now user can use results
index from any namespace**

## Changes Made

### Namespace Awareness Implementation
- Added space-scoped integration namespace retrieval for osquery results
- Enhanced DSL queries to support space-aware index patterns
- Implemented proper space isolation to prevent cross-space data leakage
- Extended `OsqueryAppContextService` with namespace-aware capabilities

### Frontend Hook Refactoring (Required for Namespace Support)
- `use_all_results.ts`: Refactored to call API endpoint instead of
direct search strategy
- `use_action_results.ts`: Refactored to call new API endpoint instead
of direct search strategy
- Moved complex namespace logic to server-side for proper space
isolation
- Maintained backward compatibility for consuming components

### New API Infrastructure
- Created `action_results/get_action_results_route.ts` endpoint with
namespace support
- Enhanced existing live query results endpoint with namespace filtering
- Added proper request/response validation and route registration

### Server-Side Utilities
- New utility: `get_integration_namespaces.ts` for space-scoped
namespace retrieval
- New utility: `build_index_name_with_namespace.ts` for consistent index
pattern building
- Enhanced action results DSL with `integrationNamespaces` parameter
support
- Improved live query results DSL namespace handling

### Elasticsearch:
- Added `logs-osquery_manager.result-*` to `kibana_system` role so that
we can use internal es client (which in the end uses user with
`kibana_system` role) to query all indices but filter by user accessible
namespaces in our own services.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Tomasz Ciecierski <[email protected]>
niros1 pushed a commit to elastic/kibana that referenced this pull request Sep 30, 2025
# Add Namespace Awareness to Osquery Live Query and Action Results

## Dependencies

Depends on elastic/elasticsearch#130824

## Summary

Adds namespace awareness to osquery live query and action results to
ensure proper space isolation. Refactors frontend hooks to use API
endpoints as a necessary step to implement server-side namespace
filtering.

**Removed constraint requiring user to have access to
logs.osquery_manager.results-default index. Now user can use results
index from any namespace**

## Changes Made

### Namespace Awareness Implementation
- Added space-scoped integration namespace retrieval for osquery results
- Enhanced DSL queries to support space-aware index patterns
- Implemented proper space isolation to prevent cross-space data leakage
- Extended `OsqueryAppContextService` with namespace-aware capabilities

### Frontend Hook Refactoring (Required for Namespace Support)
- `use_all_results.ts`: Refactored to call API endpoint instead of
direct search strategy
- `use_action_results.ts`: Refactored to call new API endpoint instead
of direct search strategy
- Moved complex namespace logic to server-side for proper space
isolation
- Maintained backward compatibility for consuming components

### New API Infrastructure
- Created `action_results/get_action_results_route.ts` endpoint with
namespace support
- Enhanced existing live query results endpoint with namespace filtering
- Added proper request/response validation and route registration

### Server-Side Utilities
- New utility: `get_integration_namespaces.ts` for space-scoped
namespace retrieval
- New utility: `build_index_name_with_namespace.ts` for consistent index
pattern building
- Enhanced action results DSL with `integrationNamespaces` parameter
support
- Improved live query results DSL namespace handling

### Elasticsearch:
- Added `logs-osquery_manager.result-*` to `kibana_system` role so that
we can use internal es client (which in the end uses user with
`kibana_system` role) to query all indices but filter by user accessible
namespaces in our own services.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Tomasz Ciecierski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloud-deploy Publish cloud docker image for Cloud-First-Testing >enhancement external-contributor Pull request authored by a developer outside the Elasticsearch team :Security/Security Security issues without another label Team:Security Meta label for security team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants