-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Registered domain processor #67611
Registered domain processor #67611
Conversation
Pinging @elastic/es-core-features (Team:Core/Features) |
@andrewstucki, I will review this over the next week or so. There is an existing issue open for this processor (#57476) and I've put a non-trivial amount of time into it, so it would have been good to avoid the duplication of effort on this one. |
@danhermann sounds good, I'd be happy to close this in favor of your processor if it's more complete, just figured I'd throw together a Friday afternoon implementation 😄 Just let me know. |
I'll review it and see what it looks like. There were some complexities that I encountered in the implementation of this processor and you might have avoided those. |
@elasticmachine update branch |
@andrewstucki, I've given this a brief look and I think your approach will work. There have been some code organization changes since you submitted your PR so the classes will need to be moved into the ingest.common package. If you can make that change, I will continue with the review. |
Just adding in a comment from me that this is a dependency for us to clear some of our tasks on https://github.com/elastic/security-team/issues/791 that is scheduled for 7.13, so it would be great once it has been fixed, if it could get some priority to be merged to 7.13 if possible. |
d8b5659
to
05ebe9b
Compare
@danhermann we should be good to go on this now. |
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.
@andrewstucki, this looks pretty good. I've left some comments and questions below. Also, I'm no expert on this, but I've seen some mention of "public suffix" being the preferred synonym for "eTLD". Do you know if that's the case?
...s/ingest-common/src/main/java/org/elasticsearch/ingest/common/RegisteredDomainProcessor.java
Outdated
Show resolved
Hide resolved
...s/ingest-common/src/main/java/org/elasticsearch/ingest/common/RegisteredDomainProcessor.java
Outdated
Show resolved
Hide resolved
@danhermann so, "public suffix" and "eTLD" are synonymous, I'm not really sure if there's a preferred usage or not, but as our ECS docs explicitly refer to "effective top level domain"s, I figured we should opt to keep things consistent. |
@elasticmachine update branch |
...s/ingest-common/src/main/java/org/elasticsearch/ingest/common/RegisteredDomainProcessor.java
Outdated
Show resolved
Hide resolved
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.
@andrewstucki, just two minor changes below and we can get this merged.
...s/ingest-common/src/main/java/org/elasticsearch/ingest/common/RegisteredDomainProcessor.java
Outdated
Show resolved
Hide resolved
...est-common/src/test/java/org/elasticsearch/ingest/common/RegisteredDomainProcessorTests.java
Outdated
Show resolved
Hide resolved
@andrewstucki, thanks for all the work on this. I'm going to merge it and get it backported for the next release. |
@andrewstucki, I'm just now noticing that |
@danhermann yep, {
"proprietary": {
"field": "www.google.com"
}
} assuming you configured the processor to look at this field and fill in {
"url": {
"domain": "www.google.com",
"registered_domain": "google.com",
...
}
} that way it fills in everything it can, including https://www.elastic.co/guide/en/ecs/current/ecs-url.html#field-url-domain Edit: also, if you are using say |
cc: @elastic/es-ui in case auto-complete needs to be updated to accommodate this new processor. |
Thanks for the heads up @danhermann! I opened elastic/kibana#97465 to add support in Kibana. |
This PR adds support for a processor that looks up the registered domain, eTLD from the public suffix list, and uses those to split out the subdomain as well. It's essentially a port of the beats processor.
Produces: