Documentation ¶
Overview ¶
Package keyserver implements a transparent key server for End to End.
Index ¶
- Constants
- Variables
- type Fingerprint
- type Server
- func (s *Server) GetDomain(ctx context.Context, in *pb.GetDomainRequest) (*pb.Domain, error)
- func (s *Server) GetEntry(ctx context.Context, in *pb.GetEntryRequest) (*pb.GetEntryResponse, error)
- func (s *Server) GetEpoch(ctx context.Context, in *pb.GetEpochRequest) (*pb.Epoch, error)
- func (*Server) GetEpochStream(in *pb.GetEpochRequest, stream pb.KeyTransparency_GetEpochStreamServer) error
- func (s *Server) ListEntryHistory(ctx context.Context, in *pb.ListEntryHistoryRequest) (*pb.ListEntryHistoryResponse, error)
- func (s *Server) ListMutations(ctx context.Context, in *pb.ListMutationsRequest) (*pb.ListMutationsResponse, error)
- func (*Server) ListMutationsStream(in *pb.ListMutationsRequest, ...) error
- func (s *Server) UpdateEntry(ctx context.Context, in *pb.UpdateEntryRequest) (*pb.UpdateEntryResponse, error)
Constants ¶
const ( MaxClockDrift = 5 * time.Minute PGPAppID = "pgp" MinNonceLen = 16 )
Maximum period of time to allow between CreationTime and server time.
Variables ¶
var ( // ErrNoAppID occurs when the app id is missing. ErrNoAppID = errors.New("missing AppID") // ErrNoCommitted occurs when the committed field is missing. ErrNoCommitted = errors.New("missing commitment") // ErrCommittedKeyLen occurs when the committed key is too small. ErrCommittedKeyLen = errors.New("committed.key is too small") // ErrWrongIndex occurs when the index in key value does not match the // output of VRF. ErrWrongIndex = errors.New("index does not match VRF") // ErrInvalidStart occurs when the start epoch of ListEntryHistoryRequest // is not valid (not in [1, currentEpoch]). ErrInvalidStart = errors.New("invalid start epoch") // ErrInvalidPageSize occurs when the page size is < 0. ErrInvalidPageSize = errors.New("Invalid page size") )
var ( // ErrEntityCount occurs when more than one entity is found. ErrEntityCount = errors.New("pgp: one entity allowed") // ErrRevocationCount occurs when a revocation is found. ErrRevocationCount = errors.New("pgp: no revocations allowed") // ErrSigCount occurs when more than one signature packet is found. ErrSigCount = errors.New("pgp: only self signature allowed") // ErrSubkeyCount occurs when more than one subkey is found. ErrSubkeyCount = errors.New("pgp: one subkey allowed") // ErrUserID occurs when the userid does not match the expected userid. ErrUserID = errors.New("pgp: wrong userID") // ErrMissingSelfSig occurs when the self signature packet is missing. ErrMissingSelfSig = errors.New("pgp: missing valid self signature") // ErrMissingSubkey occurs when a subkey is missing. ErrMissingSubkey = errors.New("pgp: missing valid subkey") // ErrExpiredSig occurs when a signature packet is expired. ErrExpiredSig = errors.New("pgp: expired signature") // ErrAlgo occurs when unsupported algorithms are used in a signature packet. ErrAlgo = errors.New("pgp: unsupported algorithm") )
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server holds internal state for the key server.
func New ¶
func New(domains domain.Storage, tlog tpb.TrillianLogClient, tmap tpb.TrillianMapClient, tadmin tpb.TrillianAdminClient, mutator mutator.Mutator, auth authentication.Authenticator, authz authorization.Authorization, mutations mutator.MutationStorage) *Server
New creates a new instance of the key server.
func (*Server) GetDomain ¶
GetDomain returns all info tied to the specified domain.
This API to get all necessary data needed to verify a particular key-server. Data contains for instance the tree-info, like for instance the log/map-id and the corresponding public-keys.
func (*Server) GetEntry ¶
func (s *Server) GetEntry(ctx context.Context, in *pb.GetEntryRequest) (*pb.GetEntryResponse, error)
GetEntry returns a user's profile and proof that there is only one object for this user and that it is the same one being provided to everyone else. GetEntry also supports querying past values by setting the epoch field.
func (*Server) GetEpochStream ¶
func (*Server) GetEpochStream(in *pb.GetEpochRequest, stream pb.KeyTransparency_GetEpochStreamServer) error
GetEpochStream is a streaming API similar to GetMutations.
func (*Server) ListEntryHistory ¶
func (s *Server) ListEntryHistory(ctx context.Context, in *pb.ListEntryHistoryRequest) (*pb.ListEntryHistoryResponse, error)
ListEntryHistory returns a list of EntryProofs covering a period of time.
func (*Server) ListMutations ¶
func (s *Server) ListMutations(ctx context.Context, in *pb.ListMutationsRequest) (*pb.ListMutationsResponse, error)
ListMutations returns the mutations that created an epoch.
func (*Server) ListMutationsStream ¶
func (*Server) ListMutationsStream(in *pb.ListMutationsRequest, stream pb.KeyTransparency_ListMutationsStreamServer) error
ListMutationsStream is a streaming list of mutations in a specific epoch.
func (*Server) UpdateEntry ¶
func (s *Server) UpdateEntry(ctx context.Context, in *pb.UpdateEntryRequest) (*pb.UpdateEntryResponse, error)
UpdateEntry updates a user's profile. If the user does not exist, a new profile will be created.