Skip to content
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

[http] Relax API access restrictions #161371

Closed
TinaHeiligers opened this issue Jul 6, 2023 · 4 comments · Fixed by #161672
Closed

[http] Relax API access restrictions #161371

TinaHeiligers opened this issue Jul 6, 2023 · 4 comments · Fixed by #161672
Assignees
Labels
Epic:VersionedAPIs Kibana Versioned APIs Feature:http Project:Serverless Work as part of the Serverless project for its initial release Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.10.0

Comments

@TinaHeiligers
Copy link
Contributor

TinaHeiligers commented Jul 6, 2023

Relates to #151940.
Change the default API access flag to internal to give API owners more time to properly handle their API requirements.

Having APIs default to internal is a temporary measure to relax the restrictions implemented in #151940.

Change the way the RouteConfigOptions access parameter is set when not specifically configured to default to internal.

@TinaHeiligers TinaHeiligers added Feature:http Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Jul 6, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@TinaHeiligers TinaHeiligers added Epic:VersionedAPIs Kibana Versioned APIs Project:Serverless Work as part of the Serverless project for its initial release v8.10.0 labels Jul 6, 2023
@lukeelmers
Copy link
Member

Just adding a few notes about the intended behavior based on my understanding of our discussion:

  • the access option is only enforced when a config flag is enabled in serverless
  • so we will default access to internal, meaning that in serverless all APIs will be treated as internal by default
  • and in self-managed, nothing will change: these apis will still technically be classified as access: 'internal' based on the route config options, but since nothing is actually enforced, it won't affect end users. we will need to be careful not to introduce any other functionality in self-managed that relies on this access parameter to avoid confusion.
  • any APIs which have already been set to explicitly be access: 'public' will need to be removed or changed to internal or they will continue to be public in serverless
  • Elastic owned APIs calling into internal kibana routes externally will need to use the x-elastic-internal-origin headers (as is already the case today), but:
  • devs will still have the ability to explicitly set their APIs to be public in serverless if they are willing to own the maintenance of these
  • long term: whenever we plan a 9.0 self-managed release, we should discuss making this the behavior global across self-managed and serverless. ideally every http api registered in kibana is internal unless someone opts-in to make it public.

@TinaHeiligers
Copy link
Contributor Author

TinaHeiligers commented Jul 6, 2023

any APIs which have already been set to explicitly be access: 'public' will need to be removed or changed to internal or they will continue to be public in serverless

Are we sure about that? Teams who have already explicitly set access did so for a reason. IMHO, we should leave those as they are and rather ask teams to review their decision, specifically w.r.t changing 'internal' APIs to 'public', not the other way round.

@lukeelmers
Copy link
Member

we should leave those as they are and rather ask teams to review their decision

++ This is what I'd propose too. I was simply pointing out that if the guidance eventually becomes "don't expose any public HTTP APIs unless absolutely necessary", anybody who has explicitly marked an API as access: 'public' will need to revisit that decision. But this should be up to individual teams... I only mention it here to clarify that APIs don't all suddenly become internal when we finish this work; there will be some lingering public APIs which teams must review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic:VersionedAPIs Kibana Versioned APIs Feature:http Project:Serverless Work as part of the Serverless project for its initial release Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.10.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants