Documentation ¶
Index ¶
- type ClusterRbacService
- type ClusterRbacServiceImpl
- func (impl *ClusterRbacServiceImpl) CheckAuthorisationForAllK8sPermissions(token string, clusterName string, action string) (b2 bool)
- func (impl *ClusterRbacServiceImpl) CheckAuthorisationForNode(token string, clusterName string, nodeName string, action string) (authenticated bool)
- func (impl *ClusterRbacServiceImpl) CheckAuthorisationForNodeWithClusterId(token string, clusterId int, nodeName string, action string) (authenticated bool, err error)
- func (impl *ClusterRbacServiceImpl) CheckAuthorization(clusterName string, clusterId int, token string, userId int32, ...) (authenticated bool, err error)
- func (impl *ClusterRbacServiceImpl) FetchAllowedClusterMap(userId int32) (map[string]bool, error)
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 (*ClusterRbacServiceImpl) CheckAuthorisationForNodeWithClusterId ¶
func (*ClusterRbacServiceImpl) CheckAuthorization ¶
func (*ClusterRbacServiceImpl) FetchAllowedClusterMap ¶
func (impl *ClusterRbacServiceImpl) FetchAllowedClusterMap(userId int32) (map[string]bool, error)
Click to show internal directories.
Click to hide internal directories.