enable API protection in serverless#162749
Closed
TinaHeiligers wants to merge 18 commits intoelastic:mainfrom
Closed
enable API protection in serverless#162749TinaHeiligers wants to merge 18 commits intoelastic:mainfrom
TinaHeiligers wants to merge 18 commits intoelastic:mainfrom
Conversation
`restrictInternalApis` set to `true` enforces the restriction to `internal` API's. The restriction is only enabled in serverless.
…for internal HTTP APIs
…o TinaHeiligers-patch-3
Contributor
Author
|
Duplicate changes in #162636. Closing this one. |
💚 Build Succeeded
Metrics [docs]
To update your PR or re-run it, just comment with: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
replaces #162149 See note below
fix #162117
restrictInternalApisset totrueenforces the restriction tointernalAPI's. The restriction is only enabled in serverless.What this means to plugin authors and stack components :
Access to internal Kibana HTTP API endpoints is restricted in serverless and calls to these endpoints will respond with
400when the request doesn't include anx-elastic-internal-product header.The header is automatically included when using core's browser-side HTTP service (e.g. core.http.fetch('....'))
where the restriction is not applied:
access: publicremains open.For more details, see #152404
How to test this:
Against a dev:
x-pack/test_serverlessin each solution for api_integration and functional tests.For example:
node scripts/functional_tests_server --config test_serverless/api_integration/test_suites/<solution>/config.ts(new terminal)
node scripts/functional_test_runner --config test_serverless/api_integration/test_suites/<solution>/config.tsRepeat the process against a real serverless project. Ping Kibana Core for details.
Checklist
Risk
internalAPIsinternalpublic documentation oninternalAPIs must have theexperimentalwarning and clearly state thatinternalAPIs are subject to frequent changesinternalAPIs failFor maintainers
Why a new branch?
@elastic/kibana-core
Changes aren't allowed to patches unless made directly from upstream.
Handling failing tests were safer in a proper branch