veyron/services/security/discharger: Increase validity period of a
discharge.

Motivation: Clock skews of more than a minute are quite common. As a
result, a discharge fetched from the service may not be usable at a
server that is more than 1 minute ahead of the discharge service.
(Emprically, our Raspberry Pis were 3 minutes ahead of my laptop)

For now, just punt to 15 minutes!

Change-Id: Ie6f4b5bac3c2d65ea8cca40beb57efa39b254644
diff --git a/services/security/discharger/discharger.go b/services/security/discharger/discharger.go
index 35e9422..dfc4247 100644
--- a/services/security/discharger/discharger.go
+++ b/services/security/discharger/discharger.go
@@ -14,8 +14,6 @@
 // namespace with no additional caveats iff the caveat is valid.
 type dischargerd struct{}
 
-// TODO(andreser,ataly): make it easier for third party public key caveats to specify the caveats on their discharges
-
 func (dischargerd) Discharge(ctx ipc.ServerContext, caveatAny vdlutil.Any, _ security.DischargeImpetus) (vdlutil.Any, error) {
 	caveat, ok := caveatAny.(security.ThirdPartyCaveat)
 	if !ok {
@@ -24,15 +22,19 @@
 	if err := caveat.Dischargeable(ctx); err != nil {
 		return nil, fmt.Errorf("third-party caveat %v cannot be discharged for this context: %v", caveat, err)
 	}
-	expiry, err := security.ExpiryCaveat(time.Now().Add(time.Minute))
+	expiry, err := security.ExpiryCaveat(time.Now().Add(15 * time.Minute))
 	if err != nil {
 		return nil, fmt.Errorf("unable to create expiration caveat on the discharge: %v", err)
 	}
 	return ctx.LocalPrincipal().MintDischarge(caveat, expiry)
 }
 
-// NewDischarger returns a discharger service implementation that grants discharges using the MintDischarge
-// on the principal receiving the RPC.
+// NewDischarger returns a discharger service implementation that grants
+// discharges using the MintDischarge on the principal receiving the RPC.
+//
+// Discharges are valid for 15 minutes.
+// TODO(ashankar,ataly): Parameterize this? Make it easier for clients to add
+// caveats on the discharge?
 func NewDischarger() services.DischargerServerMethods {
 	return dischargerd{}
 }