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

align cors settings names with elasticsearch #85738

Merged
merged 2 commits into from
Dec 14, 2020

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Dec 14, 2020

Summary

#84316 introduced CORS support with settings:

server.cors.enabled: boolean
server.cors.credentials: boolean;
server.cors.origin: '*' | string[];

however Elasticsearch uses a bit different naming schema:

server.cors.enabled: boolean
server.cors.allow-credentials: boolean;
server.cors.allow-origin:  string[];

See https://github.com/elastic/elasticsearch/blob/f8c013d0fbb4ac55141891a56282f8b636aea62c/docs/reference/modules/http.asciidoc

  • We should align the naming across the stack.
    Note: we don't use the kebab-case naming schema for the settings.
    Based on this comment [Discuss] API naming convention #52284 (comment) I'm renaming server.cors.credentials to server.cors.allowCredentials; server.cors.origin to server.cors.allowOrigin.
    I'd expect we rename (to use snake_case) the settings in both Kibana and Elasticsearch during Settings should use snake_case #7444

  • we should align schema across the stack. server.cors.allowOrigin: '*' is refactored to be server.cors.allowOrigin: ["*"]

Plugin API changes

I'm going to update the docs in #84316

@mshustov mshustov added chore Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.11.0 labels Dec 14, 2020
@mshustov mshustov requested a review from a team as a code owner December 14, 2020 09:38
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Distributable file count

id before after diff
default 47129 47889 +760

History

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

@mshustov mshustov merged commit fbb83af into elastic:master Dec 14, 2020
@mshustov mshustov deleted the align-cors-naming-with-es branch December 14, 2020 12:57
mshustov added a commit to mshustov/kibana that referenced this pull request Dec 14, 2020
* align cors settings names with elasticsearch

* server.cors.origin: * --> server.cors.origin: ["*"]
gmmorris added a commit to gmmorris/kibana that referenced this pull request Dec 14, 2020
* master: (116 commits)
  Fix UX E2E tests (elastic#85722)
  Increasing default api key removalDelay to 1h (elastic#85576)
  align cors settings names with elasticsearch (elastic#85738)
  unskip tests and make sure submit is not triggered too quickly (elastic#85567)
  Row trigger 2 (elastic#83167)
  Add session id to audit log (elastic#85451)
  [TSVB] Fields lists do not populate all the times (elastic#85530)
  [Visualize] Removes the external link icon from OSS badges (elastic#85580)
  fixes EQL tests (elastic#85712)
  [APM] enable 'log_level' for Go (elastic#85511)
  ini `1.3.5` -> `1.3.7` (elastic#85707)
  Fix fleet route protections (elastic#85626)
  [Monitoring] Some progress on making alerts better in the UI (elastic#81569)
  [Security Solution] Refactor Timeline Notes to use EuiCommentList (elastic#85256)
  [Security Solution][Detections][Threshold Rules] Threshold rule exceptions (elastic#85103)
  [Security Solution] Alerts details (elastic#83963)
  skip flaky suite (elastic#62060)
  skip flaky suite (elastic#85098)
  skip flaky suite (elastic#84020)
  skip flaky suite (elastic#85671)
  ...
mshustov added a commit that referenced this pull request Dec 14, 2020
* align cors settings names with elasticsearch

* server.cors.origin: * --> server.cors.origin: ["*"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported chore release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants