Skip to content

Commit

Permalink
redo dns mappings by looking at rules fields
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Haywood <grant@phaseshift.studio>
  • Loading branch information
phaseshiftg committed Nov 3, 2022
1 parent e98b2f9 commit f253867
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 205 deletions.
39 changes: 3 additions & 36 deletions src/main/resources/OSMapping/dns/fieldmappings.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,4 @@
fieldmappings:
additionals_count: additionals_count
algorithm: answers-algorithm
answers_count: answers_count
authentic_data: flags-authentic_data
authoritative: flags-authoritative
authorities_count: authorities_count
checking_disabled: flags-checking_disabled
class: question-class
cookie: opt-cookie
data: answers-data
do: opt-do
etld_plus_one: question-etld_plus_one
expiration: answers-expiration
ext_rcode: opt-ext_rcode
header_flags: header_flags
id: id
inception: answers-inception
key_tag: answers-key_tag
labels: answers-labels
name: question-name
op_code: op_code
original_ttl: answers-original_ttl
recursion_available: flags-recursion_available
recursion_desired: flags-recursion_desired
registered_domain: question-registered_domain
resolved_ip: resolved_ip
response_code: response_code
signer_name: answers-signer_name
subdomain: question-subdomain
top_level_domain: question-top_level_domain
truncated_response: flags-truncated_response
ttl: answers-ttl
type: type
type_covered: answers-type_covered
udp_size: opt-udp_size
version: opt-version
record_type: dns-answers-type
query: dns-question-name
parent_domain: dns-question-registered_domain
179 changes: 10 additions & 169 deletions src/main/resources/OSMapping/dns/mappings.json
Original file line number Diff line number Diff line change
@@ -1,175 +1,16 @@
{
"properties": {
"additionals": {
"properties": {
"class": {
"type": "keyword"
},
"data": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"ttl": {
"type": "long"
},
"type": {
"type": "keyword"
}
}
"dns-answers-type": {
"type": "alias",
"path": "record_type"
},
"additionals_count": {
"type": "long"
"dns-question-name": {
"type": "alias",
"path": "query"
},
"answers": {
"properties": {
"algorithm": {
"type": "keyword"
},
"class": {
"type": "keyword"
},
"data": {
"type": "keyword"
},
"expiration": {
"type": "keyword"
},
"inception": {
"type": "keyword"
},
"key_tag": {
"type": "keyword"
},
"labels": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"original_ttl": {
"type": "keyword"
},
"signer_name": {
"type": "keyword"
},
"ttl": {
"type": "long"
},
"type": {
"type": "keyword"
},
"type_covered": {
"type": "keyword"
}
}
},
"answers_count": {
"type": "long"
},
"authorities": {
"properties": {
"class": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"type": {
"type": "keyword"
}
}
},
"authorities_count": {
"type": "long"
},
"flags": {
"properties": {
"authentic_data": {
"type": "boolean"
},
"authoritative": {
"type": "boolean"
},
"checking_disabled": {
"type": "boolean"
},
"recursion_available": {
"type": "boolean"
},
"recursion_desired": {
"type": "boolean"
},
"truncated_response": {
"type": "boolean"
}
}
},
"header_flags": {
"type": "keyword"

},
"id": {
"type": "keyword"

},
"op_code": {
"type": "keyword"

},
"opt": {
"properties": {
"cookie": {
"type": "keyword"
},
"do": {
"type": "boolean"
},
"ext_rcode": {
"type": "keyword"
},
"udp_size": {
"type": "long"
},
"version": {
"type": "keyword"
}
}
},
"question": {
"properties": {
"class": {
"type": "keyword"
},
"etld_plus_one": {
"type": "keyword"
},
"name": {
"type": "keyword"
},
"registered_domain": {
"type": "keyword"
},
"subdomain": {
"type": "keyword"
},
"top_level_domain": {
"type": "keyword"
},
"type": {
"type": "keyword"
}
}
},
"resolved_ip": {
"type": "ip"
},
"response_code": {
"type": "keyword"
},
"type": {
"type": "keyword"
"dns-question-registered_domain": {
"type": "alias",
"path": "parent_domain"
}
}
}
}

0 comments on commit f253867

Please sign in to comment.