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

x-pack/filebeat/module/cisco: fix event.{outcome,type} handling #29698

Merged
merged 5 commits into from
Jan 19, 2022

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Jan 5, 2022

What does this PR do?

This fixes handling of event.outcome and event.type field in Cisco ASA and FTD modules to more correctly match the field descriptions in ECS.

Why is it important?

Currently the fields do not conform to ECS. This is #29581.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
    - [ ] I have made corresponding changes to the documentation
    - [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • Check that new golden values are sane.

How to test this PR locally

Run TESTING_FILEBEAT_MODULES=cisco MODULES_PATH=module mage -v pythonIntegTest in x-pack/filebeat.

First commit is boring, being just the update for golden files to prune @timestamp fields.

Related issues

Use cases

N/A

Screenshots

N/A

Logs

N/A

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jan 5, 2022
@efd6 efd6 force-pushed the ciscoasa-outcome branch from dedc16f to 76fe29f Compare January 5, 2022 04:38
@efd6 efd6 marked this pull request as ready for review January 5, 2022 04:40
@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jan 5, 2022

💚 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: 2022-01-12T04:17:40.728+0000

  • Duration: 99 min 1 sec

  • Commit: 63b5e98

Test stats 🧪

Test Results
Failed 0
Passed 2437
Skipped 153
Total 2590

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@efd6
Copy link
Contributor Author

efd6 commented Jan 5, 2022

/test

@@ -383,7 +383,7 @@ processors:
if: "ctx._temp_.cisco.message_id == '304001'"
field: "event.outcome"
description: "304001"
value: success
value: "allowed"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see allowed or dropped specified as valid values for event.outcome, only success and failure. My understanding is that this should go into event.type. Am I missing something?

Copy link
Contributor Author

@efd6 efd6 Jan 5, 2022

Choose a reason for hiding this comment

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

These are temporary values that are used to communicate to the painless later what the combination of outcome and type should be. If state is squashed to a binary of success/failure it is not possible to reconstruct the possibility of a successful denial. I could have done if with a second variable, but this feels better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These get sorted out here 76fe29f#diff-35840a6c4edae3a4fc97e0a1c84d5576fcfd9bb64faf12e7a6800347a5728cb1R1857-R1872. If you'd like I can add commentary explaining this.

@efd6 efd6 requested a review from adriansr January 11, 2022 09:58
@mergify
Copy link
Contributor

mergify bot commented Jan 11, 2022

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b ciscoasa-outcome upstream/ciscoasa-outcome
git merge upstream/master
git push upstream ciscoasa-outcome

@efd6 efd6 requested a review from a team January 12, 2022 01:54
Copy link
Contributor

@adriansr adriansr left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.1-candidate backport-v8.0.0 Automated backport with mergify bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filebeat module cisco asa ECS event.outcome / event.type wrong
3 participants