Documentation ¶
Index ¶
- Constants
- func AdmissionRestServer(port uint, clientAuth, debug bool)
- func CleanupSessCfgCache()
- func CrdDelAll(k8sKind, kvCrdKind, lockKey string, ...) []string
- func CrdQueueProc()
- func CrdValidateRestServer(port uint, clientAuth, debug bool)
- func CreatePredefaultSensor()
- func CrossCheckCrd(kind, rscType, kvCrdKind, lockKey string, kvOnly bool) error
- func FedPollingClient(leader, purgeFedRulesOnJoint bool)
- func HandleAdminUserUpdate()
- func InitContext(ctx *Context)
- func KickLoginSessions(kickInfo *share.CLUSKickLoginSessionsRequest)
- func KickLoginSessionsForRoleChange(name, domain string)
- func LeadChangeNotify(leader bool)
- func LoadInitCfg(load bool)
- func NewLongPollManyMgr(timeout, linger time.Duration, max int) *longpollManyMgr
- func NewLongPollOnceMgr(timeout, linger time.Duration, max int) *longpollOnceMgr
- func ResetLoginTokenTimer(tokenInfo *share.CLUSLoginTokenInfo)
- func StartFedRestServer(fedPingInterval uint32)
- func StartRESTServer()
- func StartStopFedPingPoll(cmd, interval uint32, param1 interface{}) error
- func StopFedRestServer()
- func ValidProcessProfilePath(path string) (string, bool)
- type ContainerImage
- type Context
- type RoleRquired
- type SignalFunc
- type WebhookServer
Constants ¶
const ( OPERATION_CREATE = iota OPERATION_UPDATE OPERATION_DELETE )
const ( K8sKindReplicationController = "ReplicationController" K8sKindStatefulSet = "StatefulSet" )
const ( FedRoleAny = "*" FedRoleMasterJoint = "~" )
const DefaultLDAPServerPort uint16 = 389
const MaxFilelds int = 8
const MaxPerDomainLoginUsers int = 32
Variables ¶
This section is empty.
Functions ¶
func AdmissionRestServer ¶
func CleanupSessCfgCache ¶
func CleanupSessCfgCache()
func CrdDelAll ¶
func CrdDelAll(k8sKind, kvCrdKind, lockKey string, recordList map[string]*share.CLUSCrdSecurityRule) []string
func CrdQueueProc ¶
func CrdQueueProc()
The process thread do it periodically every 10s First it will dequeue first crd event name. Second it will use the name to find the crd content Third it will call process. if failed a crd delete will issued to remove from k8s
func CrdValidateRestServer ¶
func CreatePredefaultSensor ¶
func CreatePredefaultSensor()
lock is alreay hold when call this function clusHelper.AcquireLock(share.CLUSLockPolicyKey, clusterLockWait)
func CrossCheckCrd ¶
kvOnly: true means the checking is triggered by kv change(ex: import). false means the check is triggered by k8s(ex: startup)
func FedPollingClient ¶
func FedPollingClient(leader, purgeFedRulesOnJoint bool)
func HandleAdminUserUpdate ¶
func HandleAdminUserUpdate()
func InitContext ¶
func InitContext(ctx *Context)
InitContext() must be called before StartRESTServer(), StartFedRestServer or AdmissionRestServer()
func KickLoginSessions ¶
func KickLoginSessions(kickInfo *share.CLUSKickLoginSessionsRequest)
for one controller to call other controllers' grpc service, which calls this function, to kick login sessions
func KickLoginSessionsForRoleChange ¶
func KickLoginSessionsForRoleChange(name, domain string)
func LeadChangeNotify ¶
func LeadChangeNotify(leader bool)
func LoadInitCfg ¶
func LoadInitCfg(load bool)
func NewLongPollManyMgr ¶
func NewLongPollOnceMgr ¶
func ResetLoginTokenTimer ¶
func ResetLoginTokenTimer(tokenInfo *share.CLUSLoginTokenInfo)
for one controller to call other controllers' grpc service, which calls this function, to reset a login session
func StartFedRestServer ¶
func StartFedRestServer(fedPingInterval uint32)
func StartRESTServer ¶
func StartRESTServer()
func StartStopFedPingPoll ¶
func StopFedRestServer ¶
func StopFedRestServer()
func ValidProcessProfilePath ¶
Types ¶
type ContainerImage ¶
type ContainerImage struct {
// contains filtered or unexported fields
}
type Context ¶
type Context struct { LocalDev *common.LocalDevice EvQueue cluster.ObjectQueueInterface AuditQueue cluster.ObjectQueueInterface Messenger cluster.MessengerInterface Cacher cache.CacheInterface Scanner scan.ScanInterface FedPort uint RESTPort uint PwdValidUnit uint }
type RoleRquired ¶
type RoleRquired int
type SignalFunc ¶
type SignalFunc func()
type WebhookServer ¶
type WebhookServer struct {
// contains filtered or unexported fields
}
Source Files ¶
- admission.go
- admwebhook.go
- assessment.go
- auth.go
- bench.go
- compliance.go
- configmap.go
- conver.go
- crdsecurityrule.go
- crdvalidatewebhook.go
- custom_role.go
- debug.go
- device.go
- dlp_rule.go
- domain.go
- eula.go
- federation.go
- file_monitor.go
- group.go
- host.go
- ibmsa.go
- internal.go
- license.go
- list.go
- log.go
- longpoll.go
- policy.go
- process.go
- pwd_profile.go
- registry.go
- registry_kits.go
- repository.go
- response.go
- rest.go
- scanner.go
- server.go
- sniffer.go
- system.go
- user.go
- vulnerability.go
- waf_rule.go
- workload.go