MCPcopy
hub / github.com/weaviate/weaviate / Authorizer

Interface Authorizer

usecases/auth/authorization/authorizer.go:23–30  ·  view source on GitHub ↗

Authorizer always makes a yes/no decision on a specific resource. Which authorization technique is used in the background (e.g. RBAC, adminlist, ...) is hidden through this interface

Source from the content-addressed store, hash-verified

21// authorization technique is used in the background (e.g. RBAC, adminlist,
22// ...) is hidden through this interface
23type Authorizer interface {
24 Authorize(ctx context.Context, principal *models.Principal, verb string, resources ...string) error
25 // AuthorizeSilent Silent authorization without audit logs
26 AuthorizeSilent(ctx context.Context, principal *models.Principal, verb string, resources ...string) error
27 // FilterAuthorizedResources authorize the passed resources with best effort approach, it will return
28 // list of allowed resources, if none, it will return an empty slice
29 FilterAuthorizedResources(ctx context.Context, principal *models.Principal, verb string, resources ...string) ([]string, error)
30}
31
32// DummyAuthorizer is a pluggable Authorizer which can be used if no specific
33// authorizer is configured. It will allow every auth decision, i.e. it is

Implementers 13

fakeAuthorizermodules/text2vec-contextionary/helpers
DummyAuthorizerusecases/auth/authorization/authorizer
MockAuthorizerusecases/auth/authorization/mock_autho
MockAuthorizer_Expecterusecases/auth/authorization/mock_autho
Managerusecases/auth/authorization/rbac/manag
FakeAuthorizerusecases/auth/authorization/mocks/auth
Authorizerusecases/auth/authorization/adminlist/
denyContainingAuthorizerusecases/objects/references_namespace_
recordingAuthorizeradapters/handlers/mcp/read/tenants_tes
fakeAuthorizeradapters/handlers/graphql/local/get/he
fakeAuthorizeradapters/handlers/graphql/local/explor
mockAuthorizeradapters/handlers/graphql/local/aggreg

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…