* [Fleet] Avoid breaking setup when compatible package is not available in registry (#125525)
(cherry picked from commit 928638e395)
* [Fleet] Use registry version check on main (#125495)
* [Fleet] Get package info should not store the whole package (#123509)
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
* Fix preconfiguration error when renaming a preconfigured policy
* Add test + only compare on ID if it's defined on the preconfigured policy
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 94fbacc6bd)
# Conflicts:
# x-pack/plugins/fleet/server/services/preconfiguration.test.ts
* [Fleet] Use a docker registry for fleet integration test (#124405)
(cherry picked from commit 4f6be55f0e)
# Conflicts:
# x-pack/plugins/fleet/server/integration_tests/reset_preconfiguration.test.ts
* Fix merge typo
* Use uuidv5 value if preconfigured agent policy id is not provided
* Add tests for preconfigured policy id logic
Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
* [Fleet] Remove code that handles Security plugin being disabled (#121779)
* [Fleet] Remove code that handles Security plugin being disabled
* Fix test and make properties required
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
# x-pack/plugins/fleet/server/plugin.ts
# x-pack/plugins/fleet/server/routes/security.test.ts
* Fix jest test
* added kibana version to user-agent
* Update x-pack/plugins/fleet/server/services/epm/registry/requests.ts
Co-authored-by: Nicolas Chaulet <n.chaulet@gmail.com>
Co-authored-by: Nicolas Chaulet <n.chaulet@gmail.com>
Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
Co-authored-by: Nicolas Chaulet <n.chaulet@gmail.com>
* fix bug when dryrun gave error on latest package policy version
* fix bug when package is older than policy
* added unit tests
* fix test
* fix tests
Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
* Use deterministic UUID's for default policies
* Alter lookup strategy for preconfigured agent policies
* Fix ID check
* Pass ID even when creating default policies
Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
* Handle ID's for preconfigured package policies
- For Fleet's default policies, add a hard-coded ID to the generated
package policies
- Require an ID value for all preconfigured package policies
Resolves#120612
* Add required package_policies.id field to docs
* Specify that id is unique in docs
* Tweak docs
* Fall back to UUID value if no preconfigured ID
* Fix default fleet server policy id
Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
* simplified api, enriching default values
* removed comment
* reverted changes in common models
* fixed handlers test
* separated create schema
* fixed test
* removed throwing error
* getting package info from registry only
* fix type
* fix test and new tests
* simplified update api
* updated open api spec
* fixed compiled_input
* added policy_template enrich
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
* Do not add fields to index patterns
* remove redundant tests
* install index patterns before package install
* update remove comment
* use import to create package assets
Here I have also moved to importing all assets at once. This is essential when importing to ensure that all saved objects references are imported at once. There is also an efficiencey improvement.
* Import index patterns
* use resolve when deleting index patterns
* fix: asset type validation
* add option to override supported import types
* make ml-module importable
* Revert "add option to override supported import types"
This reverts commit 1f48e6ee193fea5e5cb0f37c70cbfa7ae47eeab5.
* remove hidden: false from ml-module
* use resolve when deleting assets
* make security-rule SO type importable
* use bulkResolve to get package assets
* fix tests
* fix 'multiple' tests
* remove unused function
* create index patterns at the same time as other assets
* remove unused test
* Fix integration tests
We were checking for an error before the import was complete.
* tidy for PR
* add missing test assets
* do not attempt to delete missing assets
* resolve any reference errors that occur on import
* await installKibanaAssets immediately
* show assets not found when assets installed in a different space
* fix delete asset check on force upgrade
* add comment about reference errors
* remove a couple of appContextService dependencies
Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
* Change endpoint privileges to use fleet authz instead of checking for superuser
* split user privileges react context component from hook in order to better support mocking
* remove `isPlatinumPlus` from endpoint privileges and refactor to use `useUserPrivileges()` hook instead
* add `endpointAuthz` to the Server API route handler context
* moved fleet's `createFleetAuthzMock` to `fleet/common`
# Conflicts:
# x-pack/plugins/security_solution/public/management/pages/policy/view/trusted_apps/layout/policy_trusted_apps_layout.tsx
* Wire Fleet setup status to core Kibana status API
* Remove fake error from testing 🙃
* Apply suggestion for PR review
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
* Add error message to meta upon Fleet setup failure
* Mark fleet as available if setup fails - for now
* Fix failing API key tests
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>