evaluation

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

README

Evaluation Manager

  • The Evaluation Manager is responsible for evaluating incoming evidences (from the collection modules).
  • The evaluation is based on rules which it receives from the Requirements Manager.
  • The evaluation results can be queried by the Dashboard for presenting them to authorized parties in a visualized form.

Documentation

Index

Constants

View Source
const (
	DatabaseErrorMsg                 = "DB error"
	EvidenceNotFoundErrorMsg         = "No evidence found"
	NoEvidencesInDBErrorMsg          = "There are no evidences for this service in the DB yet"
	ComplianceResultNotFoundErrorMsg = "Compliance result not found"
)
View Source
const (
	// DefaultListComplianceDays indicates the default value for `days` in the ListCompliance endpoint
	DefaultListComplianceDays = int64(30)
	// DefaultListEvidencesDays indicates the default value for `days` in the ListEvidences endpoint
	DefaultListEvidencesDays = int64(30)
)

Variables

View Source
var (
	DefaultRequirementsManagerAddress = grpcTarget{/* contains filtered or unexported fields */}
)

Functions

func WithOAuth2Authorizer added in v0.2.0

func WithOAuth2Authorizer(config *clientcredentials.Config) service.ServiceOption[Server]

WithOAuth2Authorizer is an option to use an OAuth 2.0 authorizer

func WithRequirementsManagerAddress

func WithRequirementsManagerAddress(address string, opts ...grpc.DialOption) service.ServiceOption[Server]

WithRequirementsManagerAddress is a Server option for setting the address of the Requirements Manager

func WithStorage

func WithStorage(storage persistence.Storage) service.ServiceOption[Server]

WithStorage is an option to set the storage. If not set, NewServer will use inmemory storage.

Types

type Server added in v0.2.0

type Server struct {
	evaluation.UnimplementedEvaluationServer

	// Clouditor's assessment service
	*cl_service_assessment.Service
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opts ...service.ServiceOption[Server]) (srv *Server)

NewServer creates a new evaluation Server/service

func (*Server) Authorizer added in v0.2.0

func (srv *Server) Authorizer() api.Authorizer

Authorizer implements UsesAuthorizer

func (*Server) CalculateCompliance added in v0.2.0

func (srv *Server) CalculateCompliance(_ context.Context, req *evaluation.CalculateComplianceRequest) (empty *emptypb.Empty, err error)

CalculateCompliance triggers the compliance calculation for a particular services and a set of controls. This will most likely be triggered by the Requirements Manager.

func (*Server) GetCompliance added in v0.2.0

func (srv *Server) GetCompliance(_ context.Context, request *evaluation.GetComplianceRequest) (compliance *evaluation.Compliance, err error)

GetCompliance returns the most recent compliance result for a particular control of a service

func (*Server) GetEvaluation added in v0.2.0

func (srv *Server) GetEvaluation(_ context.Context, request *evaluation.GetEvaluationRequest) (eval *evaluation.EvaluationResult, err error)

GetEvaluation returns the most recent evaluation result for given service and metric IDs

func (*Server) GetEvidence added in v0.2.0

func (srv *Server) GetEvidence(_ context.Context, req *evaluation.GetEvidenceRequest) (e *common.Evidence, err error)

GetEvidence returns the evidence given by evidence_id.

func (*Server) ListCompliance added in v0.2.0

ListCompliance returns all current compliance results for a particular service

func (*Server) ListEvidences added in v0.2.0

ListEvidences returns evidences. The amount of evidences per request and the scope are determined by the query parameters.

func (*Server) SendEvidences added in v0.2.0

func (srv *Server) SendEvidences(stream evaluation.Evaluation_SendEvidencesServer) (err error)

SendEvidences stores and evaluates evidences sent by a SendEvidencesClient via a stream

func (*Server) SetAuthorizer added in v0.2.0

func (srv *Server) SetAuthorizer(auth api.Authorizer)

SetAuthorizer implements UsesAuthorizer

Jump to

Keyboard shortcuts

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