kubeshark/agent/pkg/oas
Andrey Pokhilko 7a823e89f1
Add option to limit example len (#1145)
Do not save OAS example response if it is over the limit.
SpecGen.MaxExampleLen is measured in bytes.
Limit=0 means "don't record any examples", while limit=-1 means "record all".

Limit is configured via the config file / --set: --set oas.max-example-len=100.
The default is 10KB.

This PR breaks the previous config. Moved oas bool (enable/disable OAS) to oas.enable.
Users who wish to disable OAS (or to explicitly enable it) should now to so with --set oas.enable=false instead of --set oas=false.

Co-authored-by: Nimrod Gilboa Markevich <nimrod@up9.com>
Co-authored-by: Nimrod Gilboa Markevich <59927337+nimrod-up9@users.noreply.github.com>
2022-06-16 14:18:42 +03:00
..
oas-samples Upgrade Basenine version to v0.7.1 (#984) 2022-04-13 11:28:48 +03:00
test_artifacts Add option to limit example len (#1145) 2022-06-16 14:18:42 +03:00
counters.go OAS: Some minor fixes (#762) 2022-02-07 10:12:05 +03:00
feeder_test.go Make logger a separate module such that don't depend on shared module as a whole for logging (#1047) 2022-04-27 22:26:27 +03:00
gibberish_test.go OAS: Improve URL clustering (#711) 2022-02-02 12:33:24 +02:00
gibberish.go OAS: Improve URL clustering (#711) 2022-02-02 12:33:24 +02:00
ignores.go Add option to limit example len (#1145) 2022-06-16 14:18:42 +03:00
oas_generator_test.go Add option to limit example len (#1145) 2022-06-16 14:18:42 +03:00
oas_generator.go Add option to limit example len (#1145) 2022-06-16 14:18:42 +03:00
specgen_test.go Add option to limit example len (#1145) 2022-06-16 14:18:42 +03:00
specgen.go Add option to limit example len (#1145) 2022-06-16 14:18:42 +03:00
tree_test.go Upgrade Basenine version to v0.7.1 (#984) 2022-04-13 11:28:48 +03:00
tree.go Make logger a separate module such that don't depend on shared module as a whole for logging (#1047) 2022-04-27 22:26:27 +03:00
trigrams.go OAS: Improve URL clustering (#711) 2022-02-02 12:33:24 +02:00
utils_test.go Upgrade Basenine version to v0.7.1 (#984) 2022-04-13 11:28:48 +03:00
utils.go Make logger a separate module such that don't depend on shared module as a whole for logging (#1047) 2022-04-27 22:26:27 +03:00