-
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
Use kibana_system user for Fleet setup and package operations #112808
Conversation
The functional tests that are failing on this PR are blocked by our Elasticsearch snapshot being promoted to a more recent build. I've pinged the appropriate teams to make sure we can get that promoted ASAP. The job that verifies the snapshot promotion is here: https://buildkite.com/elastic/kibana-elasticsearch-snapshot-verify |
export const getFileHandler: FleetRequestHandler<TypeOf<typeof GetFileRequestSchema.params>> = | ||
async (context, request, response) => { | ||
try { | ||
const { pkgName, pkgVersion, filePath } = request.params; | ||
const savedObjectsClient = context.fleet.epm.internalSoClient; |
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.
Only changes on this function are the change to FleetRequestHandler
type and using internalSoClient
instead of the current user one. Everything else is the same, but got re-formatted by the linter.
export const getInfoHandler: FleetRequestHandler<TypeOf<typeof GetInfoRequestSchema.params>> = | ||
async (context, request, response) => { | ||
try { | ||
const { pkgkey } = request.params; | ||
const savedObjectsClient = context.fleet.epm.internalSoClient; |
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.
Same here as well
Test failures are waiting on the next Elasticsearch snapshot to be promoted, otherwise, this is ready for review |
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge upstream |
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.
Code changes all look sound to me. Pulled down and ran through setup + a few basic operations and all looks good. 🚀
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 ran the branch locally, did the fleet setup and installed some packages. LGTM to me 👍
CI will fail until elastic/elasticsearch#79076 is merged and Kibana's CI snapshot has been bumped |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / general / X-Pack Detection Engine API Integration Tests.x-pack/test/detection_engine_api_integration/security_and_spaces/tests/create_threat_matching·ts.detection engine api security and spaces enabled create_threat_matching tests with auditbeat data should be able to execute and get 10 signals when doing a specific queryStandard Out
Stack Trace
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
Unrelated flaky test, merging. |
…c#112808) Co-authored-by: Kibana Machine <[email protected]>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
… (#115165) Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Josh Dover <[email protected]>
Summary
Fixes #111755
Blocked by:
Uses the
kibana_system
user under the hood for executing all package installation operations. No external behavior changes are expected from this change.Because transforms require read and create_index privileges and we can't give kibana_system access to all indices, we no longer support arbitrary transforms. They specifically need privileges granted to kibana_system in the Elasticsearch codebase to work. Therefore, the transforms in our test package no longer work. I've removed these transforms and added tests specific to the only package we currently support this in, endpoint.
Checklist
Delete any items that are not applicable to this PR.
For maintainers