[rudder-dev] Strenghten the integrity of the node policy if using Relays

Janos Mattyasovszky mail at matya.eu
Tue Mar 14 10:16:37 CET 2017


Hi dear Rudder Community,

The issue:
The policy generated by the Root server is transmitted encrypted via the Relay servers, but this provides only transport encryption between the endpoints, and the Relays basically are by-design MITM hosts, which have the ability to modify policy files and reports going back through them (the inventories are signed - so they would break). This requires that every relay has a high need for integrity, since there is no real way to determine from a Rudder-Root-Server point of view if any of the relay behaves rogue and injects bogus policy and modifies the reports stream back to represent that all nodes are good, even if they are not and are executing an attacker-provided modified policy.

Proposed solution:
Use cryptographic signature on the generated policy with the Root Server's RSA key.

With the usage of PKI a client can validate the policy received from the Master before executing it by trusting the public key of it. This would require the pubkey of the Root Server to be known to the Nodes. Currently if you have any Relays in between, they become the effective policy server for the nodes, and the nodes will not know anything about the Relay not being the root server (they just behave identical as if they would be connected to a root server in the POW of an end-of-the-leaf node).

By using a logic like "trust on first use", where the root server includes it's pubkey in any policy being generated, and then the node would trust the first key that it would receive if it has no policy yet, it could establish a trust until a "rudder agent reset/reinit" would be issued. After that the node could verify any further policy by checking the signature of a file containing the hashes of all the policy files.

This would work as long the nodes are not connecting initially to a compromised relay, or if the Pubkey of the Root Server is also deployed out-of-band at the time the rudder-agent package is installed and policy_server.dat is configured, so basically the node has already an initial knowledge of the root server's pubkey, and would as of that only trust policy signed by that root server, regardless of the path the policy would travel.

This would raise the overall security level and reducing the criticality of a relay to "only" require confidentiality, since any compromise would result in worst case the nodes behind a relay not executing the compromised policy and if the relay was faking the expected reports the nodes would have to send through the relays, so we'd go from "compromising all nodes below the relay to execute our code" down to "cutting off the nodes from any new policy update without being detected by the Root server", which is still a great improvement, and if you have out-of-Rudder monitoring for policy updates (#7282), you could detect this by having nodes not receiving policy updates as scheduled.

A second step could be not to send the reports via unencrpyted UDP Syslog, but use the same method as sending the inventories: one file with the current run's reports, signed by the node's key, this would also solve the issue of not being able to detect any compromised relay.

Thanks for reading,

Best Regards,


Janos Mattyasovszky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-dev/attachments/20170314/5c4be163/attachment.html>


More information about the rudder-dev mailing list