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

[Ingest] Fix GET /enrollment-api-keys/null error #64595

Conversation

nchaulet
Copy link
Member

Summary

Resolves #63830

Our useRequest is not working for request that have dependencies.
For the enrollment api keys we fetch the list before fetching one to get the api key value (secret to decrypt).
This was causing a bug and making the following request GET /enrollment-api-keys/null

I introduce a new useConditionnalRequest hook to allow to fetch only when we have all the required dependencies to make a request. (I did the same fix for agent config where we have the same bug)

@nchaulet nchaulet added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.8.0 Team:Fleet Team label for Observability Data Collection Fleet team labels Apr 27, 2020
@nchaulet nchaulet requested a review from a team April 27, 2020 22:02
@nchaulet nchaulet self-assigned this Apr 27, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@nchaulet nchaulet force-pushed the feature-ingest-fix-get-null-enrollment-api-keys branch from f52c9f5 to 37669c4 Compare April 28, 2020 00:38
@nchaulet nchaulet requested a review from jen-huang April 28, 2020 13:38
@nchaulet nchaulet force-pushed the feature-ingest-fix-get-null-enrollment-api-keys branch from 37669c4 to 1d1225a Compare April 28, 2020 13:43
Copy link
Contributor

@jfsiii jfsiii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved so you can merge and fix the error. Nothing in here that can't be easily changed later

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@nchaulet nchaulet merged commit cd4980a into elastic:master Apr 28, 2020
@nchaulet nchaulet deleted the feature-ingest-fix-get-null-enrollment-api-keys branch April 28, 2020 17:43
nchaulet added a commit to nchaulet/kibana that referenced this pull request Apr 28, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 29, 2020
* master: (60 commits)
  [SIEM] Create template timeline (elastic#63136)
  load react component lazily in so management section (elastic#64285)
  Cleanup .eslingignore and add target (elastic#64617)
  [Ingest] Support yaml variables in datasource (elastic#64459)
  typescript-ify portions of src/optimize (elastic#64688)
  [ngSanitize] add explicit dependencies to all uses of `ngSanitize` angular module (elastic#64546)
  Consolidate downloading plugin bundles to bootstrap script (elastic#64685)
  [Maps] disable edit layer button when flyout is open for add layer or map settings (elastic#64230)
  chore(NA): add async import into infra plugin to reduce apm bundle size (elastic#63292)
  [Maps] fix edit filter (elastic#64586)
  [SIEM][Detections] Adds large list support using REST endpoints
  Replace a number of any-ed styled(eui*) with accurate types (elastic#64555)
  [Endpoint] Recursive resolver children (elastic#61914)
  [ML] Fix new job wizard with multiple indices (elastic#64567)
  Use short URLs for legacy plugin deprecation warning (elastic#64540)
  [Uptime] Update uptime ml job id to limit to 64 char (elastic#64394)
  [Ingest] Fix GET /enrollment-api-keys/null error (elastic#64595)
  Consolidate cross-cutting concerns between region & coordinate maps in new maps_legacy plugin (elastic#64123)
  ES UI new platform cleanup (elastic#64332)
  [Event Log] use @timestamp field for queries (elastic#64391)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ingest Manager: request "null"api key while enrolling new agent
4 participants