blob: 037c6b45f27522efaff8dc04975ae84a34621b04 [file] [log] [blame]
Andres Erbsen975c8832014-06-18 12:06:07 -07001package security
2
Jiri Simsa519c5072014-09-17 21:37:57 -07003import "veyron.io/veyron/veyron2/security"
Andres Erbsen975c8832014-06-18 12:06:07 -07004
Asim Shankara94e5072014-08-19 18:18:36 -07005// Discharger is the interface for obtaining discharges for ThirdPartyCaveats.
Andres Erbsen975c8832014-06-18 12:06:07 -07006type Discharger interface {
7 // Discharge is called by a principal that holds a blessing with a third
8 // party caveat and seeks to get a discharge that proves the fulfillment of
9 // this caveat.
Asim Shankara94e5072014-08-19 18:18:36 -070010 //
Ankurf044a8d2014-09-05 17:05:24 -070011 // Caveat and Discharge are of type ThirdPartyCaveat and Discharge
Andres Erbsen975c8832014-06-18 12:06:07 -070012 // respectively. (not enforced here because vdl does not know these types)
13 // TODO(ataly,ashankar): Figure out a VDL representation for ThirdPartyCaveat
14 // and Discharge and use those here?
Asim Shankara94e5072014-08-19 18:18:36 -070015 Discharge(Caveat any, Impetus security.DischargeImpetus) (Discharge any, err error) {security.ReadLabel}
Andres Erbsen975c8832014-06-18 12:06:07 -070016}