Documentation
¶
Overview ¶
Package authz resolves what an identity may do to findings. It asks the cluster directly — SubjectAccessReviews with the identity's user and groups — so the grant grammar is ordinary Kubernetes RBAC: native get on findings gates viewing, and the custom verbs approve, suspend, and resume on findings.patchy.bitwisemedia.uk gate the actions. Reviews run as the server's own ServiceAccount (which needs only create on subjectaccessreviews), never via impersonation.
Index ¶
Constants ¶
const ( // VerbApprove is the custom RBAC verb behind the approve action. VerbApprove = "approve" // VerbSuspend is the custom RBAC verb behind the suspend action. VerbSuspend = "suspend" // VerbResume is the custom RBAC verb behind the resume action. VerbResume = "resume" )
Verbs the status server understands.
Variables ¶
var ActionVerbs = []string{VerbApprove, VerbSuspend, VerbResume}
ActionVerbs lists the custom verbs in the order the UI receives them.
Functions ¶
This section is empty.
Types ¶
type Full ¶
type Full struct{}
Full is the bypass granter for auth mode none: everything, for everyone.
type Grants ¶
type Grants struct {
// View reports native get on findings — the dashboard read gate.
View bool
// Verbs are the granted custom action verbs, in ActionVerbs order.
Verbs []string
}
Grants is what one identity may do in the server's namespace. RBAC is namespace-scoped, so grants apply uniformly across findings.
type Reviewer ¶
type Reviewer struct {
// contains filtered or unexported fields
}
Reviewer resolves grants through SubjectAccessReviews, cached briefly per identity.
func NewReviewer ¶
NewReviewer builds a Reviewer for the server's namespace. ttl <= 0 uses the default.