veyron/tools/principal: Fix possible man in the middle attack by having
the principal tool check the public key of the server.

There is a potential man in the middle attack when the principal tool
makes the final RPC to exchange the macaroon for a Blessings.
This CL fixes this by having the identity server send the PublicKey of
the Principal at the server along with the macaroon. The principal tool
then checks that the PublicKey in the RemoteBlessings matches the previously
sent PublicKey.

Change-Id: I68028af810280c0107c7ccf4ff70a50710696032
4 files changed
tree: db7477cb6aff8c925b39f7d43728dc087059278b
  1. lib/
  2. profiles/
  3. runtimes/
  4. security/
  5. services/
  6. tools/