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

[7.17] Add API to refresh authc headers and retry ES request when 401 is encountered (#120677) #123230

Closed
wants to merge 4 commits into from

Conversation

pgayvallet
Copy link
Contributor

Backport

This is an automatic backport to 7.17 of:

Questions ?

Please refer to the Backport tool documentation

…ountered (elastic#120677)

* initial POC

* remove test code

* update the header holding logic

* add new API to plugin context

* introduce the IAuthHeadersStorage interface

* fix some types, mocks and tests

* export types from server entrypoint

* also export error type

* more doc

* update generated doc

* Fix ES service tests

* add tests for createInternalErrorHandler

* fix type in cli_setup

* generated doc

* add tests for configureClient

* add unit tests for custom transport class

* fix handler propagation to initial clients

* lint

* address review comments

(cherry picked from commit b606054)

# Conflicts:
#	src/cli_setup/utils.ts
#	src/core/server/elasticsearch/client/cluster_client.ts
#	src/core/server/elasticsearch/client/configure_client.ts
#	src/core/server/elasticsearch/client/errors.ts
#	src/core/server/elasticsearch/elasticsearch_service.ts
#	src/core/server/elasticsearch/index.ts
#	src/core/server/http/auth_headers_storage.ts
#	src/core/server/index.ts
#	src/core/server/server.api.md
@pgayvallet pgayvallet enabled auto-merge (squash) January 18, 2022 14:01
@kibana-ci
Copy link
Collaborator

kibana-ci commented Jan 18, 2022

💔 Build Failed

Failed CI Steps

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@pgayvallet
Copy link
Contributor Author

Closing, cannot backport due to the incompatibilities with the 7.x version of the ES client which still relies on custom promises (TransportRequestPromise) with custom properties, making it impossible for our custom transport to chain / await promises.

@pgayvallet pgayvallet closed this Jan 18, 2022
auto-merge was automatically disabled January 18, 2022 14:45

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants