From d072a4f54de41d58bfcfff1af8c1126e5595397b Mon Sep 17 00:00:00 2001
From: midas
The public_key must be added on the monitored server at the following path: /var/lib/tor/prometheus/authorized_clients/server.auth with the following content
- myclientserver.onion:descriptor:x25519:3B6CE5X4I4XGXA5TDQWQONLLAJ6B5FQNPTBOFSF4AN6K6AJUXBOQ
+ mymonitoredserver.onion:descriptor:x25519:3B6CE5X4I4XGXA5TDQWQONLLAJ6B5FQNPTBOFSF4AN6K6AJUXBOQ
@@ -335,7 +335,19 @@ descriptor:x25519:H7O5I7HUGLFM4IMPHNRN6L4S6TG4KJYDBXTYGOYJOUHH5NXVPJVA
That way, only your monitoring server will be able to authenticate and scrape data from your monitored server.
+
+ Grafana has its own authentication system and database, still it reamins a critical service and it's not immune from 0 days and vulnerabilities that could be leveraged to obtain access. In order to apply a defense in depth principle we are going to do the same exercise for it:
+
+
+ We'll put the public key on our monitoring server at /var/lib/tor/grafana/authorized_clients/admin.auth
+ user@computer$ tor-client-auth-gen
+private_key=descriptor:x25519:FD7NAZTGZAXA6CTXNXR3JCVSKAPW23EP5EQOUMXKRQCKACEVUJ7A
+public_key=descriptor:x25519:OBIIXC3MWQ4VCEUS7Z6LOMOQG3CFP77SSWE45EDITP55WHVZFM6Q
+
+ and our public key on our whonix workstation at /var/lib/tor/auth_keys/grafana.auth_private
+ That way, even if an attacker discovers your grafana instance URL and has in their possession either your password or an exploit allowing them to do an authentication bypass
+ they still won't be able to get in unless they also break the encryption underpinning the tor network.