-
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
[Spaces] - Accessing non-existent Spaces #22385
Comments
Awaiting #21995 for its |
@kobelb Do you have any opinions on how we should proceed with this? I was originally thinking that the Spaces SOC could check the current space before executing the get/create/etc request. The easiest way to do this is via the
Option 1 has the benefit of being a little more user-friendly but ends up changing some of the expected error codes/messages (where we may have previously thrown a 403, we will now throw a 404) Option 2 has the benefit of being more consistent internally, but also ends up leaking error messages that don't line up with the user's operation. For example, a user could get an error message saying they're not authorized to A couple of other options:
My preference as of right now is Option 1, but wanted to get your thoughts. |
After talking with @kobelb, we decided on Option 1 for now, and we will open a followup issue to more gracefully handle the scenario where a user types in a URL that points to an invalid space |
Doing this pre-check sent us down a few rabbit holes, so I recommended that we not address this deficiency at this point in time. We're generally pretty lax about checking "referential integrity" for most things in Kibana and Elasticsearch's APIs, so while this would be nice to have, I don't think it's a must-have at this point in time. This becomes easier to implement once we are able to remove the legacy fallback in 7.0, so I'd recommend waiting until then to do so. |
This issue was filed based on a comment I made originally in another issue: #21408 (comment). There were actually two issues I noticed:
|
Thanks @ycombinator, that makes sense. We definitely don't want this happening:
I just verified against |
Opened to track #21408 (comment) (cc @ycombinator)
When accessing any Kibana endpoint with Spaces enabled, the Spaces plugin should ensure that the space exists before allowing the request to continue. If the space does not exist, then a
404
should be thrown instead.The text was updated successfully, but these errors were encountered: