Skip to content
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

Fix the use of wildcard expressions for data streams in update aliases api #75526

Merged
merged 2 commits into from
Jul 21, 2021

Conversation

martijnvg
Copy link
Member

Prior to this change, supplying a wildcard expression in the indices field
of an alias action would always result in a 404, despite data streams existing
that could match with the provided wildcard expression.

Closes #75456

…s api.

Prior to this change, supplying a wildcard expression in the `indices` field
of an alias action would always result in a 404, despite data streams existing
that could match with the provided wildcard expression.

Closes elastic#75456
@martijnvg martijnvg added >bug v8.0.0 :Data Management/Data streams Data streams and their lifecycles auto-backport Automatically create backport pull requests when merged v7.14.1 v7.15.0 labels Jul 20, 2021
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Jul 20, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

@martijnvg martijnvg requested a review from danhermann July 20, 2021 11:48
@martijnvg
Copy link
Member Author

Note that the issue occurs when security resolves wildcard expressions into indices/data streams. AliasActions does support data streams, but IndicesAliasesRequest doesn't. The RBACEngine creates a list of authorised indices/data streams based from IndicesAliasesRequest and not each AliasActions. Therefor when security is resolving indices expressions for each AliasActions, all data streams are ignored, because data streams are not part of the list of authorized indices.

By letting IndicesAliasesRequest implement IndicesRequest and indicating that data streams are supported, the list of authorised indices will also include data streams when authorising alias actions that are part of an IndicesAliasesRequest request.

Copy link
Contributor

@danhermann danhermann left a comment

Choose a reason for hiding this comment

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

LGTM

@martijnvg martijnvg merged commit 641e051 into elastic:master Jul 21, 2021
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
7.14 Commit could not be cherrypicked due to conflicts
7.x Commit could not be cherrypicked due to conflicts

To backport manually run:
backport --pr 75526

martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Jul 21, 2021
…s api

Backporting elastic#75526 to 7.x branch.

Prior to this change, supplying a wildcard expression in the `indices` field
of an alias action would always result in a 404, despite data streams existing
that could match with the provided wildcard expression.

Closes elastic#75456
martijnvg added a commit to martijnvg/elasticsearch that referenced this pull request Jul 21, 2021
…s api

Backporting elastic#75526 to 7.x branch.

Prior to this change, supplying a wildcard expression in the `indices` field
of an alias action would always result in a 404, despite data streams existing
that could match with the provided wildcard expression.

Closes elastic#75456
martijnvg added a commit that referenced this pull request Jul 21, 2021
…s api (#75562)

Backporting #75526 to 7.x branch.

Prior to this change, supplying a wildcard expression in the `indices` field
of an alias action would always result in a 404, despite data streams existing
that could match with the provided wildcard expression.

Closes #75456
martijnvg added a commit that referenced this pull request Jul 21, 2021
…s api (#75563)

Backporting #75526 to 7.14 branch.

Prior to this change, supplying a wildcard expression in the `indices` field
of an alias action would always result in a 404, despite data streams existing
that could match with the provided wildcard expression.

Closes #75456
ywangd pushed a commit to ywangd/elasticsearch that referenced this pull request Jul 30, 2021
…s api (elastic#75526)

Prior to this change, supplying a wildcard expression in the `indices` field
of an alias action would always result in a 404, despite data streams existing
that could match with the provided wildcard expression.

Closes elastic#75456
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 v7.14.0 v7.15.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create data stream alias with action that uses wildcard expression fails.
6 participants