Skip to content

Conversation

@cjcenizal
Copy link
Contributor

Fixes #75869
Relates to elastic/elasticsearch#61763

In 7.9, we started fetching indices use the indices API in addition to the cat indices API (https://github.com/elastic/kibana/pull/66422/files#diff-784d69eb6ea217af4edd2559d5ca2445R44), using the transport.request method of the JS client. Per elastic/elasticsearch#61763 (comment), transport.request expects the URL to already be URI encoded. Without encoding the URI, having an index with encodable characters (e.g. %{[@metadata][beat]}-%{[@metadata][version]}-2020.08.23) would cause requests to /indices/reload to fail with a 405 error.

To test this, create an index in Console like this:

PUT %25%7B%5B%40metadata%5D%5Bbeat%5D%7D-%25%7B%5B%40metadata%5D%5Bversion%5D%7D-2020.08.23

Then go to Index Management and wait a minute. You'll see a request to /indices/reload fail with a 405 error. This PR fixes that error.

Release note

Indices that contain the characters % { [ @ will no longer cause a 405 error in Index Management.

@cjcenizal cjcenizal added release_note:fix Feature:Index Management Index and index templates UI v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v7.10.0 v7.9.1 labels Sep 2, 2020
@cjcenizal cjcenizal requested a review from a team as a code owner September 2, 2020 22:33
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@cjcenizal
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@spalger spalger added v7.9.2 and removed v7.9.1 labels Sep 3, 2020
@cjcenizal cjcenizal merged commit 2eb8dac into elastic:master Sep 4, 2020
@cjcenizal cjcenizal deleted the bug/uri-encode-reload-indices branch September 4, 2020 14:01
cjcenizal added a commit to cjcenizal/kibana that referenced this pull request Sep 4, 2020
…elastic#76584)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Sep 4, 2020
* master: (47 commits)
  Do not require id & description when creating a logstash pipeline (elastic#76616)
  Remove commented src/core/tsconfig file (elastic#76792)
  Replaced whitelistedHosts with allowedHosts in actions ascii docs (elastic#76731)
  [Dashboard First] Genericize Attribute Service (elastic#76057)
  [ci-metrics] unify distributable file count metrics (elastic#76448)
  [Security Solution][Detections] Handle conflicts on alert status update (elastic#75492)
  [eslint] convert to @typescript-eslint/no-unused-expressions (elastic#76471)
  [DOCS] Add default time range filter to advanced settings (elastic#76414)
  [Security Solution] Refactor NetworkTopNFlow to use Search Strategy (elastic#76249)
  [Dashboard] Update Index Patterns when Child Index Patterns Change (elastic#76356)
  [ML] Add option to Advanced Settings to set default time range filter for AD jobs (elastic#76347)
  Add CSM app to CODEOWNERS (elastic#76793)
  [Security Solution][Exceptions] - Updates exception item find sort field (elastic#76685)
  [Security Solution][Detections][Tech Debt] - Move to using common io-ts types (elastic#75009)
  [Lens] Drag dimension to replace (elastic#75895)
  URI encode the index names we fetch in the fetchIndices lib function. (elastic#76584)
  [Security Solution] Resolver retrieve entity id of documents without field mapped (elastic#76562)
  [Ingest Manager] validate agent route using AJV instead kbn-config-schema (elastic#76546)
  Updated non-dev usages of node-forge (elastic#76699)
  [Ingest Pipelines] Processor forms for processors K-S (elastic#75638)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Index Management Index and index templates UI release_note:fix Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v7.9.2 v7.10.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After upgrade to 7.9.0 Kibana shows : “405 Method Not Allowed”

5 participants