veyron2/security,veyron/runtimes/google/ipc: Provide context to a discharger.
(Originally done by andreser@, I took over the change since he's left after
completing his internship)
This commit adds the interfaces and plumbing to:
(a) Allow ThirdPartyCaveats to specify what information should be reported
to the third-party issuing discharges
(b) Sending that information and making it available to the Discharger
RPC service so that implementations can make decisions on whether or
not to discharge and to bind the discharge to a specific use.
Consider the following use-case:
- I provide a blessing to my child's device that allows the device to
watch movies from my content provider.
This blessing includes a ThirdPartyCaveat that requires a discharge
from me (i.e., a Discharger service running on my device)
- When my child tries to view a movie, the context pops up on my device
asking for permission. Based on the context (which movie is being
requested for example), I issue a discharge with caveats, for example:
(a) Discharge is valid for any G rated movie
(b) Discharge is valid only for a specific movie otherwise.
Without this additional context, I had no useful information other than
the fact that a "discharge is being requested" in order to guide my
decision on whether or not to issue a discharge and what caveats to put
on it.
Change-Id: I079fba0d3848b4f630bccde719f50047e81d9008
11 files changed