rbac

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterRbacService

type ClusterRbacService interface {
	CheckAuthorization(clusterName string, clusterId int, token string, userId int32, rbacForClusterMappingsAlso bool) (bool, error)
	CheckAuthorisationForNode(token string, clusterName string, nodeName string, action string) (authenticated bool)
	CheckAuthorisationForNodeWithClusterId(token string, clusterId int, nodeName string, action string) (authenticated bool, err error)
	CheckAuthorisationForAllK8sPermissions(token string, clusterName string, action string) bool
}

type ClusterRbacServiceImpl

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

func NewClusterRbacServiceImpl

func NewClusterRbacServiceImpl(environmentService environment.EnvironmentService,
	enforcer casbin.Enforcer,
	enforcerUtil rbac.EnforcerUtil,
	clusterService cluster.ClusterService,
	logger *zap.SugaredLogger,
	userService user.UserService) *ClusterRbacServiceImpl

func (*ClusterRbacServiceImpl) CheckAuthorisationForAllK8sPermissions

func (impl *ClusterRbacServiceImpl) CheckAuthorisationForAllK8sPermissions(token string, clusterName string, action string) (b2 bool)

func (*ClusterRbacServiceImpl) CheckAuthorisationForNode

func (impl *ClusterRbacServiceImpl) CheckAuthorisationForNode(token string, clusterName string, nodeName string, action string) (authenticated bool)

func (*ClusterRbacServiceImpl) CheckAuthorisationForNodeWithClusterId

func (impl *ClusterRbacServiceImpl) CheckAuthorisationForNodeWithClusterId(token string, clusterId int, nodeName string, action string) (authenticated bool, err error)

func (*ClusterRbacServiceImpl) CheckAuthorization

func (impl *ClusterRbacServiceImpl) CheckAuthorization(clusterName string, clusterId int, token string, userId int32, rbacForClusterMappingsAlso bool) (authenticated bool, err error)

func (*ClusterRbacServiceImpl) FetchAllowedClusterMap

func (impl *ClusterRbacServiceImpl) FetchAllowedClusterMap(userId int32) (map[string]bool, error)

Jump to

Keyboard shortcuts

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