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

[Fleet] Fix find by apiKeyId escaping #61816

Merged

Conversation

nchaulet
Copy link
Member

Summary

Resolves #61796
Related to #60471 #60865

We were not returning the correct saved object when the API key id was starting with -, the search is now escaped.

and this tests is passing, was failing before

API KEY { id: 'R9W3K3EBdtuQ6nUmF6g4',
  name: 'test access api key 1',
  api_key: 'dqLqZmjWRNiw9lJYljBU1g' }
       └-> should return a 401 if this a not a valid acks access
         └-> "before each" hook: global before each
         └- ✓ pass  (39ms) "apis Fleet Endpoints fleet_agents_acks should return a 401 if this a not a valid acks access"
       └-> should return a 200 if this a valid acks request
         └-> "before each" hook: global before each
         └- ✓ pass  (1.5s) "apis Fleet Endpoints fleet_agents_acks should return a 200 if this a valid acks request"
       └-> should return a 400 when request event list contains event for another agent id
         └-> "before each" hook: global before each
         └- ✓ pass  (54ms) "apis Fleet Endpoints fleet_agents_acks should return a 400 when request event list contains event for another agent id"
       └-> should return a 400 when request event list contains action that does not belong to agent current actions
         └-> "before each" hook: global before each
         └- ✓ pass  (53ms) "apis Fleet Endpoints fleet_agents_acks should return a 400 when request event list contains action that does not belong to agent current actions"
       └-> should return a 400 when request event list contains action types that are not allowed for acknowledgement
         └-> "before each" hook: global before each
         └- ✓ pass  (52ms) "apis Fleet Endpoints fleet_agents_acks should return a 400 when request event list contains action types that are not allowed for acknowledgement"
       └-> "after all" hook
         │ info [fleet/agents] Unloading indices from "mappings.json"
         │ warn since spaces are enabled, all objects other than the default space were deleted from .kibana rather than deleting the whole index
         │ info [fleet/agents] Deleted existing index ".kibana"
         │ info [fleet/agents] Unloading indices from "data.json"
       └-> "after all" hook
     └-> "after all" hook
   └-> "after all" hook


5 passing (34.0s)

@nchaulet nchaulet added Feature:EPM Fleet team's Elastic Package Manager (aka Integrations) project Feature:Fleet Fleet team's agent central management project labels Mar 30, 2020
@nchaulet nchaulet self-assigned this Mar 30, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Feature:EPM)

@nchaulet nchaulet marked this pull request as ready for review March 30, 2020 15:24
@nchaulet nchaulet requested review from a team and nnamdifrankie March 30, 2020 15:24
@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes v7.8.0 v8.0.0 labels Mar 30, 2020
Copy link
Contributor

@nnamdifrankie nnamdifrankie left a comment

Choose a reason for hiding this comment

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

Thank you for making the changes.

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@nchaulet
Copy link
Member Author

@elasticmachine merge upstream

@nchaulet nchaulet requested review from jfsiii and neptunian April 1, 2020 11:24
@nchaulet
Copy link
Member Author

nchaulet commented Apr 3, 2020

@elasticmachine merge upstream

@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 8120124 into elastic:master Apr 3, 2020
@nchaulet nchaulet deleted the feature-ingest-fix-api-key-id-escaping branch April 3, 2020 18:18
nchaulet added a commit to nchaulet/kibana that referenced this pull request Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Fleet Fleet team's agent central management project 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.

[Fleet] Fix findAgentByAccessKeyId
6 participants