secret_service

package
v0.0.0-...-b5aa0b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 30, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

README

The CPSecretService maintains a database of domain rooted keys which are epoch qualified. Each such key has an ACL list consisting of (ProgramName, Property). Properties are Read, Write, Create. The service accepts requests for programs over Tao Channels requesting keys operations by name and satisfies the request if it is authorized.

Each CPSecretService service usually provides these key services for a single "zone."

All service requests and responses are logged.

Documentation

Overview

Package secret_service is a generated protocol buffer package.

It is generated from these files:

service.proto

It has these top-level messages:

ObjectIdMessage
SecretServiceRequest
SecretServiceResponse

Index

Constants

This section is empty.

Variables

View Source
var SecretServiceRequestOperationType_name = map[int32]string{
	1: "READ",
	2: "WRITE",
	3: "CREATE",
	4: "DELETE",
}
View Source
var SecretServiceRequestOperationType_value = map[string]int32{
	"READ":   1,
	"WRITE":  2,
	"CREATE": 3,
	"DELETE": 4,
}

Functions

func CreateObject

func CreateObject(l *list.List, newId, protectorId *protected_objects.ObjectIdMessage,
	encKey *tao.Keys, program *auth.Prin, domain *tao.Domain, newType string,
	newVal []byte) error

func DeleteObject

func DeleteObject(l *list.List, id *protected_objects.ObjectIdMessage, program *auth.Prin,
	domain *tao.Domain) error

func ReadObject

func ReadObject(l *list.List, encKey *tao.Keys, id *protected_objects.ObjectIdMessage,
	program *auth.Prin, domain *tao.Domain) (*string, []byte, error)

func WriteObject

func WriteObject(l *list.List, encKey *tao.Keys, id *protected_objects.ObjectIdMessage,
	program *auth.Prin, domain *tao.Domain, newType string,
	newVal []byte) error

Types

type ObjectIdMessage

type ObjectIdMessage struct {
	ObjName          *string `protobuf:"bytes,1,req,name=obj_name" json:"obj_name,omitempty"`
	ObjEpoch         *int32  `protobuf:"varint,2,opt,name=obj_epoch" json:"obj_epoch,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

Epochs must increase monotonically and be > 0

func (*ObjectIdMessage) Descriptor

func (*ObjectIdMessage) Descriptor() ([]byte, []int)

func (*ObjectIdMessage) GetObjEpoch

func (m *ObjectIdMessage) GetObjEpoch() int32

func (*ObjectIdMessage) GetObjName

func (m *ObjectIdMessage) GetObjName() string

func (*ObjectIdMessage) ProtoMessage

func (*ObjectIdMessage) ProtoMessage()

func (*ObjectIdMessage) Reset

func (m *ObjectIdMessage) Reset()

func (*ObjectIdMessage) String

func (m *ObjectIdMessage) String() string

type SecretServiceRequest

type SecretServiceRequest struct {
	Op       *SecretServiceRequestOperationType `protobuf:"varint,1,opt,name=op,enum=secret_service.SecretServiceRequestOperationType" json:"op,omitempty"`
	SecretId *ObjectIdMessage                   `protobuf:"bytes,2,opt,name=secret_id" json:"secret_id,omitempty"`
	// Fields for type: WRITE.
	NewSecretType *string `protobuf:"bytes,3,opt,name=new_secret_type" json:"new_secret_type,omitempty"`
	NewSecretVal  []byte  `protobuf:"bytes,4,opt,name=new_secret_val" json:"new_secret_val,omitempty"`
	// Fields for type: CREATE (in addition to above fields).
	NewSecretId      *ObjectIdMessage `protobuf:"bytes,5,opt,name=new_secret_id" json:"new_secret_id,omitempty"`
	ProtectorId      *ObjectIdMessage `protobuf:"bytes,6,opt,name=protector_id" json:"protector_id,omitempty"`
	XXX_unrecognized []byte           `json:"-"`
}

func (*SecretServiceRequest) Descriptor

func (*SecretServiceRequest) Descriptor() ([]byte, []int)

func (*SecretServiceRequest) GetNewSecretId

func (m *SecretServiceRequest) GetNewSecretId() *ObjectIdMessage

func (*SecretServiceRequest) GetNewSecretType

func (m *SecretServiceRequest) GetNewSecretType() string

func (*SecretServiceRequest) GetNewSecretVal

func (m *SecretServiceRequest) GetNewSecretVal() []byte

func (*SecretServiceRequest) GetOp

func (*SecretServiceRequest) GetProtectorId

func (m *SecretServiceRequest) GetProtectorId() *ObjectIdMessage

func (*SecretServiceRequest) GetSecretId

func (m *SecretServiceRequest) GetSecretId() *ObjectIdMessage

func (*SecretServiceRequest) ProtoMessage

func (*SecretServiceRequest) ProtoMessage()

func (*SecretServiceRequest) Reset

func (m *SecretServiceRequest) Reset()

func (*SecretServiceRequest) String

func (m *SecretServiceRequest) String() string

type SecretServiceRequestOperationType

type SecretServiceRequestOperationType int32
const (
	SecretServiceRequest_READ   SecretServiceRequestOperationType = 1
	SecretServiceRequest_WRITE  SecretServiceRequestOperationType = 2
	SecretServiceRequest_CREATE SecretServiceRequestOperationType = 3
	SecretServiceRequest_DELETE SecretServiceRequestOperationType = 4
)

func (SecretServiceRequestOperationType) Enum

func (SecretServiceRequestOperationType) EnumDescriptor

func (SecretServiceRequestOperationType) EnumDescriptor() ([]byte, []int)

func (SecretServiceRequestOperationType) String

func (*SecretServiceRequestOperationType) UnmarshalJSON

func (x *SecretServiceRequestOperationType) UnmarshalJSON(data []byte) error

type SecretServiceResponse

type SecretServiceResponse struct {
	ErrorMessage *string `protobuf:"bytes,1,opt,name=error_message" json:"error_message,omitempty"`
	// Fields for response to READ.
	SecretType       *string `protobuf:"bytes,2,opt,name=secret_type" json:"secret_type,omitempty"`
	SecretVal        []byte  `protobuf:"bytes,3,opt,name=secret_val" json:"secret_val,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*SecretServiceResponse) Descriptor

func (*SecretServiceResponse) Descriptor() ([]byte, []int)

func (*SecretServiceResponse) GetErrorMessage

func (m *SecretServiceResponse) GetErrorMessage() string

func (*SecretServiceResponse) GetSecretType

func (m *SecretServiceResponse) GetSecretType() string

func (*SecretServiceResponse) GetSecretVal

func (m *SecretServiceResponse) GetSecretVal() []byte

func (*SecretServiceResponse) ProtoMessage

func (*SecretServiceResponse) ProtoMessage()

func (*SecretServiceResponse) Reset

func (m *SecretServiceResponse) Reset()

func (*SecretServiceResponse) String

func (m *SecretServiceResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL