-
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
Kibana console needs to support passing version header #160801
Comments
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
DevTools currently responds with:
|
TL;DR we need to think a little bit about the intended utility of For a start, this could be as "dumb" as a map/set of public method+path (remember public HTTP APIs don't change often). If a request is not in the map, it's a Open to ideas regarding how we "fix" this in Here is a 🧠 ⬇️ The behaviour requiring a version is different for This is driven by defaulting
More practically: Starting Kibana with
Starting Kibana with
Currently it will result in |
Thanks for your input @jloleysens!
++ The Management team started this discussion earlier in the week. While the |
Just my two cents, I could imagine doing something like this:
The versioning problem is more tricky. IMO we made things harder on ourselves by applying a blanket check for this in dev mode... ideally there'd be a way to make console exempt from this check because it is such a different use case. I am nervous about adding more complexity to console or the http service to "fix" what's essentially a self-imposed problem that only exists in dev-mode and only affects console. |
The restriction was implemented when the default for API's was |
Yeah, I agree this adds friction that is questionable in these early stages. However I think it serves a valuable purpose: the time devs are running Kibana we know that our requests are explicit about what handlers they need. This gives us more confidence (quality?) moving forward, but at the cost of running into situations like this today. I'm definitely open to talking through this again though! Depending on how we resolve this #163678, as @lukeelmers noted, we may have a way to allow access to internal routes (preferably just in dev). However I'd argue that Kibana devs (and users actually) have alternative ways of calling internal Kibana routes besides console and wouldn't optimise for this. That leaves public routes. The simplest way forward today would be to add |
I'm concerned about locking things down too tightly. Then again, I might not be up to speed on the 'why' of what we're doing. My understanding is that we don't want our users building workflows around internal apis. It seems to me that the additional headers make abundantly clear what is and isn't internal. I think its reasonable for our customers to respect this. I think the main problem we've had in the past is a lack of consistency and follow through. APIs stay in Technical Preview forever, users come to expect they're there, and then we determine we need to support them. Hitting internal apis via the console can be extremely helpful for debugging. I've often asked for the result of a manual |
This would work for now. What if the version param could also be passed via query string? |
This is possible today on an opt-in basis via: It is intended as an escape hatch when there is no other option as described in the doc comment.
That's a good point but you could also use curl to do this (does not have to be Console).
IMO we'll take a big step toward consistency by removing ambiguity and not allowing our users to craft requests against internal APIs. If it really is something users need access to we should make it public. |
From the platform/core side I think we should consider this work complete by a combination of the existing query param for versions and the PR for passing the internal header. Together, these will allow developers to continue to interact with Kibana APIs in console. External users who aren't aware of these hacks will still be able to hit public APIs in console and get back the default version for an API. I believe this would meet the near term needs here. Longer term, the Deployment Management team can determine whether it's worth eventually prioritizing a UI of some kind that allows users to select/specify versions in their requests. |
++ it'd be nice to support this in future
just to be clear: this will only make the (e.g.) |
Related to #110881 |
Pinging @elastic/kibana-management (Team:Kibana Management) |
hi all, the dashboard API that's coming is increasing the urgency for a fix here so customers can enjoy the new API in the dev console more seamlessly |
We currently only have one API version in both serverless & non-serverless, and we expect new versions to be very infrequent. The version header is also optional. For serverless we set Which is to say - I'm not sure this is blocking users' ability to experiment with the new dashboard APIs. They should be able to access them in dev console if they're public without a version header being required. |
IIUC, we default to So developers would need to explicitly add |
++ this is true, and an unintended side effect is that the original intention to encourage us to send headers at dev time is disabled. Core is discussing changing the dev default to also be |
The kibana dev console allows calling Kibana apis via the
kbn:
prefix. Unfortunately there's no way to pass a version header - something that's actively being rolled out to apis for backward compatibility support. Passing a version header is enforced in dev environments.The text was updated successfully, but these errors were encountered: