tobac

package
v0.0.0-...-bdcecd3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorExistingTeamDoesNotExistInAzureAD = "team '%s' on existing resource does not exist in Azure AD"
View Source
const ErrorNotTaggedWithTeamLabel = "object is not tagged with a team label"
View Source
const ErrorTeamDoesNotExistInAzureAD = "team '%s' does not exist in Azure AD"
View Source
const ErrorUserHasNoAccessToTeam = "user '%s' has no access to team '%s'"
View Source
const SuccessUserBelongsToTeam = "user belongs to owner team '%s'"
View Source
const SuccessUserIsClusterAdmin = "user is cluster administrator through group '%s'"
View Source
const SuccessUserMatchesServiceUserTemplate = "user matches service user template"
View Source
const SuccessUserMayAnnexateOrphanResource = "resource did not have a team label set"

Variables

This section is empty.

Functions

This section is empty.

Types

type KubernetesResource

type KubernetesResource struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
}

KubernetesResource represents any Kubernetes resource with standard object metadata structures.

type Request

type Request struct {
	UserInfo             authenticationv1.UserInfo
	ExistingResource     metav1.Object
	SubmittedResource    metav1.Object
	ClusterAdmins        []string
	ServiceUserTemplates []string
	TeamProvider         TeamProvider
}

type Response

type Response struct {
	Allowed bool
	Reason  string
}

func Allowed

func Allowed(request Request) Response

func ClusterAdminResponse

func ClusterAdminResponse(request Request) *Response

type TeamProvider

type TeamProvider func(string) azure.Team

Jump to

Keyboard shortcuts

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