-
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
Allow the repository to search across all namespaces #82863
Merged
legrego
merged 2 commits into
elastic:master
from
legrego:savedObjects/search-all-spaces
Nov 9, 2020
Merged
Allow the repository to search across all namespaces #82863
legrego
merged 2 commits into
elastic:master
from
legrego:savedObjects/search-all-spaces
Nov 9, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
legrego
added
Team:Security
Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Feature:Saved Objects
v8.0.0
release_note:skip
Skip the PR/issue when compiling release notes
v7.11.0
labels
Nov 6, 2020
Pinging @elastic/kibana-security (Team:Security) |
pgayvallet
approved these changes
Nov 9, 2020
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.
LGTM (sorry for the conflicts 😅 )
…search-all-spaces
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
legrego
added a commit
that referenced
this pull request
Nov 9, 2020
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Nov 10, 2020
* master: (39 commits) Fix ilm navigation (elastic#81664) [Lens] Distinct icons for XY and pie chart value labels toolbar (elastic#82927) [data.search.aggs] Throw an error when trying to create an agg type that doesn't exist. (elastic#81509) Index patterns api - load field list on server (elastic#82629) New events resolver (elastic#82170) [App Search] Misc naming tech debt (elastic#82770) load empty_kibana in test to have clean starting point (elastic#82772) Remove data <--> expressions circular dependencies. (elastic#82685) Update 8.0 breaking change template to gather information on how to programmatically detect it. (elastic#82905) Add alerting as codeowners to related documentation folder (elastic#82777) Add captions to user and space grid pages (elastic#82713) add alternate path for x-pack/Cloud test for Lens (elastic#82634) Uses asCurrentUser in getClusterUuid (elastic#82908) [Alerting][Connectors] Add new executor subaction to get 3rd party case fields (elastic#82519) Fix test import objects (elastic#82767) [ML] Add option for anomaly charts for metric detector should plot min, mean or max as appropriate (elastic#81662) Update alert type selection layout to rows instead of grid (elastic#73665) Prevent Kerberos and PKI providers from initiating a new session for unauthenticated XHR/API requests. (elastic#82817) Update grunt and related packages (elastic#79327) Allow the repository to search across all namespaces (elastic#82863) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Saved Objects
release_note:skip
Skip the PR/issue when compiling release notes
Team:Security
Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
v7.11.0
v8.0.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
When we first added the ability to find saved objects across spaces, we made the decision to treat the wildcard (
*
) namespace as thedefault
namespace from the repository's perspective. In other words, if a*
ever made its way to the repository, we would treat this the same as thedefault
namespace.For the default distribution, this wouldn't ever happen organically. For the OSS distribution, this would happen for API consumers who explicitly specified the
namespaces=*
query parameter.See #67644 (comment) for context around this decision.
This PR changes the behavior of the wildcard, and instead treats this as a true "search across all namespaces". We're making this change in order to support space-aware Machine Learning jobs (#82639). ML has two use cases for this functionality:
Initialization
When Kibana starts up, it needs to know if any ML job saved objects exist. If not, ML performs an initialization process whereby it creates a saved object for each job that exists in ES.
The initially proposed approach relied on querying the kibana index directly, which is undesirable.
With these changes, ML can instead use an instance of the Saved Objects Repository to search for objects across all spaces:
Repair
The
ml-job
saved objects are merely proxies to the actual job stored in ES. Given this "linked" nature, it's possible for Kibana's representation of available jobs to differ from the actual set of available jobs. The ML Management screen will provide a way to repair this in order to keep the two in sync.In order to effectively repair Kibana's representation of ML Jobs, we need to be able to search across all spaces in order to see if a specific ML job exists within Kibana anywhere.
cc @jgowdyelastic