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

[8.7] [Security Solution + Files + Fleet] Add option to Files client to handle index alias and fix Endpoint/Fleet usage to set new option to true (#153342) #153403

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

paul-tavares
Copy link
Contributor

…dle index alias and fix Endpoint/Fleet usage to set new option to true (elastic#153342)

## Summary

- Adds `indexIsAlias` to `Files` plugin client. Used when provided
indexes are Aliases (changes how the documents are retrieved internally)
- Changes security solution (endpoint) file service to use `.search()`
instead of `.get()` when retrieving a file metadata via `id`
- Changed Security Solution call to `createEsFileClient()` (`Files`
plugin service) to set `indexIsAlias` to `true`
- Changed Fleet call to `createEsFileClient()` (`Files` plugin service)
to set `indexIsAlias` to `true`

Addresses the following Issues that were raised for 8.7:

- Fixes elastic#153322
- FIxes elastic#153334

(cherry picked from commit 50cc574)

# Conflicts:
#	src/plugins/files/server/blob_storage_service/adapters/es/content_stream/content_stream.ts
#	src/plugins/files/server/file_client/create_es_file_client.ts
const source: undefined | FileChunkDocument = buffer.byteLength
? cborx.decode(Buffer.concat(chunks))?._source
const decodedChunkDoc: GetResponse<FileChunkDocument> | undefined = buffer.byteLength
? (cborx.decode(buffer) as GetResponse<FileChunkDocument>)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI. I had a merge conflict here due to a change that was done in Main, but never backported. The change is in 8.7 now which I think is ok

diff:

image

@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Mar 21, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

API count

id before after diff
files 254 255 +1

History

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

cc @paul-tavares

@paul-tavares paul-tavares merged commit b28c88a into elastic:8.7 Mar 22, 2023
@paul-tavares paul-tavares deleted the backport/8.7/pr-153342 branch March 22, 2023 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants