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

[ti_rapid7_threat_command] Fix required stack capabilities #8268

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Oct 23, 2023

Proposed commit message

This package fails to start in stacks without the security plugin, as it requires
the security rule object type.

When trying to install with elastic-package install:

Error: can't install the package: could not zip-install package; API status code = 500; response body = {"statusCode":500,"error":"Internal Server Error","message":"Encountered 2 errors creating saved objects: [{\"type\":\"security-rule\",\"id\":\"af814670-3279-11ed-93fa-d354b323cd1b\",\"error\":{\"type\":\"unsupported_type\"}},{\"type\":\"security-rule\",\"id\":\"eaecc8f0-6704-11ed-80b2-9bbc46f73b72\",\"error\":{\"type\":\"unsupported_type\"}}]"}

Add the required capabilities to the manifest.

As a follow up we will need to remove the 1.10.0 and 1.11.0 versions of the package from the registry. cc @mrodm

Checklist

  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Related issues

Screenshots

@jsoriano jsoriano requested a review from a team October 23, 2023 09:08
@jsoriano jsoriano requested a review from a team as a code owner October 23, 2023 09:08
@jsoriano jsoriano self-assigned this Oct 23, 2023
@mrodm
Copy link
Contributor

mrodm commented Oct 23, 2023

Two versions 1.10.0 and 1.11.0 should be removed:

 $ curl -s "https://epr.elastic.co/search?package=ti_rapid7_threat_command&spec.min=3.0&all=true" | jq -r '.[]|.version'
1.10.0
1.11.0

@elasticmachine
Copy link

elasticmachine commented Oct 23, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-10-23T18:01:07.312+0000

  • Duration: 17 min 2 sec

Test stats 🧪

Test Results
Failed 0
Passed 23
Skipped 0
Total 23

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Oct 23, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (3/3) 💚
Files 100.0% (3/3) 💚 3.842
Classes 100.0% (3/3) 💚 3.842
Methods 88.372% (38/43) 👎 -3.734
Lines 94.245% (868/921) 👍 5.642
Conditionals 100.0% (0/0) 💚

Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

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

LGTM
Just a suggestion to update changelog link

changes:
- description: 'Fix required stack capabilities'
type: bugfix
link: https://github.com/elastic/integrations/pull/1
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit

Suggested change
link: https://github.com/elastic/integrations/pull/1
link: https://github.com/elastic/integrations/pull/8268

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks!

@jsoriano jsoriano merged commit 5f8f554 into elastic:main Oct 24, 2023
4 checks passed
@jsoriano jsoriano deleted the ti-rapid7-capabiliities branch October 24, 2023 09:17
@elasticmachine
Copy link

Package ti_rapid7_threat_command - 1.11.1 containing this change is available at https://epr.elastic.co/search?package=ti_rapid7_threat_command

kibanamachine added a commit to fkanout/kibana that referenced this pull request Nov 27, 2023
## Summary

[Fleet] Improve error handling on epm endpoints. 

Currently most errors occurring when doing any operation with packages
will throw and result in a `500` in the correspondent endpoint.
This PR is an attempts to handle those errors in a more comprehensive
way and to return meaningful responses.

Where I can I'm replacing the generic `Error` with `FleetError`; it
calls `Logger.error` and checks if the error belongs to a specific type,
if not defaults to 500.

The error described in elastic/integrations#8268
will now return a 400:
https://github.com/elastic/kibana/pull/171722/files#diff-952b3c1842d5d24d9e70833cae1683e2d78df7b489dc99665dab723cc10927c1R349-R352


### Checklist
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@andrewkroh andrewkroh added the Integration:ti_rapid7_threat_command Rapid7 Threat Command label Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants