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

Reindex with wait_for_completion=false does not return deprecation warnings if security is enabled #120252

Open
tvernum opened this issue Jan 16, 2025 · 2 comments
Labels
>bug :Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Distributed Indexing Meta label for Distributed Indexing team Team:Security Meta label for security team

Comments

@tvernum
Copy link
Contributor

tvernum commented Jan 16, 2025

The reindex YAML tests check that a deprecation warning is returned if a sort is provided and wait_for_completion is false.

  • "Sorting deprecated wait_for_completion false":
    - requires:
    cluster_features: ["gte_v7.6.0"]
    reason: "sort deprecated in 7.6"
    test_runner_features: "warnings"
    - do:
    index:
    index: test
    id: "1"
    body: { "order": 1 }
    - do:
    indices.refresh: {}
    - do:
    warnings:
    - The sort option in reindex is deprecated. Instead consider using query
    filtering to find the desired subset of data.
    reindex:
    refresh: true
    wait_for_completion: false
    body:
    source:
    index: test
    sort: order
    dest:
    index: target
    - set: {task: task}
    - do:
    tasks.get:
    wait_for_completion: true
    task_id: $task

This was added in #49855

However this behaviour does not work if security is enabled.

The behaviour depends on the transport action (and therefore the validator) executing within the same ThreadContext as the rest action so that theWarning response header can be returned on the http channel.

However, because security introduces asynchronous authorization steps into the action dispatch, the rest action is (sometimes) complete before the transport action executes, and the transport response headers are not returned to the client.

@tvernum tvernum added :Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC >bug labels Jan 16, 2025
@elasticsearchmachine elasticsearchmachine added Team:Security Meta label for security team Team:Distributed Indexing Meta label for Distributed Indexing team labels Jan 16, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed Indexing/Reindex Issues relating to reindex that are not caused by issues further down :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Distributed Indexing Meta label for Distributed Indexing team Team:Security Meta label for security team
Projects
None yet
Development

No branches or pull requests

2 participants