Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultAuditLevel is the default level to audit at, if no policy rules are matched. DefaultAuditLevel = audit.LevelNone )
Variables ¶
This section is empty.
Functions ¶
func LoadPolicyFromBytes ¶
func LoadPolicyFromBytes(policyDef []byte) (*auditinternal.Policy, error)
func LoadPolicyFromFile ¶
func LoadPolicyFromFile(filePath string) (*auditinternal.Policy, error)
Types ¶
type Checker ¶
type Checker interface { // Check the audit level for a request with the given authorizer attributes. LevelAndStages(authorizer.Attributes) (audit.Level, []audit.Stage) }
Checker exposes methods for checking the policy rules.
func FakeChecker ¶
FakeChecker creates a checker that returns a constant level for all requests (for testing).
func NewChecker ¶
NewChecker creates a new policy checker.
Click to show internal directories.
Click to hide internal directories.