Description
Enhancement Request: Enable JWT Access Token Update for PIT Context Manager to Prevent Expiry
Currently, the context manager for a Point-in-Time (PIT) in Elasticsearch does not allow for the update of JWT access tokens, which can lead to token expiry issues. When using the iterate
method to paginate through all data for a given PIT, the underlying Elastic client cannot be updated. This is because the context manager for a PIT creates a new instance of the Search
object, which is not accessible in the consuming code.
Reference: Elasticsearch DSL Search Code
As a result, authentication details, such as JWT access tokens, cannot be changed during the iteration process. If a JWT access token expires before the iteration through all data covered by a PIT is complete, the process will fail. This is because a new JWT access token cannot be used without losing the PIT.
This enhancement request seeks to address this limitation by allowing the update of JWT access tokens within the PIT context manager, ensuring seamless data iteration without authentication interruptions.