Credentials passed via Boundary nodes

Let us assume canisters have credentials they need to use. The request from a client is sent to a boundary node. The boundary nodes could be malicious. So how can we avoid “man in the middle” attack at the boundary node? Can messages be encrypted or is it upto the canister developer to worry about this? Thanks in advance.