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_opencti] Support OpenCTI 5.12.X by removing filters parameter #8744

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

chrisberkhout
Copy link
Contributor

@chrisberkhout chrisberkhout commented Dec 18, 2023

Proposed commit message

[ti_opencti] Support OpenCTI 5.12 by removing filters parameter (#8744)

In version 5.12, OpenCTI made breaking changes to how its filters work:
  https://docs.opencti.io/5.12.X/reference/filters-migration/

The GraphQL query used in the OpenCTI integration had unused placeholder
parameters for filters, which made the query invalid for 5.12. By
removing the filter parameters, the integration will for 5.12, as well
as earlier versions.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

The change in this PR can be manually tested by building and installing the integration, and consuming data from the public demo instance of OpenCTI (free account required).

Outside of Elastic, the new version of the GraphQL query can be tested in the GraphQL playground of the demo instance.

The old query returns:

{
  "errors": [
    {
      "message": "Unknown type \"IndicatorsFiltering\". Did you mean \"IndicatorsOrdering\"?",
      "locations": [
        {
          "line": 1,
          "column": 93
        }
      ],
      "extensions": {
        "code": "GRAPHQL_VALIDATION_FAILED"
      }
    }
  ]
}

The new query returns data as expected:

{
  "data": {
    "indicators": {
      "edges": [
        { ...

Related issues

@chrisberkhout chrisberkhout added enhancement New feature or request bugfix Pull request that fixes a bug issue Integration:ti_opencti OpenCTI labels Dec 18, 2023
@chrisberkhout chrisberkhout self-assigned this Dec 18, 2023
@chrisberkhout chrisberkhout requested a review from a team as a code owner December 18, 2023 17:16
@elasticmachine
Copy link

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link

elasticmachine commented Dec 18, 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-12-18T17:17:36.476+0000

  • Duration: 20 min 1 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

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 50.0% (5/10) 👎 -44.444
Classes 50.0% (5/10) 👎 -44.444
Methods 59.615% (31/52) 👎 -17.787
Lines 83.313% (669/803) 👎 -2.77
Conditionals 100.0% (0/0) 💚

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

Approving based on playground behaviour.

@chrisberkhout chrisberkhout merged commit c3a2f22 into elastic:main Dec 20, 2023
4 checks passed
@chrisberkhout chrisberkhout deleted the ti_opencti-5-12-filters-fix branch December 20, 2023 07:19
@elasticmachine
Copy link

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

v1v added a commit that referenced this pull request Dec 21, 2023
* upstream/main: (117 commits)
  [TI MISP] Add IOC expiration support (#8639)
  Add CSPM Rules 6.2, 6.3 and 6.4 (#8778)
  [Infoblox NIOS] Update timestamp parsing logic (#8767)
  [Rapid7 InsightVM] Split vulnerability categories into array (#8768)
  [Exchange Online Message Trace] Add Additional Look-back Time & Fix Cursor Value (#8717)
  [Buildkite] Update bucket settings (#8765)
  Remove Jenkins .ci folder (#8766)
  First part of removal of Jenkins jobs (#8763)
  misp: parse URIs for URI type threats (#8760)
  [amazon_security_lake] Added support for all the OCSF Classes (#8579)
  [Buildkite] Update settings for integrations pipeline (#8758)
  [TI ThreatQ] Add IOC expiration support (#8691)
  [ti_opencti] Support OpenCTI 5.12 by removing filters parameter (#8744)
  [Cribl] Updating setup guidance for Cribl field (#8746)
  crowdstrike: add userinfo enrichment support and map fields to ECS (#8742)
  [etcd] Enable TSDB for metrics datastream (#8649)
  Bump golang.org/x/crypto from 0.16.0 to 0.17.0 (#8749)
  auditd: relax field_split pattern and handle AVC header (#8748)
  Update cloud packages codeowner (#8672)
  [O11Y] [AWS Billing] Convert "Total Estimated Charges" visualization to new metric (#8509)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Pull request that fixes a bug issue enhancement New feature or request Integration:ti_opencti OpenCTI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ti_opencti] OpenCTI 5.12.X breaks integration's GraphQL query
3 participants