-
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
[Ingest Manager] Restrict direct package upload to Enterprise license #79653
[Ingest Manager] Restrict direct package upload to Enterprise license #79653
Conversation
Pinging @elastic/ingest-management (Team:Ingest Management) |
would be good to get an api integration test when the feature is public, but looks good otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think checking in the service layer is preferable, but 👍 to ship this
I'm happy to move it around in a follow-up PR, but I'd prefer if we could stay consistent and there's also https://github.com/elastic/kibana/blob/master/x-pack/plugins/ingest_manager/server/routes/agent/handlers.ts#L288-L293 |
@skh Sure, like I said I'm fine shipping this. As for consistency / precedent, the initial example was kibana/x-pack/plugins/ingest_manager/server/services/epm/registry/registry_url.ts Lines 33 to 38 in 9b0dcaa
|
💚 Build SucceededMetrics [docs]
To update your PR or re-run it, just comment with: |
…into feature/task_manager_429 * 'feature/task_manager_429' of github.com:elastic/kibana: (158 commits) Add license check to direct package upload handler. (#79653) [Ingest Manager] Rename API /api/ingest_manager => /api/fleet (#79193) [Security Solution][Resolver] Simplify CopyableField styling and add comments (#79594) Fine-tunes ML related text on Metrics UI (#79425) [ML] DF Analytics creation wizard: ensure job creation possible when model memory lower than estimate (#79229) Add new "Add Data" tutorials (#77237) Update APM telemetry docs (#79583) Revert "Add support for runtime field types to mappings editor. (#77420)" (#79611) Kibana request headers (#79218) ensure missing indexPattern error is bubbled up to error callout (#79378) Missing space fix (#79585) remove duplicate tab states (#79501) [data.ui] Lazy load UI components in data plugin. (#78889) Add generic type params to search dependency. (#79608) [Ingest Manager] Internal action for policy reassign (#78493) [ILM] Add index_codec to forcemerge action in hot and warm phases (#78175) [Ingest Manager] Update open API spec and add condition to agent upgrade endpoint (#79579) [ML] Hide Data Grid column options when histogram charts are enabled. (#79459) [Telemetry] Synchronous `setup` and `start` methods (#79457) [Observability] Persist time range across apps (#79258) ...
…astic#159280) ## Summary The package upload API was made GA, and it had a leftover enterprise license requirement from the time it was only intended for devs. See elastic#79653 This pr removes that requirement. (cherry picked from commit b8619ec)
…nt (#159280) (#159321) # Backport This will backport the following commits from `main` to `8.8`: - [[Fleet] removed package upload API enterprise license requirement (#159280)](#159280) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-08T14:51:54Z","message":"[Fleet] removed package upload API enterprise license requirement (#159280)\n\n## Summary\r\n\r\nThe package upload API was made GA, and it had a leftover enterprise\r\nlicense requirement from the time it was only intended for devs. See\r\nhttps://github.com//pull/79653\r\nThis pr removes that requirement.","sha":"b8619ec216bebbcfdd27f34c6ef632e5fc2456be","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.8.0","v8.9.0"],"number":159280,"url":"https://github.com/elastic/kibana/pull/159280","mergeCommit":{"message":"[Fleet] removed package upload API enterprise license requirement (#159280)\n\n## Summary\r\n\r\nThe package upload API was made GA, and it had a leftover enterprise\r\nlicense requirement from the time it was only intended for devs. See\r\nhttps://github.com//pull/79653\r\nThis pr removes that requirement.","sha":"b8619ec216bebbcfdd27f34c6ef632e5fc2456be"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/159280","number":159280,"mergeCommit":{"message":"[Fleet] removed package upload API enterprise license requirement (#159280)\n\n## Summary\r\n\r\nThe package upload API was made GA, and it had a leftover enterprise\r\nlicense requirement from the time it was only intended for devs. See\r\nhttps://github.com//pull/79653\r\nThis pr removes that requirement.","sha":"b8619ec216bebbcfdd27f34c6ef632e5fc2456be"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <[email protected]>
Summary
Restricts the direct package upload feature to Enterprise license, as discussed in #70582 (comment)
How to test this
yarn es snapshot --license basic OTHER_OPTIONS
(or find any other way to run with abasic
license).export KIBANA_HOME=/path/to/your/kibana/project/directory
curl -X POST -u elastic:changeme http://localhost:5601/api/ingest_manager/epm/packages --data-binary @$KIBANA_HOME/x-pack/test/ingest_manager_api_integration/apis/fixtures/direct_upload_packages/apache_0.1.4.zip -H 'kbn-xsrf: xyz' -H 'Content-Type: application/zip'
This should result in the response
{"statusCode":403,"error":"Forbidden","message":"Requires Enterprise license"}
.Do the same with a
trial
license. The installation should work.