chore: observability and security for HTTP gateway - #1825
Merged
Conversation
# Conflicts: # packages/dashmate/configs/getConfigFileMigrationsFactory.js
shumkov
commented
Apr 30, 2024
shumkov
commented
May 1, 2024
# Conflicts: # package.json # yarn.lock
…chore/dashmate/secure-api
lklimek
previously approved these changes
May 8, 2024
lklimek
approved these changes
May 8, 2024
QuantumExplorer
approved these changes
May 8, 2024
QuantumExplorer
left a comment
Member
There was a problem hiding this comment.
Approving without review.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue being fixed or feature implemented
Currently, to handle HTTP requests in Evonode we use outdated version of Envoy This version contains many security vulnerabilities and is not configured properly for being an edge proxy for all incoming HTTP traffic. To control and limit the load it should provide mechanisms to limit incoming requests. We don't have any visibility on HTTP traffic in general and specific requests to Drive and DAPI.
What was done?
platform.gateway.maxConnectionsto limit max active connections to Gateway. If we close to the limit, we disable keep-alive, and stop accepting requests when we reach it.platform.gateway.maxHeapSizeInBytesto release free memory and disable keep-alive when we close to limit and reject incoming connections when we reach it.platform.gateway.upstreams.*.maxRequestto limit active requests to specific upstream (DAPI, Drive, etc)platform.gateway.metricsto expose Envoy Prometheus metrics.platform.gateway.adminto enable Envoy admin interface (must be enabled for metrics).platform.gateway.listeners.*.http2.maxConcurrentStreamsto limit max concurrent streams per incoming HTTP2 connection.platform.gateway.log.levelto define verbosity of Envoy application logs.platform.gateway.log.accessLogsto define any number of access logs. Supported destinations arestdout,stderrandfile. Supported formats aretextorjson. Default output templates are defined for each format and can be ovewritten for any specific access logs.platfrom.gateway.rateLimiter.metricsto expose Rate limiter Prometheus metrics.platform.drive.abci.metricsto expose Drive ABCI Prometheus metrics.dapi_tx_filter_streamdocker compose service renamed todapi_core_streamssince it expose multiple streaming endpoints.getProofssince this is internal endpoint between DAPI and Drive and can be misused to make a huge load on the system./stats/prometheusHow Has This Been Tested?
Multiple testing scenarios to verify each configuration on the ouzo devnet with metric visualisations in Grafana
Breaking Changes
None
Checklist:
For repository code-owners and collaborators only