2019-04-24 21:52:08 +00:00
|
|
|
package authorization
|
|
|
|
|
|
|
|
// Level is the type representing an authorization level.
|
|
|
|
type Level int
|
|
|
|
|
|
|
|
const (
|
|
|
|
// Bypass bypass level.
|
|
|
|
Bypass Level = iota
|
|
|
|
// OneFactor one factor level.
|
|
|
|
OneFactor Level = iota
|
|
|
|
// TwoFactor two factor level.
|
|
|
|
TwoFactor Level = iota
|
|
|
|
// Denied denied level.
|
|
|
|
Denied Level = iota
|
|
|
|
)
|
2021-03-05 04:18:31 +00:00
|
|
|
|
|
|
|
const userPrefix = "user:"
|
|
|
|
const groupPrefix = "group:"
|
2021-04-14 10:53:23 +00:00
|
|
|
|
2021-06-18 01:38:01 +00:00
|
|
|
const bypass = "bypass"
|
|
|
|
const oneFactor = "one_factor"
|
|
|
|
const twoFactor = "two_factor"
|
|
|
|
const deny = "deny"
|
|
|
|
|
2021-04-14 10:53:23 +00:00
|
|
|
const traceFmtACLHitMiss = "ACL %s Position %d for subject %s and object %s (Method %s)"
|