-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solution][Endpoint] get-file
response action kibana download file API
#143708
[Security Solution][Endpoint] get-file
response action kibana download file API
#143708
Conversation
Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt) |
x-pack/plugins/security_solution/server/endpoint/services/actions/action_files.ts
Outdated
Show resolved
Hide resolved
fileName, | ||
mimeType, | ||
}; | ||
} catch (error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we know what error comes back if the metadata document exists, but no chunks exist?
Should probably also be a 404? or 410.
Although if this is a "fetched-too-soon" situation and it's still uploading, then 410 wouldn't be correct.
Post-deletion, that's a great status code. but 404 is ok for the unknown, and general purpose here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll test that out by deleting the chunks. I don't think we get an error here - I thin the error comes in when you start to actually read the chunks and they are not found.
the "fetched-too-soon" is not a real issue from our use case via Kibana UI, but could happen via API only if someone called it manually. if that was to occur, the Files service returns a NoDownloadAvailableError
(here) which I think would translate into a 500
API error on our side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 🔥
…o allow them in values
…api' into task/olm-4662-get-file-download-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job @paul-tavares ! Nice that you created a file mock that can be readily used too
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled in files
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
* main: (57 commits) [Files] Filepicker (elastic#143111) [Infrastructure UI] Replace Lens table with EUI table and own api (elastic#142871) [api-docs] Daily api_docs build (elastic#143829) [api-docs] Daily api_docs build (elastic#143825) [api-docs] Daily api_docs build (elastic#143823) [Security Solution] Restructuring folders of Detection Engine + refactoring Rule Management (elastic#142950) [Dev tools] Fix performance issue with autocomplete suggestions (elastic#143428) [Security Solution] Disable ML rule's edit button link under basic license (elastic#143260) [Lens] Use the language-documentation package for formula (elastic#143649) [api-docs] Daily api_docs build (elastic#143811) [Security Solution] Fix missing title on inspect pop-up (elastic#143601) fix incorrect filters being passed to events table causing duplicate entries in our inpsect tool request tab (elastic#143239) [Security Solution][Endpoint] `get-file` response action kibana download file API (elastic#143708) Rely on refresh context to update stats independently of overview cards. (elastic#143308) [RAM] Rule event log - Fix incorrect results when filtering by message and outcome simultaneously (elastic#143119) [ML] Display link to create data view from error cases in data frame analytics results pages (elastic#143596) Update links in README :) (elastic#143675) Add more tests for ml_inference_logic (elastic#143764) skip failing test suite (elastic#143717) [DOCS] Add assignees to case APIs (elastic#143610) ...
Summary
kibana.json
get-file
console commandFiles
plugin for testingAlso, It addresses the following issues against the
get-file
command in the response console:\
) are not being handled correctly. Backslash is being stripped out--path
) and that should also be pre-populated to the console's input area when user clicks the+
buttonget-file --help
should have a similar syntax pattern as other commands that have a required argument (ex.kill-process
)