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

[dev-docs] Adds section explaining internal and public APIs #195840

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

TinaHeiligers
Copy link
Contributor

Part of https://github.com/elastic/kibana-team/issues/1044

The tutorial on versioned HTTP APIs mentions internal and public routes and doesn't define what that means for Kibana's HTTP APIs. This PR adds a brief explanation and links to where devs can find more details on the restriction.

  • Documentation was added for features that require explanation or tutorials

@TinaHeiligers TinaHeiligers added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc DevDocs labels Oct 10, 2024
@elasticmachine
Copy link
Contributor

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

@TinaHeiligers TinaHeiligers added backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes labels Oct 10, 2024
@TinaHeiligers TinaHeiligers requested a review from a team October 11, 2024 01:29
Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @TinaHeiligers , thanks for improving this documentation!


**How do we prevent external consumers from using internal APIs?**
Access to [internal APIs is restricted](https://github.com/elastic/kibana/pull/193792) behind a configuration setting, `server.restrictInternalApis`. When set to true (the default), external requests without a special internal header or query parameter are blocked.
Of course there are ways of [getting around the restriction](https://github.com/elastic/kibana/pull/195696) but it has to be by choice and not incidental as it has been up to now.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should avoid mentioning how to bypass entirely 😅 , I guess eventually most people will figure it out, but I don't want to make it sound like it's OK to bypass it.

@@ -15,6 +15,17 @@ All Kibana HTTP API developers and maintainers must ensure that past versions of
The exact number of past APIs and the length of time they are kept available will vary per use case. Generally, the length of time will be shorter for internal HTTP APIs than for public HTTP APIs.
</DocCallOut>

<DocAccordion buttonContent="FAQ: What is the difference between an internal and a public HTTP API?" color="warning">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: imo not sure this is a warning level callout, maybe info?

Suggested change
<DocAccordion buttonContent="FAQ: What is the difference between an internal and a public HTTP API?" color="warning">
<DocAccordion buttonContent="FAQ: What is the difference between an internal and a public HTTP API?">

@TinaHeiligers TinaHeiligers enabled auto-merge (squash) October 11, 2024 15:52
@TinaHeiligers TinaHeiligers merged commit cfd9d8d into elastic:main Oct 11, 2024
8 checks passed
@TinaHeiligers TinaHeiligers deleted the update_core_api_docs branch October 11, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting DevDocs release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants