Re:A high-performance, zero allocation, dynamic JSON Threat ...
by eloff on Wednesday September 18, 2019 @09:58PM
(#21012499)
The author should describe this more clearly, without jargon or the word threat which seems an odd choice in this case. I had to read the whole readme to figure out it does length and depth validation on a json payload. Hopefully it handles streaming data.
Re:A high-performance, zero allocation, dynamic JSON Threat ...
by ankuranand on Thursday September 19, 2019 @12:50AM
(#21013386)
Thanks for feedback, while "JSON Threat Protection" is also a quite used terminology, but yes would provide an description with common word too. Currently Streaming handling is in progress.
Re:A high-performance, zero allocation, dynamic JSON Threat ...
by ankuranand on Thursday September 19, 2019 @01:08AM
(#21013457)
What is JSON Threat Protection?
JSON requests are susceptible to attacks characterized by unusual inflation of elements and nesting levels. Attackers use recursive techniques to consume memory resources by using huge json files to overwhelm the parser and eventually crash the service.
JSON threat protection is terms that describe the way to minimize the risk from such attacks by defining few limits on the json structure like length and depth validation on a json, and helps protect your applications from such intrusions.
Re:A high-performance, zero allocation, dynamic JSON Threat ...
by conradludgate on Thursday September 19, 2019 @02:27AM
(#21013810)
From the description, I'm guessing that using a specific object json parser (such as https://github.com/mailru/easyjson ) would not be vulnerable to such attacks. They will just skip characters if the field is not found. And if a nested field is found inplace of a non nested one, they'll just error
Re:A high-performance, zero allocation, dynamic JSON Threat ...
by q3k on Thursday September 19, 2019 @04:59AM
(#21014518)
I don't get it. Are there really parsers that will allocate anything more than O(n) memory for a given maliciously crafted payload? Are there any examples/studies of this?
It seems that limiting your marshaled input size to something sensible for your application should do the trick just fine for most cases.
Re:A high-performance, zero allocation, dynamic JSON Threat ...
by nitwit005 on Thursday September 19, 2019 @12:38AM
(#21013343)
It doesn't allocate itself, but it effectively forces a big allocation by only supporting []byte inputs. Typically people directly pass the request body to json.NewDecoder, as it implements the Reader interface.
Re:A high-performance, zero allocation, dynamic JSON Threat ...
by ankuranand on Thursday September 19, 2019 @12:53AM
(#21013396)
JavaScript object notation(JSON) is vulnerable to content level attacks. Such attacks attempt to use huge json files to overwhelm the parser and eventually crash the service.
JSON threat protection is terms that describe the way to minimize the risk from such attacks by defining few limits on the json structure.
Re:A high-performance, zero allocation, dynamic JSON Threat ...
by tomohawk on Thursday September 19, 2019 @05:11AM
(#21014571)
There are situations where you do not want to parse the JSON, but do want to ensure that the JSON is not going to cause a problem. Such as a gateway. It would be a PITA for the gateway to have to know all JSON schema of all services it is protecting. There are XML validators that that perform similar functions.
Re:A high-performance, zero allocation, dynamic JSON Threat ...
by ankuranand on Thursday September 19, 2019 @12:52AM
(#21013394)
JavaScript object notation(JSON) is vulnerable to content level attacks. Such attacks attempt to use huge json files to overwhelm the parser and eventually crash the service.
JSON threat protection is terms that describe the way to minimize the risk from such attacks by defining few limits on the json structure.
JSON requests are susceptible to attacks characterized by unusual inflation of elements and nesting levels. Attackers use recursive techniques to consume memory resources by using huge json files to overwhelm the parser and eventually crash the service.
JSON threat protection is terms that describe the way to minimize the risk from such attacks by defining few limits on the json structure like length and depth validation on a json, and helps protect your applications from such intrusions.
It seems that limiting your marshaled input size to something sensible for your application should do the trick just fine for most cases.
JSON threat protection is terms that describe the way to minimize the risk from such attacks by defining few limits on the json structure.
Yes It also validates the json.
JSON threat protection is terms that describe the way to minimize the risk from such attacks by defining few limits on the json structure.