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

mimecast: fix parsing of logon-authentication-failed events #11638

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Nov 5, 2024

Proposed commit message

Some of the test cases are altered as their provenance is not provided and they do not look like they are valid.

Note

I think more work should be done in this area, but this is left as future work; this change fixes a bug.

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.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Screenshots

@efd6 efd6 added Integration:mimecast Mimecast bugfix Pull request that fixes a bug issue Team:Security-Service Integrations Security Service Integrations Team [elastic/security-service-integrations] labels Nov 5, 2024
@efd6 efd6 self-assigned this Nov 5, 2024
Some of the test cases are altered as their provenance is not provided
and they do not look like they are valid.
@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link

💚 Build Succeeded

cc @efd6

@efd6 efd6 marked this pull request as ready for review November 5, 2024 07:11
@efd6 efd6 requested a review from a team as a code owner November 5, 2024 07:11
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

@@ -470,21 +470,6 @@
},
{
"@timestamp": "2021-10-11T14:46:10.000Z",
"client": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is remove since previously the field labelled "remote IP" was being assigned to client.ip.

Comment on lines +30 to +31
{"id":"eNqrVipOTS4tSs1MUbJSMvCrMHX2MzL1yLFITjJNd8rO9wiJyAlL89c2DXZ1C3eP9AyvijKL9I7Rd_WOzC0ztMg2dzFM1M73s6w09CqoDA1T0lFKLE3JLMnJTwcZaGxoaWxsaGRkoKOUXFpckp-bWpScn5IKtMnZxMzR3BSovCy1qDgzP0_JyrAWAPktKzg","auditType":"Logon Authentication Failed","user":"[email protected]","eventTime":"2021-10-12T08:47:55+0000","eventInfo": "User [email protected] attempted to access the mimecast-matfe but does not have the required permissions to do so, Date: 2022-03-29, Time: 13:31:03+0000, IP: 67.43.156.15, Application: API, Remote IP is 67.43.156.15","category":"authentication_logs"}
{"id":"eNqrVipOTS4tSs1MUbJSMvCrMHX2MzL1yLFITjJNd8rO9wiJyAlL89c2DXZ1C3eP9AyvijKL9I7Rd_WOzC0ztMg2dzFM1M73s6w09CqoDA1T0lFKLE3JLMnJTwcZaGxoaWxsaGRkoKOUXFpckp-bWpScn5IKtMnZxMzR3BSovCy1qDgzP0_JyrAWAPktKzg","auditType":"Logon Authentication Failed","user":"[email protected]","eventTime":"2021-10-12T08:47:55+0000","eventInfo": "Failed authentication for [email protected] <John Doe>, Date: 2022-03-29, Time: 19:33:05 BTT, IP: 67.43.156.15, Application: SMTP-MTA2, Reason: Account locked","category":"authentication_logs"}
Copy link
Contributor Author

@efd6 efd6 Nov 5, 2024

Choose a reason for hiding this comment

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

Spaces before :'s removed, lonely : removed, duplicate , removed.

patterns:
- '^%{GREEDYDATA:mimecast.info},\sDate:\s%{DATE:mimecast.date},\sTime:\s%{TIME:mimecast.time} %{TIMEZONE:mimecast.timezone},\sIP:\s%{IP:client.ip},\sApplication:\s%{NOTSPACE:mimecast.application},(?:\sMethod:\s%{DATA:mimecast.method},)?\sReason:\s%{DATA:event.reason}$'
- '^%{GREEDYDATA:mimecast.info},\sDate:\s%{DATE:mimecast.date},\sTime:\s%{TIME:mimecast.time}%{TIMEZONE:mimecast.timezone},\sIP:\s%{IP:client.ip},\sApplication:\s%{NOTSPACE:mimecast.application},\sRemote IP is %{IP:mimecast.remote_ip}$'
- '^%{GREEDYDATA:mimecast.info},\s%{WORD} ?: ?%{DATA:mimecast.email.address}\[%{DATA:mimecast.email.metadata}\] remote IP ?: ?%{IP:mimecast.remote_ip} application ?: ?%{NOTSPACE:mimecast.application}$'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have significant doubt about the flexibility that's implemented here, but it is there because of the apparently free-form nature of the only example like this.

@efd6 efd6 enabled auto-merge (squash) November 5, 2024 08:03
@efd6
Copy link
Contributor Author

efd6 commented Nov 5, 2024

Note

AUTOMERGE ENABLED: IF YOU NEED CHANGES DO NOT APPROVE

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 Integration:mimecast Mimecast Team:Security-Service Integrations Security Service Integrations Team [elastic/security-service-integrations]
Projects
None yet
2 participants