types

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Username string
	Password string
}

type AuthJWTClaims

type AuthJWTClaims struct {
	Auths             []*Project `json:"auths"`
	User              string     `json:"user"`
	Groups            []string   `json:"groups"`
	Contact           string     `json:"email"`
	AdminAccess       bool       `json:"adminAccess"`
	ApplicationAccess bool       `json:"appAccess"`
	OpsAccess         bool       `json:"opsAccess"`
	ViewerAccess      bool       `json:"viewerAccess"`
	ServiceAccess     bool       `json:"serviceAccess"`
	Locator           string     `json:"locator"`
	Endpoint          string     `json:"endPoint"`
	Tenant            string     `json:"tenant"`
	Scopes            string     `json:"scopes"`
	jwt.StandardClaims
}

type BlackWhitelist

type BlackWhitelist struct {
	Blacklist []string `json:"blacklist"`
	Whitelist []string `json:"whitelist"`
}

type Config

type Config struct {
	PodSecurityAdmissionEnforcement podSecurity.Level
	PodSecurityAdmissionWarning     podSecurity.Level
	PodSecurityAdmissionAudit       podSecurity.Level
	Tenant                          string
	Ldap                            LdapConfig
	PublicApiServerURL              string
	KubeCa                          string
	KubeCaText                      string
	KubeToken                       string
	ApiServerTLSConfig              tls.Config
	TokenLifeTime                   string
	ExtraTokenLifeTime              string
	Locator                         string
	NetworkPolicy                   bool
	CustomLabels                    map[string]string
	DefaultPermission               string
	PrivilegedNamespaces            []string
	Blacklist                       []string
	BlackWhitelistNamespace         string
	Whitelist                       bool
}

type KubeConfig

type KubeConfig struct {
	ApiVersion     string              `yaml:"apiVersion"`
	Clusters       []KubeConfigCluster `yaml:"clusters"`
	Contexts       []KubeConfigContext `yaml:"contexts"`
	CurrentContext string              `yaml:"current-context"`
	Kind           string              `yaml:"kind"`
	Users          []KubeConfigUser    `yaml:"users"`
}

Note: struct fields must be public in order for unmarshal to correctly populate the data.

type KubeConfigCluster

type KubeConfigCluster struct {
	Cluster KubeConfigClusterData `yaml:"cluster"`
	Name    string                `yaml:"name"`
}

type KubeConfigClusterData

type KubeConfigClusterData struct {
	CertificateData string `yaml:"certificate-authority-data"`
	Server          string `yaml:"server"`
}

type KubeConfigContext

type KubeConfigContext struct {
	Context KubeConfigContextData `yaml:"context"`
	Name    string                `yaml:"name"`
}

type KubeConfigContextData

type KubeConfigContextData struct {
	Cluster string `yaml:"cluster"`
	User    string `yaml:"user"`
}

type KubeConfigUser

type KubeConfigUser struct {
	Name string              `yaml:"name"`
	User KubeConfigUserToken `yaml:"user"`
}

type KubeConfigUserToken

type KubeConfigUserToken struct {
	Token string `yaml:"token"`
}

type LdapConfig

type LdapConfig struct {
	UserBase              string
	EligibleGroupsParents []string
	GroupBase             string // base path for all the cluster's project groups
	AppMasterGroupBase    string
	CustomerOpsGroupBase  string
	ServiceGroupBase      string
	OpsMasterGroupBase    string
	ViewerGroupBase       string
	AdminUserBase         string
	AdminGroupBase        string
	Host                  string
	Port                  int
	PageSize              uint32
	UseSSL                bool
	StartTLS              bool
	SkipTLSVerification   bool
	BindDN                string
	BindPassword          string
	UserFilter            string
	GroupFilter           string
	Attributes            []string
}

type Project

type Project struct {
	Project     string `json:"project"`
	Role        string `json:"role"`
	Source      string `json:"-"`
	Environment string `json:"environment"`
	Contact     string `json:"-"`
}

func (*Project) Namespace

func (project *Project) Namespace() (ns string)

type ResponseError

type ResponseError struct {
	metav1.TypeMeta
	metav1.Status
}

type User added in v1.30.1

type User struct {
	Username        string
	UserDN          string
	Email           string
	Groups          []string // Store alls the user groups (search is based on implementation!), including the ProjectAccess groups
	IsAdmin         bool
	IsAppOps        bool
	IsCloudOps      bool
	IsViewer        bool
	IsService       bool
	ProjectAccesses []string // Contains the groups matching the cluster's project naming convention. Purposedly a string instead of a []*Project: This will allow the testing based on the project names instead of projects, but also makes it a very clean separation between the ldap package, and its implementation. This will allow further cleanup should another method be used later.
}

Jump to

Keyboard shortcuts

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