Skip to content

Move streams status actions to cluster:monitor group #131015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

lukewhiting
Copy link
Contributor

Changes the action name to ensure it's picked up as part of the "monitor" cluster role on the kibana system user

@lukewhiting lukewhiting added >bug :Data Management/Data streams Data streams and their lifecycles auto-backport Automatically create backport pull requests when merged v9.2.0 v9.1.1 labels Jul 10, 2025
@lukewhiting lukewhiting requested a review from Copilot July 10, 2025 13:42
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jul 10, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR moves the streams status action out of the cluster:admin group and into the cluster:monitor group so that it is included in the monitor cluster role for the Kibana system user.

  • Removed "cluster:admin/streams/status" from the admin privileges in the test constants
  • Added "cluster:monitor/streams/status" to the monitor privileges in the test constants
  • Updated StreamsStatusAction.INSTANCE to use "cluster:monitor/streams/status"

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
x-pack/plugin/security/qa/operator-privileges-tests/src/javaRestTest/java/org/elasticsearch/xpack/security/operator/Constants.java Removed old admin action and added new monitor action in the constants list
modules/streams/src/main/java/org/elasticsearch/rest/streams/logs/StreamsStatusAction.java Changed the ActionType name to cluster:monitor/streams/status
Comments suppressed due to low confidence (2)

x-pack/plugin/security/qa/operator-privileges-tests/src/javaRestTest/java/org/elasticsearch/xpack/security/operator/Constants.java:375

  • Consider adding or updating a dedicated test case to verify that the monitor role correctly includes the new "cluster:monitor/streams/status" privilege and that the old admin action has been removed.
        "cluster:monitor/streams/status",

modules/streams/src/main/java/org/elasticsearch/rest/streams/logs/StreamsStatusAction.java:27

  • [nitpick] Add a class-level JavaDoc comment to explain the purpose of this action and its usage within the streams logs module.
public class StreamsStatusAction {

@lukewhiting lukewhiting added v9.1.0 and removed v9.1.1 labels Jul 11, 2025
@masseyke masseyke self-requested a review July 11, 2025 17:38
@lukewhiting lukewhiting merged commit aa35985 into elastic:main Jul 14, 2025
33 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.19
9.1

lukewhiting added a commit to lukewhiting/elasticsearch that referenced this pull request Jul 14, 2025
* Move streams status actions to cluster:monitor group

* Update docs/changelog/131015.yaml
szybia added a commit to szybia/elasticsearch that referenced this pull request Jul 14, 2025
…king

* upstream/main: (33 commits)
  Allow both WithEntitlementsOnTestCode and EntitledTestPackages together (elastic#130826)
  Move streams status actions to cluster:monitor group (elastic#131015)
  Update JDK base image for OIDC fixture (elastic#131176)
  Mute org.elasticsearch.xpack.esql.ccq.MultiClustersIT testLookupJoinAliases elastic#131166
  Mute org.elasticsearch.index.engine.ThreadPoolMergeExecutorServiceDiskSpaceTests testEnqueuedMergeTasksAreUnblockedWhenEstimatedMergeSizeChanges elastic#131165
  Mute org.elasticsearch.xpack.esql.ccq.MultiClustersIT testNotLikeListKeyword elastic#131155
  Mute org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT test elastic#131154
  Check file entitlements on the Lucene FilterFileSystem in tests (elastic#130825)
  Mute org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT test {lookup-join.MvJoinKeyOnFromAfterStats ASYNC} elastic#131148
  Move FrequencyCappedAction to common package (elastic#131060)
  Mute org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT testStopQueryLocal elastic#121672
  Remove nesting from multi allocation decision (elastic#130844)
  Disable async search rest tests in release builds (elastic#131132)
  Fix testStopQueryLocal (elastic#131130)
  Fixes based on resharding disruption tests (elastic#130870)
  Remove inactive logger (elastic#131121)
  Add wait for remote start for the test (elastic#131124)
  Add existing shards allocator settings to failure store allowed list. (elastic#131056)
  Don't allow field caps to use semantic queries as index filters (elastic#131111)
  issue should be already fixed by elastic#121466 (elastic#130860)
  ...
elasticsearchmachine pushed a commit that referenced this pull request Jul 14, 2025
* Move streams status actions to cluster:monitor group

* Update docs/changelog/131015.yaml
elasticsearchmachine pushed a commit that referenced this pull request Jul 14, 2025
* Move streams status actions to cluster:monitor group

* Update docs/changelog/131015.yaml
@lukewhiting lukewhiting deleted the es-12309-restrictive-perms-on-streams-status branch July 14, 2025 13:47
flash1293 added a commit to elastic/kibana that referenced this pull request Jul 15, 2025
To check the streams status, cluster `monitor` permissions are needed
(elastic/elasticsearch#131015). Since the user
might not have this permission, the kibana system user should be used to
check the status ( effectively granting this access based on the Kibana
level feature privilege).
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 17, 2025
* Move streams status actions to cluster:monitor group

* Update docs/changelog/131015.yaml
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 17, 2025
* Move streams status actions to cluster:monitor group

* Update docs/changelog/131015.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged >bug :Data Management/Data streams Data streams and their lifecycles Team:Data Management Meta label for data/management team v8.19.0 v9.1.0 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants