authorizer

package
v0.0.0-...-5a0e1a0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer interface {
	// FilterManagedClustersForUser receives a map of leaf-hub -> set(managed clusters) and returns a map of
	// unauthorized entries.
	FilterManagedClustersForUser(ctx context.Context, user string, groups []string,
		hubToManagedClustersMap map[string]set.Set) (map[string]set.Set, error)
}

Authorizer abstracts the functionality required to authorize DB ops through RBAC.

type HubOfHubsAuthorizer

type HubOfHubsAuthorizer struct {
	// contains filtered or unexported fields
}

HubOfHubsAuthorizer handles authorization through Hub of Hubs RBAC.

func NewHubOfHubsAuthorizer

func NewHubOfHubsAuthorizer(statusDB db.StatusDB) (*HubOfHubsAuthorizer, error)

NewHubOfHubsAuthorizer returns a new instance of HubOfHubsAuthorizer.

func (*HubOfHubsAuthorizer) FilterManagedClustersForUser

func (auth *HubOfHubsAuthorizer) FilterManagedClustersForUser(ctx context.Context, user string, groups []string,
	hubToManagedClustersMap map[string]set.Set,
) (map[string]set.Set, error)

FilterManagedClustersForUser receives a map of leaf-hub -> set(managed clusters) and returns a map of unauthorized entries.

Jump to

Keyboard shortcuts

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