-
Notifications
You must be signed in to change notification settings - Fork 462
[Azure Logs] Add a missing pattern for AzureFirewallNetworkRule #5382
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
[Azure Logs] Add a missing pattern for AzureFirewallNetworkRule #5382
Conversation
The grok processor patterns for AzureFirewallNetworkRule log category was missing a format.
🌐 Coverage report
|
@zmoog , just curious, how were we made aware about the fact that this pattern exists as well and we need to suppor it? I'm wondering if we can exploit further the origin of such knowledge to cover even more patterns :) |
answering myself after an hint from the test filename: https://github.com/elastic/sdh-beats/issues/3075 |
@aspacca, exactly, the user kindly shared a sample log with the unsupported format. I tried the canonical resources like:
But I need help finding a complete list of existing formats. I am now asking previous authors/maintainers, the Azure community, and people in Azure about existing formats and how to stay updated for future changes. Thank you for taking the time to review the PR! 🙇 |
Package azure - 1.5.11 containing this change is available at https://epr.elastic.co/search?package=azure |
@@ -0,0 +1 @@ | |||
{"category":"AzureFirewallNetworkRule","operationName":"AzureFirewallNetworkRuleLog","properties":{"msg":"TCP request from 192.168.0.2:49680 to 89.160.20.156:1688. Action: Allow. Policy: ABC-DEF-01. Rule Collection Group: DefaultNetworkRuleCollectionGroup. Rule Collection: NetworkRulesAllow. Rule: AllowInternetOut"},"resourceId":"/SUBSCRIPTIONS/23103928-B2CF-472A-8CDB-0146E2849129/RESOURCEGROUPS/TEST-FW-RG/PROVIDERS/MICROSOFT.NETWORK/AZUREFIREWALLS/FW-TEST-MAIN","time":"2023-02-22T10:15:59.8824940Z"} |
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 just got the doubt if patter will remain from %external address% to %internal address%
and Rule
will change to AllowInternetIn
, in case of inbound connections, or the from/to will be flipped
we don't set network.direction
(https://www.elastic.co/guide/en/ecs/current/ecs-network.html#field-network-direction) and if we want to do according to the above we might have different ways to do it
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.
Good point! I understood this is a source
and destination
pattern without implied internal or external concepts, but I may be wrong.
I'm unsure, so let me bring @ebeahan into this conversation. Eric created this integration, and there's a good chance he has the Azure Firewall domain knowledge to sort this out. 😇
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.
Even if the NAT traffic was coming out-to-in instead of in-to-out, the mapping should still be valid since the fields would still accurately represent the source
and destination
as logged by the firewall.
Some security products have a concept, like HOME_NET
, to set what's considered inside vs. outside a firewall's perimeter and from that determine if traffic is inbound/outbound/etc. AFAIK Azure Firewall doesn't have that type of configuration.
…tic#5382) * Add a missing pattern for AzureFirewallNetworkRule The grok processor patterns for AzureFirewallNetworkRule log category was missing a format.
…tic#5382) * Add a missing pattern for AzureFirewallNetworkRule The grok processor patterns for AzureFirewallNetworkRule log category was missing a format.
What does this PR do?
Add a new pattern to the grok processor to better support the
AzureFirewallNetworkRule
in the Azure Firewall logs integration.UPDATE: the log sample with the unsupported message format was kindly provided by a user through a support request.
Checklist
changelog.yml
file.How to test this PR locally