MCPcopy Create free account
hub / github.com/clouditor/clouditor / AuthorizationStrategy

Interface AuthorizationStrategy

service/authorization.go:55–58  ·  view source on GitHub ↗

AuthorizationStrategy is an interface that implements a function which checkers whether the current certification target request can be fulfilled using the supplied context (e.g., based on the authenticated user).

Source from the content-addressed store, hash-verified

53// checkers whether the current certification target request can be fulfilled using the
54// supplied context (e.g., based on the authenticated user).
55type AuthorizationStrategy interface {
56 CheckAccess(ctx context.Context, typ RequestType, req api.CertificationTargetRequest) bool
57 AllowedCertificationTargets(ctx context.Context) (all bool, IDs []string)
58}
59
60// AuthorizationStrategyJWT is an AuthorizationStrategy that expects a list of certification target IDs to be in a specific JWT
61// claim key.

Callers 16

AssessEvidenceMethod · 0.65
StartMethod · 0.65
ListResourcesMethod · 0.65
UpdateResourceMethod · 0.65
StoreEvidenceMethod · 0.65
StartEvaluationMethod · 0.65
StopEvaluationMethod · 0.65
ListEvaluationResultsMethod · 0.65
ListResourcesMethod · 0.65
ListGraphEdgesMethod · 0.65
ListEvidencesMethod · 0.65
GetEvidenceMethod · 0.65

Implementers 3

AuthorizationStrategyJWTservice/authorization.go
AuthorizationStrategyAllowAllservice/authorization.go
AuthorizationStrategyMockinternal/testutil/servicetest/authz.go

Calls

no outgoing calls

Tested by

no test coverage detected