Documentation
¶
Index ¶
- Constants
- Variables
- func AdmissionRestServer(port uint, clientAuth, debug bool)
- func CLUSRootToRESTRoot_GET(clusRoot *share.CLUSSigstoreRootOfTrust) api.REST_SigstoreRootOfTrust_GET
- func CLUSVerifierToRESTVerifier(clusVerifier *share.CLUSSigstoreVerifier) api.REST_SigstoreVerifier
- func CleanupSessCfgCache()
- func CrdDelAll(k8sKind, kvCrdKind, lockKey string) []string
- func CrdValidateReqManager()
- func CrdValidateRestServer(port uint, clientAuth, debug bool)
- func CreatePredefaultSensor()
- func CreateQuerySession(qsr *api.QuerySessionRequest) error
- func CrossCheckCrd(kind, rscType, kvCrdKind, lockKey string, kvOnly bool) error
- func DeleteQuerySession(queryToken string) error
- func FedPollingClient(leader, purgeFedRulesOnJoint bool)
- func HandleAdminUserUpdate()
- func InitContext(ctx *Context)
- func IsCertNearExpired(certPath string, expireThresholdDay int) (bool, error)
- func KickLoginSessions(kickInfo *share.CLUSKickLoginSessionsRequest)
- func KickLoginSessionsForRoleChange(name, domain string)
- func LeadChangeNotify(leader bool)
- func LoadInitCfg(load bool, platform string) bool
- func NewLongPollManyMgr(timeout, linger time.Duration, max int) *longpollManyMgr
- func NewLongPollOnceMgr(timeout, linger time.Duration, max int) *longpollOnceMgr
- func PreInitContext(ctx *Context)
- func ReportK8SResToOPA(info *share.CLUSKubernetesResInfo)
- func ResetLoginTokenTimer(tokenInfo *share.CLUSLoginTokenInfo)
- func RestConfig(cmd, interval uint32, param1 interface{}, param2 interface{}) error
- func StartRESTServer(isNewCluster bool, isLead bool)
- func StartStopFedPingPoll(cmd, interval uint32, param1 interface{}) error
- func ValidProcessProfilePath(path string) (string, bool)
- type ApiVersion
- type ContainerImage
- type Context
- type HttpServerErrorWriter
- type JWTCertificateState
- type RoleRquired
- type SignalFunc
- type SsoSession
- type WebhookServer
Constants ¶
const ( OPERATION_CREATE = iota OPERATION_UPDATE OPERATION_DELETE )
const ( K8sKindReplicationController = "ReplicationController" K8sKindStatefulSet = "StatefulSet" K8sKindRole = "Role" K8sKindClusterRole = "ClusterRole" K8sKindRoleBinding = "RoleBinding" K8sKindClusterRoleBinding = "ClusterRoleBinding" )
const ( FedRoleAny = "*" FedRoleMasterJoint = "~" )
const DEFAULT_CERTMANAGER_EXPIRY_CHECK_PERIOD = time.Minute * 30
const DEFAULT_CERTMANAGER_RENEW_THRESHOLD = time.Hour * 24 * 30
const DEFAULT_JWTCERT_VALIDITY_DAYS = 90
const DEFAULT_TLSCERT_VALIDITY_DAYS = 365
const DefaultLDAPServerPort uint16 = 389
const MaxFilelds int = 8
const MaxPerDomainLoginUsers int = 32
Variables ¶
var CertManager *kv.CertManager
var TESTApikeySpecifiedCretionTime bool
Functions ¶
func AdmissionRestServer ¶
func CLUSRootToRESTRoot_GET ¶
func CLUSRootToRESTRoot_GET(clusRoot *share.CLUSSigstoreRootOfTrust) api.REST_SigstoreRootOfTrust_GET
func CLUSVerifierToRESTVerifier ¶
func CLUSVerifierToRESTVerifier(clusVerifier *share.CLUSSigstoreVerifier) api.REST_SigstoreVerifier
func CleanupSessCfgCache ¶
func CleanupSessCfgCache()
func CrdValidateReqManager ¶
func CrdValidateReqManager()
func CrdValidateRestServer ¶
func CreatePredefaultSensor ¶
func CreatePredefaultSensor()
lock is alreay hold when call this function clusHelper.AcquireLock(share.CLUSLockPolicyKey, clusterLockWait)
func CreateQuerySession ¶
func CreateQuerySession(qsr *api.QuerySessionRequest) error
called by KV watcher when a query session request being added
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 DeleteQuerySession ¶
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 IsCertNearExpired ¶
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)
for openshift/rancher login only
func LeadChangeNotify ¶
func LeadChangeNotify(leader bool)
func LoadInitCfg ¶
func NewLongPollManyMgr ¶
func NewLongPollOnceMgr ¶
func PreInitContext ¶
func PreInitContext(ctx *Context)
PreInitContext() must be called before orch connector starts in main()
func ReportK8SResToOPA ¶
func ReportK8SResToOPA(info *share.CLUSKubernetesResInfo)
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 RestConfig ¶
func StartRESTServer ¶
func StartStopFedPingPoll ¶
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 SearchRegistries string FedPort uint RESTPort uint PwdValidUnit uint TeleNeuvectorURL string TeleFreq uint NvAppFullVersion string NvSemanticVersion string CspType share.TCspType CspPauseInterval uint // in minutes CustomCheckControl string // disable / strict / loose CheckCrdSchemaFunc func(lead, init, crossCheck bool, cspType share.TCspType) []string }
type HttpServerErrorWriter ¶
type HttpServerErrorWriter struct{}
type JWTCertificateState ¶
type JWTCertificateState struct {
// contains filtered or unexported fields
}
JWT token related
func GetJWTSigningKey ¶
func GetJWTSigningKey() JWTCertificateState
type RoleRquired ¶
type RoleRquired int
type SignalFunc ¶
type SignalFunc func()
type SsoSession ¶
Extra information of Single Sign-On session
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
- csp_billing_adapter.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
- remote_repository.go
- repository.go
- response.go
- rest.go
- scanner.go
- server.go
- servererrorlogger.go
- sigstore.go
- sniffer.go
- system.go
- telemetry.go
- user.go
- vulasset.go
- vulnerability.go
- waf_rule.go
- workload.go