rbac

package
v0.0.0-...-351f9be Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigurationFileKey = "rbacInput"
)

Variables

This section is empty.

Functions

func VerifyGlobalRoleBindingsForUser

func VerifyGlobalRoleBindingsForUser(t *testing.T, user *management.User, adminClient *rancher.Client)

VerifyGlobalRoleBindingsForUser validates that a global role bindings is created for a user when the user is created

func VerifyUserCanAddClusterRoles

func VerifyUserCanAddClusterRoles(t *testing.T, client, memberClient *rancher.Client, cluster *management.Cluster, role string)

VerifyUserCanAddClusterRoles validates a user with the required cluster permissions are able/not able to add other users in the cluster

func VerifyUserCanAddProjectRoles

func VerifyUserCanAddProjectRoles(t *testing.T, client *rancher.Client, project *management.Project, additionalUser *management.User, projectRole, clusterID, role string)

VerifyUserCanAddProjectRoles validates a user with the required cluster permissions are able/not able to add other users in a project on the downstream cluster

func VerifyUserCanCreateNamespace

func VerifyUserCanCreateNamespace(t *testing.T, client, standardClient *rancher.Client, project *management.Project, clusterID, role string)

VerifyUserCanCreateNamespace validates a user with the required cluster permissions are able/not able to create namespaces in the project they do not own

func VerifyUserCanCreateProjects

func VerifyUserCanCreateProjects(t *testing.T, client, standardClient *rancher.Client, clusterID, role string)

VerifyUserCanCreateProjects validates a user with the required cluster permissions are able/not able to create projects in the downstream cluster

func VerifyUserCanDeleteNamespace

func VerifyUserCanDeleteNamespace(t *testing.T, client, standardClient *rancher.Client, project *management.Project, clusterID, role string)

VerifyUserCanDeleteNamespace validates a user with the required cluster permissions are able/not able to delete namespaces in the project they do not own

func VerifyUserCanDeleteProject

func VerifyUserCanDeleteProject(t *testing.T, client *rancher.Client, project *management.Project, role string)

VerifyUserCanDeleteProject validates a user with the required cluster/project permissions are able/not able to delete projects in the downstream cluster

func VerifyUserCanListCluster

func VerifyUserCanListCluster(t *testing.T, client, standardClient *rancher.Client, clusterID, role string)

VerifyUserCanListCluster validates a user with the required global permissions are able to/not able to list the clusters in rancher server

func VerifyUserCanListNamespace

func VerifyUserCanListNamespace(t *testing.T, client, standardClient *rancher.Client, project *management.Project, clusterID, role string)

VerifyUserCanListNamespace validates a user with the required cluster permissions are able/not able to list namespaces in the project they do not own

func VerifyUserCanListProject

func VerifyUserCanListProject(t *testing.T, client, standardClient *rancher.Client, clusterID, role, adminProjectName string)

VerifyUserCanListProject validates a user with the required cluster permissions are able/not able to list projects in the downstream cluster

func VerifyUserCanRemoveClusterRoles

func VerifyUserCanRemoveClusterRoles(t *testing.T, client *rancher.Client, user *management.User)

VerifyUserCanRemoveClusterRoles validates a user with the required cluster/project permissions are able/not able to remove cluster roles in the downstream cluster

Types

type Config

type Config struct {
	Role     string `json:"role" yaml:"role"`
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
}

Jump to

Keyboard shortcuts

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