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>
* Add gin-contrib/pprof dependency
* Run pprof server on agent with --profiler flag
* Add --profiler flag to cli
* Fix error message
* Print cpu usage percentage
* measure cpu of current pid instead of globaly on the system
* Add scripts to plot performance
* Plot packetsCount in analysis
* Concat to DataFrame
* Plot in turbo colorscheme
* Make COLORMAP const
* Fix rss units
* Reduce code repetition by adding function for plotting
* Allow grouping based on filenames
* Temporary: Marked with comments where to disable code for experiments
* Add newline at end of file
* Add tap.cpuprofile flag. Change memprofile flag to tap.memprofile
* create tapper modes for debugging using env vars
* Fix rss plot units (MB instead of bytes)
* Remove comment
* Add info to plot script
* Remove tap.cpumemprofile. Rename tap.memprofile to memprofile
* Remove unused import
* Remove whitespaces
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Remove whitespaces
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Remove whitespaces
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Remove whitespaces
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Remove whitespaces
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Remove whitespaces
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Rename debug env vars
* Create package for debug env vars, read each env var once
* Run go mod tidy
* Increment MatchedPairs before emitting
* Only count cores once
* Count virtual and physical cores
* Add dbgctl replace in cli
* Fix lint: Check return values
* Add tap/dbgctl to test-lint make rule
* Replace tap/dbgctl in all modules
* #run_acceptance_tests
* Copy dbgctl module to docker image
* Debug/profile tapper benchmark (#1093)
* add mizu debug env to avoid all extensions
* add readme + run_tapper_benchmark.sh
* temporary change branch name
* fix readme
* fix MIZU_BENCHMARK_CLIENTS_COUNT env
* change tap target to tcp stream
* track live tcp streams
* pr fixes
* rename tapperPacketsCount to ignored_packets_count
* change mizu tapper to mizu debugg
Co-authored-by: David Levanon <dvdlevanon@gmail.com>
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Remove `tcpStreamWrapper` struct
* Refactor `tap` module and move some of the code to `tap/api` module
* Move `TrafficFilteringOptions` struct to `shared` module
* Change the `Dissect` method signature to have `*TcpReader` as an argument
* Add `CloseOtherProtocolDissectors` method and use it to synchronously close the other protocol dissectors
* Run `go mod tidy` in `cli` module
* Rename `SuperIdentifier` struct to `ProtoIdentifier`
* Remove `SuperTimer` struct
* Bring back `CloseTimedoutTcpStreamChannels` method
* Run `go mod tidy` everywhere
* Remove `GOGC` environment variable from tapper
* Fix the tests
* Bring back `debug.FreeOSMemory()` call
* Make `CloseOtherProtocolDissectors` method mutexed
* Revert "Remove `GOGC` environment variable from tapper"
This reverts commit cfc2484bbb.
* Bring back the removed `checksum`, `nooptcheck` and `ignorefsmerr` flags
* Define a bunch of interfaces and don't export any new structs from `tap/api`
* Keep the interfaces in `tap/api` but move the structs to `tap/tcp`
* Fix the unit tests by depending on `github.com/up9inc/mizu/tap`
* Use the modified `tlsEmitter`
* Define `TlsChunk` interface and make `tlsReader` implement `TcpReader`
* Remove unused fields in `tlsReader`
* Define `ReassemblyStream` interface and separate `gopacket` specififc fields to `tcpReassemblyStream` struct
Such that make `tap/api` don't depend on `gopacket`
* Remove the unused fields
* Make `tlsPoller` implement `TcpStream` interface and remove the call to `NewTcpStreamDummy` method
* Remove unused fields from `tlsPoller`
* Remove almost all of the setter methods in `TcpReader` and `TcpStream` interface and remove `TlsChunk` interface
* Revert "Revert "Remove `GOGC` environment variable from tapper""
This reverts commit ab2b9a803b.
* Revert "Bring back `debug.FreeOSMemory()` call"
This reverts commit 1cce863bbb.
* Remove excess comment
* Fix acceptance tests (`logger` module) #run_acceptance_tests
* Bring back `github.com/patrickmn/go-cache`
* Fix `NewTcpStream` method signature
* Put `tcpReader` and `tcpStream` mocks into protocol dissectors to remove `github.com/up9inc/mizu/tap` dependency
* Fix AMQP tests
* Revert 960ba644cd
* Revert `go.mod` and `go.sum` files in protocol dissectors
* Fix the comment position
* Revert `AppStatsInst` change
* Fix indent
* Fix CLI build
* Fix linter error
* Fix error msg
* Revert some of the changes in `chunk.go`
* Remove non-critical TLS detected log that causes `slice bounds out of range` error
* Remove all non-functional `OutboundLink` code that was providing `/status/recentTLSLinks` endpoint
* Fix more unused code
Update tappers via websocket instead of by env var. This way the DaemonSet doesn't have to be applied just to notify the tappers that the tap targets changed. The number of tapper restarts is reduced. The DaemonSet still gets applied when there is a need to add/remove a tapper from a node.
* Add the ability to set the insertion filter into CLI
* Resolve the conflict
* Upgrade Basenine to `v0.5.0` and check the insertion filter against syntax errors inside CLI
* Upgrade Basenine to `v0.5.1`
* Update the sums
* initial tls tapper commit
* add tls flag to mizu cli
* support ssl_read_ex/ssl_write_ex
* use hostproc to find libssl
* auto discover tls processes
* support libssl1.0
* recompile ebpf with old clang/llvm
* Update tap/passive_tapper.go
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Update tap/tlstapper/tls_poller.go
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Update tap/tlstapper/tls_poller.go
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Update tap/tlstapper/tls_poller.go
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Update tap/tlstapper/tls_poller.go
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Update tap/tlstapper/tls_poller.go
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Update tap/tlstapper/tls_poller.go
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* Update tap/tlstapper/tls_poller.go
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
* upgrade ebpf go lib
* handling big tls messages
* fixing max buffer size in ebpf
* remove unused import
* fix linter issues
* minor pr fixes
* compile with old clang
* fix cgroup file format
* pr fixes + cgroup extract enhance
* fix linter
* adding indirect ebpf dep to agent go.mod
* adding ebpf docker builder
* minor pr fixes
* add req resp matcher to dissect
* rename ssl hooks to ssl hooks structs
* move to alpine, use local copy of mizu instead of git, add readme
* use global req resp mather for tls
Co-authored-by: M. Mert Yıldıran <mehmet@up9.com>
Co-authored-by: gadotroee <55343099+gadotroee@users.noreply.github.com>
* TRA-4235 Revert "Move Basenine binary into a separate container"
* Deploy the same agent image as a separate container for Basenine
Co-authored-by: Igor Gov <iggvrv@gmail.com>
* modified Dockerfile to work for both amd64 (Intel) and arm64 (M1)
* added changelog
* Update `Dockerfile` to have `ARCH` build argument
* Remove `docs/CHANGES.md`
* Upgrade the Basenine version from `v0.3.0` to `v0.4.6`
* Update `publish.yml` to have `ARCH` build argument
* Switch `BasenineImageRepo` to Docker Hub
* Have separate build arguments for `ARCH` and `GOARCH`
* Upgrade the Basenine version from `v0.4.6` to `v0.4.10`
* Oops forgot to update the 10th duplicated shell script
* Fix the oopsie and reduce duplications
* Fix `Dockerfile`
* Fix the incompatibility issue between Go plugins and gold linker in Alpine inside `Dockerfile`
* Fix `asm: xxhash_amd64.s:120: when dynamic linking, R15 is clobbered by a global variable access` error
* Update `Dockerfile` to have cross-compilation on an AMD64 machine
Also revert changes in the shell scripts
* Delete `debug.Dockerfile`
* Create a custom base (`debian:buster-slim` based) image for the shipped image
* Replace `mertyildiran/debian-pcap` with `up9inc/debian-pcap`
* Upgrade Basenine version to `v0.4.12`
* Use `debian:stable-slim` as the base
* Fix the indentation in the `Dockerfile`
* Update `publish.yml`
* Enable `publish.yml` for `feature/multiarch_build` branch
* Tag correctly and set `ARCH` Docker argument
* Remove the lines that are forgotten to be removed from the shell scripts
* Add `MizuAgentImageRepo` constant and use it as default `AgentImage` value
* Bring back `Set up Cloud SDK` step to `Build the CLI and publish` job
* Build ARM64 CLI for Linux as well
* Revert "Enable `publish.yml` for `feature/multiarch_build` branch"
This reverts commit d30be4c1f0.
* Revert Go 1.17 upgrade
* Remove `build_extensions_debug.sh` as well
* Make the `Dockerfile` to compile the agent statically
* Statically link the protocol extensions
* Fix `Dockerfile`
* Bring back `-s -w` flags
* Verify the signatures of the downloads in `dockcross/linux-arm64-musl`
* Revert modifications in some shell scripts
* Make the `BUILDARCH` and `TARGETARCH` separation in the `Dockerfile`
* Separate cross-compilation builder image into a separate repo named `up9inc/linux-arm64-musl-go-libpcap`
* Fill the shell script and specify the tag for `dockcross/linux-arm64-musl`
* Remove the unnecessary dependencies from `builder-native-base`
* Improve the comments in the `Dockerfile`
* Upgrade Basenine version to `v0.4.13`
* Fix `Dockerfile`
* Revert "Revert "Enable `publish.yml` for `feature/multiarch_build` branch""
This reverts commit 303e466bdc.
* Revert "Revert "Revert "Enable `publish.yml` for `feature/multiarch_build` branch"""
This reverts commit 0fe252bbdb.
* Remove `push-docker-debug` from the `Makefile`
* Rename `publish.yml` to `release.yml`
Co-authored-by: Alex Haiut <alex@up9.com>