Anonymize hosts in subnet health report (#12627)

Ensure that hostnames / ip addresses are not printed in the subnet
health report. Anonymize them by replacing them with `servern` where `n`
represents the position of the server in the pool.

This is done by building a `host anonymizer` map that maps every
possible value containing the host e.g. host, host:port,
http://host:port, etc to the corresponding anonymized name and using
this map to replace the values at the time of health report generation.

A different logic is used to anonymize host names in the `procinfo`
data, as the host names are part of an ellipses pattern in the process
start command. Here we just replace the prefix/suffix of the ellipses
pattern with their hashes.
This commit is contained in:
Shireesh Anjal
2021-07-14 12:53:22 +05:30
committed by GitHub
parent 8d19efe7e0
commit 4d6d4244f1
4 changed files with 320 additions and 26 deletions
-2
View File
@@ -89,5 +89,3 @@ require (
google.golang.org/api v0.31.0
gopkg.in/yaml.v2 v2.4.0
)
replace google.golang.org/grpc => google.golang.org/grpc v1.29.1