-
Notifications
You must be signed in to change notification settings - Fork 1.6k
ike: log attributes as objects - v2 #13927
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
Closed
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9e96afd
ike/detect: info log message should be debug
jasonish 4b12773
ike: log attributes as objects
jasonish aef5561
doc: upgrade notes for changes to ike output
jasonish f861c3f
scripts/evedoc.py: handle union types in schema
jasonish 52482af
ike: don't log empty server objects
jasonish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
:orphan: Referenced from upgrade notes, not a toctree | ||
|
||
Suricata 9.0 Logging Changes | ||
############################ | ||
|
||
.. _9.0-ike-logging-changes: | ||
|
||
IKE | ||
*** | ||
|
||
IKE attributes are now logged as an array of objects instead of a map | ||
keyed by the attribute type. This allows for multiple attributes of | ||
the same type to be logged. | ||
|
||
The affected field names include: | ||
|
||
* alg_auth | ||
* alg_auth_raw | ||
* alg_dh | ||
* alf_dh_raw | ||
* alg_enc | ||
* alg_enc_raw | ||
* alg_hash | ||
* alg_hash_raw | ||
* sa_key_length | ||
* sa_key_length_raw | ||
* sa_life_duration | ||
* sa_life_duration_raw | ||
* sa_life_type | ||
* sa_life_type_raw | ||
|
||
Example - Attributes in "ike" object | ||
==================================== | ||
|
||
**Suricata 8.0** | ||
|
||
.. code-block:: json | ||
|
||
"ike": { | ||
"alg_enc": "EncAesCbc", | ||
"alg_enc_raw": 7, | ||
"sa_key_length": "Unknown", | ||
"sa_key_length_raw": 128 | ||
} | ||
|
||
**Suricata 9.0** | ||
|
||
.. code-block:: json | ||
|
||
"ike": { | ||
"attributes": [ | ||
{ | ||
"key": "alg_enc", | ||
"value": "EncAesCbc", | ||
"raw": 7 | ||
}, | ||
{ | ||
"key": "sa_key_length", | ||
"value": "Unknown", | ||
"raw": 128 | ||
} | ||
] | ||
} | ||
|
||
Example - Client Proposal | ||
========================= | ||
|
||
**Suricata 8.0** | ||
|
||
.. code-block:: json | ||
|
||
"ikev1": { | ||
"client": { | ||
"proposals": [ | ||
{ | ||
"alg_enc": "EncAesCbc", | ||
"alg_enc_raw": 7, | ||
"sa_key_length": "Unknown", | ||
"sa_key_length_raw": 128, | ||
"alg_hash": "HashSha", | ||
"alg_hash_raw": 2, | ||
"alg_dh": "GroupAlternate1024BitModpGroup", | ||
"alg_dh_raw": 2, | ||
"alg_auth": "AuthPreSharedKey", | ||
"alg_auth_raw": 1, | ||
"sa_life_type": "LifeTypeSeconds", | ||
"sa_life_type_raw": 1, | ||
"sa_life_duration": "Unknown", | ||
"sa_life_duration_raw": 86400 | ||
} | ||
] | ||
} | ||
} | ||
|
||
**Suricata 9.0** | ||
|
||
.. code-block:: json | ||
|
||
"ikev1": { | ||
"client": { | ||
"proposals": [ | ||
{ | ||
"key": "alg_enc", | ||
"value": "EncAesCbc", | ||
"raw": 7 | ||
}, | ||
{ | ||
"key": "sa_key_length", | ||
"value": "Unknown", | ||
"raw": 128 | ||
}, | ||
{ | ||
"key": "alg_hash", | ||
"value": "HashSha", | ||
"raw": 2 | ||
}, | ||
{ | ||
"key": "alg_dh", | ||
"value": "GroupAlternate1024BitModpGroup", | ||
"raw": 2 | ||
}, | ||
{ | ||
"key": "alg_auth", | ||
"value": "AuthPreSharedKey", | ||
"raw": 1 | ||
}, | ||
{ | ||
"key": "sa_life_type", | ||
"value": "LifeTypeSeconds", | ||
"raw": 1 | ||
}, | ||
{ | ||
"key": "sa_life_duration", | ||
"value": "Unknown", | ||
"raw": 86400 | ||
} | ||
] | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could be a little confusing with the 2 versions below.
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.
think we discussed this before for other records.
suricata_record_version:2
srv:2
other ideas?
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.
Not,
srv
, thats a little ambiguous in DNS events. So I think we need something completely unambiguous.suricata_record_version
works, but I 'd prefer the object approach.could work, but we've also talked about adding the Suricata version to each record before, and this should go in a similar object, but would have a different schema, so something like:
or something like that, but that doesn't work as well for the "ike" record format.
Ideally the
suricata
object would have the same schema no matter where, but not strictly necessary, so I could be swayed either way.I've also really come to appreciate how Elastic underscore prefixes fields that are part of their system, and not the payload, and that might be worth exploring as well, something like:
Other systems will use a
@
prefix which is fine as well, just a little less friendly when working with parsed JSON in Javascript.Any of these jump out at you? Repel you?
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 like the idea of easily marking and identifying fields that are not part of the payload. And, for what you've said, tend to prefer the underscore approach.
Could it happen that we have both
record version
andschema version
, for some development decision?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.
No. It better not. We might have a top level schema version. But really the Suricata version can serve that role just as well.
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 the "suricata" object is not future proof. There could be a Suricata protocol out there in the future. So "_suricata" would be the better object name.