-
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
Investigate the ability to share a saved-object in all current and future spaces #58756
Comments
Pinging @elastic/kibana-security (Team:Security) |
/cc @elastic/ml-ui @droberts195 |
Saved object namespaces are mostly abstracted away from regular consumers: that is, consumers cannot modify namespaces outside of using the Hypothetically, we would identify "all spaces" as a { "type": "foo", "id": "bar", "namespaces": ["*"] } When a user edits a saved object's shared spaces in the UI (#75444), the client updates the saved object twice: it first adds any new namespaces, then it deletes any outdated namespaces. To use the object above as an example, if you wanted to "unshare" an object from all namespaces, the client would make two calls: addToNamespaces({ type: 'foo', id: 'bar' }, namespaces: ['default']);
deleteFromNamespaces({ type: 'foo', id: 'bar' }, namespaces: ['*']); Afterwards, the object would have the following namespaces: { "type": "foo", "id": "bar", "namespaces": ["default"] } This and the inverse should work without any modifications. Note: a core assumption is that if an object's namespaces contains With that in mind, the potential impacts of share-to-all-spaces / my proposed changes are:
|
Thanks for doing all this research @jportner, it's really great.
This is purely a nitpick on the wording; however, in my opinion
When we implemented #27003, what is returned for the
I'd personally prefer option
Mine too!! |
😁
I think we both agree on the same thing, but it's definitely important to make sure all audiences will have the same understanding 🙂 So maybe this is a better way to word it?
Well, if you try to find saved objects using namespaces that you aren't authorized for, the operation will fail with a 403 error.
That's an idea, but wouldn't that be considered a breaking change?
👍 |
I like this wording better!
I could see an argument being made in that regard... However, the delete API will continue to behave the same with saved-objects that can't or haven't been shared to multiple spaces. None of the suggestions are completely backward compatible, consistent and not a foot-gun. I'm interested in what you think @legrego |
Assuming we did choose to implement the suggested `force option: It will continue to behave the same way for the time being. But when we eventually convert single-namespace object types to multi-namespace object types (Dashboards, for instance), any consumers that currently rely on the
Agree on both of these points! |
Thanks for the writeup @jportner! Chatted with @jportner offline to assuage my concerns. I'm also in board with option
And I think @kobelb's suggestion of introducing the In terms of the authorization model, |
Great! Now since you only need to have permissions in one space to update or delete a saved object, do you both think it makes sense to change the authorization checks for |
To clarify, the proposal is to ensure that the user is authorized in at least one space that the saved object exists in? (presumably the user's current space) {
"type": "index-pattern",
"index-pattern": {},
"namespaces": ["marketing", "sales", "default"]
} In this example, a user with read/write access to the That makes sense to me, since they could just as easily delete it from the other spaces. It does potentially lead to information disclosure though, since they would first see the saved object as: {
"type": "index-pattern",
"index-pattern": {},
"namespaces": ["sales", "?", "?"]
} The user could then try to brute-force an unshare by guessing space ids, and wait for one of the Other than consistency, is there another reason to pursue this change? |
Yes to all of the above.
No, consistency would be the only reason IMO. It shouldn't affect the average user's experience, we won't provide a way to unshare from a space you don't have permission for via the UI. So we could leave this as-is, in light of the information disclosure you pointed out. |
👍 this is my preference for now. We can revisit if we have a more compelling reason to allow this behavior. |
I'll amend this: I think we need to change Closing this investigation issue as I'm starting the implementation already. |
As currently envisioned, users are required to share saved-object in an explicit list of spaces. This does not allow users to share a saved-object in all current and future spaces by using a wildcard. We should investigate the complications that this introduces and figure out where it should come in our general phased implementation of sharing saved-objects in multiple spaces.
We should investigate moving saved objects from a "wildcard" share to/from a multi-namespace share.
Optionally, we should investigate (not necessarily implement) what it would take to support a deny-list of spaces (i.e., share to all spaces except
marketing
andsales
)The text was updated successfully, but these errors were encountered: